/* ===================================================
   FERRY-BOAT — Fiche Universitaire · Transport Maritime
   Style : Maritime Industriel / Infrastructure moderne
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,300;0,400;0,600;0,700;0,800;1,400&family=Barlow:wght@300;400;500;600&family=Share+Tech+Mono&display=swap');

:root {
  --ocean:      #0a1628;
  --deep:       #06101e;
  --navy:       #102040;
  --mid-blue:   #1a3a6a;
  --steel:      #2a5080;
  --wave:       #1e6fa8;
  --sky:        #3a8fc8;
  --foam:       #7ab8d8;
  --white:      #f0f6fb;
  --gray-lt:    #c8d8e8;
  --gray:       #8a9aaa;
  --signal:     #e8a800;
  --signal-lt:  #f0c040;
  --red-nav:    #cc2a2a;
  --green-nav:  #1a7a40;
  --hull:       #4a5560;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  color: var(--white);
  background: var(--deep);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Top bar ── */
.top-bar {
  background: var(--ocean);
  border-bottom: 2px solid var(--mid-blue);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.breadcrumb {
  font-family: 'Share Tech Mono', monospace;
  font-size: .7rem;
  color: var(--foam);
  letter-spacing: .1em;
}

.breadcrumb .sep { color: var(--steel); margin: 0 8px; }

.ais-id {
  font-family: 'Share Tech Mono', monospace;
  font-size: .65rem;
  color: var(--gray);
  letter-spacing: .12em;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ocean);
}

.hero-sky-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg,
    #040c18 0%, #081422 25%, #0d1e38 50%,
    #102040 70%, #0d2a40 100%);
}

/* Horizon glow */
.hero-sky-bg::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(to top,
    rgba(30,111,168,.5) 0%, rgba(26,58,106,.3) 40%, transparent 100%);
}

/* Grid lines (radar aesthetic) */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(58,143,200,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,143,200,.05) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Ferry SVG */
.ferry-svg {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 88vw);
  filter: drop-shadow(0 12px 40px rgba(0,0,0,.7));
  animation: ferry-sway 10s ease-in-out infinite;
}

@keyframes ferry-sway {
  0%,100% { transform: translateX(-50%) translateY(0) rotate(-.25deg); }
  50%      { transform: translateX(-50%) translateY(-7px) rotate(.25deg); }
}

/* Sea animation */
.sea {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 130px;
  overflow: hidden;
}

.sea-wave {
  position: absolute;
  bottom: 0;
  width: 220%;
  height: 90px;
  border-radius: 40%;
}

.sw-1 {
  background: rgba(10,22,40,.97);
  animation: sea-roll 12s linear infinite;
}
.sw-2 {
  background: rgba(16,32,64,.8);
  animation: sea-roll 8s linear infinite reverse;
  bottom: 8px;
}
.sw-3 {
  background: rgba(30,111,168,.25);
  animation: sea-roll 10s linear infinite;
  bottom: 18px;
}

@keyframes sea-roll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-45%); }
}

/* Wake lines */
.wake {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  pointer-events: none;
}

.wake-line {
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(to right, transparent, rgba(122,184,216,.3), transparent);
  margin-bottom: 5px;
  animation: wake-spread 4s ease-out infinite;
}

.wake-line:nth-child(1) { width: 100%; animation-delay: 0s; }
.wake-line:nth-child(2) { width: 80%; margin: 0 auto; animation-delay: .3s; }
.wake-line:nth-child(3) { width: 55%; margin: 0 auto; animation-delay: .6s; }

@keyframes wake-spread {
  0%,100% { opacity: .3; }
  50%      { opacity: .7; }
}

/* Hero text */
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 40px 44px 40px;
  background: linear-gradient(to top,
    rgba(4,12,24,.98) 0%, rgba(4,12,24,.75) 50%, transparent 100%);
}

.hero-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: .68rem;
  color: var(--sky);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-label::after {
  content: '';
  flex: 1;
  max-width: 180px;
  height: 1px;
  background: var(--steel);
}

.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 800;
  color: var(--white);
  line-height: .95;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

.hero h1 em {
  display: block;
  font-size: .42em;
  font-style: normal;
  font-weight: 300;
  color: var(--foam);
  letter-spacing: .15em;
  margin-bottom: 6px;
}

.hero-desc {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--gray-lt);
  max-width: 560px;
  font-weight: 300;
}

.status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badge {
  padding: 5px 14px;
  border-radius: 3px;
  font-family: 'Share Tech Mono', monospace;
  font-size: .7rem;
  letter-spacing: .1em;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-blue  { background: rgba(30,111,168,.25); color: var(--foam); border: 1px solid var(--steel); }
.badge-amber { background: rgba(232,168,0,.18); color: var(--signal-lt); border: 1px solid rgba(232,168,0,.4); }
.badge-green { background: rgba(26,122,64,.2); color: #5ada94; border: 1px solid rgba(26,122,64,.4); }

/* ── Main layout ── */
.main-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
}

/* ── Intro strip ── */
.intro-strip {
  background: var(--navy);
  border-top: 3px solid var(--wave);
  border-bottom: 1px solid var(--mid-blue);
  padding: 28px 44px;
  margin-bottom: 36px;
}

.intro-strip p {
  font-size: 1.08rem;
  color: var(--gray-lt);
  line-height: 1.8;
  max-width: 840px;
  font-weight: 300;
}

.intro-strip strong { color: var(--white); font-weight: 600; }

/* ── Section headings ── */
.section-heading {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--white);
  margin: 44px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--steel);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading:first-child { margin-top: 0; }

.sh-accent {
  display: inline-block;
  width: 4px;
  height: 1.4em;
  background: var(--wave);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Body text ── */
.main-col p {
  font-size: 1rem;
  color: var(--gray-lt);
  line-height: 1.82;
  margin-bottom: 16px;
  font-weight: 300;
}

.main-col strong { color: var(--white); font-weight: 600; }

/* ── Data table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: .88rem;
}

.data-table thead th {
  background: var(--mid-blue);
  color: var(--foam);
  padding: 10px 14px;
  text-align: left;
  font-family: 'Share Tech Mono', monospace;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--wave);
}

.data-table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(42,80,128,.4);
  color: var(--gray-lt);
}

.data-table tr:nth-child(even) td { background: rgba(16,32,64,.5); }
.data-table td:first-child {
  font-weight: 600;
  color: var(--foam);
  font-family: 'Share Tech Mono', monospace;
  font-size: .82rem;
}

/* ── Type cards ferry ── */
.ferry-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.ftype {
  background: var(--navy);
  border: 1px solid var(--mid-blue);
  border-left: 4px solid var(--wave);
  border-radius: 6px;
  padding: 18px 16px;
  transition: border-color .2s, background .2s, transform .25s;
  cursor: default;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s, transform .5s, border-color .2s;
}

.ftype.visible {
  opacity: 1;
  transform: translateY(0);
}

.ftype:hover {
  border-color: var(--sky);
  background: rgba(26,58,106,.8);
  transform: translateY(-3px) !important;
}

.ftype-icon { font-size: 1.5rem; margin-bottom: 6px; }

.ftype h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.ftype p {
  font-size: .86rem !important;
  color: var(--gray) !important;
  line-height: 1.55 !important;
  margin: 0 !important;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 28px;
  margin: 16px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--wave), var(--sky) 60%, transparent);
}

.tl-item {
  position: relative;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .45s, transform .45s;
}

.tl-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -23px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wave);
  border: 2px solid var(--deep);
  box-shadow: 0 0 0 2px var(--steel);
}

.tl-year {
  font-family: 'Share Tech Mono', monospace;
  font-size: .72rem;
  color: var(--signal);
  letter-spacing: .15em;
  margin-bottom: 2px;
}

.tl-item p {
  font-size: .96rem !important;
  margin: 0 !important;
  line-height: 1.6 !important;
}

/* ── Propulsion comparison ── */
.prop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}

.prop-card {
  background: var(--navy);
  border: 1px solid var(--mid-blue);
  border-radius: 6px;
  padding: 16px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s, transform .5s;
}

.prop-card.visible { opacity: 1; transform: translateY(0); }

.prop-card .pc-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pc-diesel { color: #9ab0c0; }
.pc-electric { color: #5ada94; }
.pc-hybrid { color: var(--signal-lt); }
.pc-hydrogen { color: #80c8f8; }

.prop-card p {
  font-size: .84rem !important;
  color: var(--gray) !important;
  line-height: 1.55 !important;
  margin: 0 !important;
}

/* ── Vocabulary table ── */
.vocab-table {
  list-style: none;
  margin: 12px 0;
}

.vocab-table li {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(42,80,128,.3);
  font-size: .94rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .4s, transform .4s;
}

.vocab-table li.visible {
  opacity: 1;
  transform: translateX(0);
}

.vocab-table li:last-child { border-bottom: none; }

.vt-term {
  font-family: 'Share Tech Mono', monospace;
  font-size: .8rem;
  color: var(--sky);
  min-width: 150px;
  flex-shrink: 0;
  letter-spacing: .05em;
  padding-top: 2px;
}

.vt-def { color: var(--gray-lt); font-weight: 300; }

/* ── Sidebar ── */
.sidebar {
  position: relative;
}

.info-card {
  background: var(--navy);
  border: 1px solid var(--mid-blue);
  border-radius: 6px;
  padding: 22px 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--wave), var(--sky));
}

.info-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--foam);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(42,80,128,.4);
}

/* KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kpi {
  text-align: center;
  padding: 12px 6px;
  background: rgba(6,16,30,.5);
  border-radius: 4px;
  border: 1px solid rgba(42,80,128,.3);
}

.kpi-num {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--sky);
  line-height: 1;
}

.kpi-label {
  display: block;
  font-size: .68rem;
  color: var(--gray);
  margin-top: 4px;
  letter-spacing: .06em;
  line-height: 1.3;
  text-transform: uppercase;
}

/* Nav lights legend */
.navlights {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}

.nl-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  color: var(--gray-lt);
}

.nl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

/* Route map sketch */
.route-sketch {
  position: relative;
  height: 120px;
  background: rgba(6,16,30,.7);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.route-sketch svg {
  width: 100%;
  height: 100%;
}

/* Notable ferries list */
.ferry-list { list-style: none; }

.ferry-list li {
  padding: 9px 8px;
  border-radius: 4px;
  border-bottom: 1px solid rgba(42,80,128,.25);
  cursor: pointer;
  transition: background .2s;
}

.ferry-list li:hover { background: rgba(30,111,168,.15); }
.ferry-list li:last-child { border-bottom: none; }

.fl-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--foam);
}

.fl-desc {
  font-size: .8rem;
  color: var(--gray);
  font-style: italic;
  margin-top: 1px;
}

.fl-detail {
  display: none;
  font-size: .8rem;
  color: var(--gray-lt);
  margin-top: 7px;
  padding: 8px;
  background: rgba(6,16,30,.6);
  border-left: 3px solid var(--wave);
  line-height: 1.55;
}

.ferry-list li.open .fl-detail { display: block; }

/* ── Progress + back-top ── */
#read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--wave), var(--sky));
  z-index: 1000;
  width: 0%;
  transition: width .1s linear;
}

#back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--navy);
  border: 2px solid var(--steel);
  color: var(--sky);
  font-size: 1.1rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .25s;
  z-index: 999;
  text-decoration: none;
}

#back-top.visible { opacity: 1; pointer-events: auto; }
#back-top:hover { transform: translateY(-3px); border-color: var(--sky); }

/* ── Footer ── */
footer {
  background: var(--ocean);
  border-top: 2px solid var(--mid-blue);
  padding: 28px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-id {
  font-family: 'Share Tech Mono', monospace;
  font-size: .82rem;
  color: var(--foam);
  letter-spacing: .08em;
}

.footer-meta {
  font-size: .68rem;
  color: var(--gray);
  text-align: right;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 820px) {
  .content-grid { grid-template-columns: 1fr; }
  .ferry-types  { grid-template-columns: 1fr; }
  .prop-grid    { grid-template-columns: 1fr; }
  .kpi-grid     { grid-template-columns: repeat(2, 1fr); }
  .hero-content { padding: 32px 24px 32px; }
  .intro-strip  { padding: 24px; }
  footer        { padding: 24px; flex-direction: column; }
}
