/* ===================================================
   CANOË — Fiche Universitaire · Transport Maritime
   Style : Wilderness / Aventure Nature
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Nunito:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Caveat:wght@500;700&display=swap');

:root {
  --forest:     #1a3d28;
  --forest-mid: #2a5c3f;
  --moss:       #4a7c5e;
  --fern:       #6b9e7f;
  --river:      #2c7a7b;
  --river-lt:   #4aa3a4;
  --water:      #a7d4d5;
  --bark:       #5c3d1e;
  --sand:       #d4b896;
  --parchment:  #faf6ee;
  --cream:      #f7f3e8;
  --ink:        #1a2318;
  --gold-sun:   #d4900a;
  --mist:       rgba(255,255,255,0.07);
}

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

/* ── Body with organic texture ── */
body {
  font-family: 'Nunito', sans-serif;
  color: var(--ink);
  background: var(--parchment);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(42,92,63,.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(44,122,123,.10) 0%, transparent 70%);
  min-height: 100vh;
}

/* ── Top nav ── */
.top-nav {
  background: var(--forest);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--moss);
}

.breadcrumb {
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fern);
  font-weight: 600;
}

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

.nav-label {
  font-family: 'Caveat', cursive;
  font-size: 1rem;
  color: var(--sand);
  letter-spacing: .05em;
}

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

/* Sky gradient */
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #0d2218 0%, #1a3d28 35%, #2a5c3f 65%, #1e4a40 100%);
}

/* Animated water at bottom */
.hero-water {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 110px;
  overflow: hidden;
}

.wave {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 80px;
  border-radius: 50%;
  animation: wave-flow 8s ease-in-out infinite;
}

.wave-1 {
  background: rgba(44,122,123,.5);
  animation-duration: 9s;
  bottom: 10px;
}
.wave-2 {
  background: rgba(74,163,164,.35);
  animation-delay: -3s;
  animation-duration: 7s;
  bottom: 0px;
}
.wave-3 {
  background: rgba(167,212,213,.2);
  animation-delay: -5s;
  animation-duration: 11s;
  bottom: 20px;
}

@keyframes wave-flow {
  0%,100% { transform: translateX(0) scaleY(1); }
  50%      { transform: translateX(-22%) scaleY(1.1); }
}

/* Canoe SVG */
.canoe-svg {
  position: absolute;
  bottom: 62px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 80vw);
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.5));
  animation: paddle-drift 6s ease-in-out infinite;
}

@keyframes paddle-drift {
  0%,100% { transform: translateX(-50%) translateY(0) rotate(-.5deg); }
  50%      { transform: translateX(-50%) translateY(-8px) rotate(.5deg); }
}

/* Ripples */
.ripples {
  position: absolute;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  display: flex;
  justify-content: center;
  gap: 28px;
}

.ripple {
  width: 60px;
  height: 14px;
  border: 2px solid rgba(167,212,213,.4);
  border-radius: 50%;
  animation: ripple-out 3.5s ease-out infinite;
}

.ripple:nth-child(2) { animation-delay: .6s; width: 40px; height: 10px; }
.ripple:nth-child(3) { animation-delay: 1.2s; }

@keyframes ripple-out {
  0%   { transform: scale(.4); opacity: .8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Forest silhouette trees */
.trees {
  position: absolute;
  bottom: 80px;
  left: 0; right: 0;
  height: 160px;
  pointer-events: none;
}

/* Hero text */
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 48px 36px 44px;
  background: linear-gradient(to top, rgba(13,34,24,.95) 0%, rgba(13,34,24,.6) 60%, transparent 100%);
}

.hero-eyebrow {
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--river-lt);
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-title {
  font-family: 'Abril Fatface', cursive;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  color: #fff;
  line-height: .95;
  letter-spacing: -.02em;
  text-shadow: 0 4px 24px rgba(0,0,0,.6);
}

.hero-title span {
  display: block;
  font-family: 'Caveat', cursive;
  font-size: .38em;
  color: var(--sand);
  letter-spacing: .08em;
  line-height: 1.5;
  font-weight: 500;
  text-shadow: none;
}

.hero-sub {
  margin-top: 12px;
  font-size: 1.05rem;
  color: rgba(255,255,255,.6);
  max-width: 520px;
  line-height: 1.6;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1.5px solid;
}

.tag-green  { border-color: var(--moss); color: var(--fern); }
.tag-river  { border-color: var(--river-lt); color: var(--water); }
.tag-sand   { border-color: var(--sand); color: var(--sand); }

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

/* ── Intro band ── */
.intro-band {
  background: var(--forest);
  color: var(--cream);
  padding: 32px 44px;
  border-radius: 0 0 24px 24px;
  margin-bottom: 40px;
}

.intro-band p {
  font-size: 1.15rem;
  line-height: 1.8;
  max-width: 820px;
  color: rgba(250,246,238,.85);
}

.intro-band strong { color: var(--water); }

/* ── Content grid ── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

/* ── Section headings ── */
.section-title {
  font-family: 'Abril Fatface', cursive;
  font-size: 1.7rem;
  color: var(--forest);
  margin: 44px 0 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--fern);
  display: flex;
  align-items: center;
  gap: 12px;
}

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

/* ── Body text ── */
.main-col p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #2a3528;
  margin-bottom: 16px;
}

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

.type-card {
  background: var(--cream);
  border: 2px solid rgba(74,124,94,.25);
  border-radius: 12px;
  padding: 18px 16px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  cursor: default;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s, transform .5s, border-color .2s, box-shadow .2s;
}

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

.type-card:hover {
  border-color: var(--moss);
  box-shadow: 0 6px 20px rgba(42,92,63,.15);
  transform: translateY(-3px) !important;
}

.type-card .tc-icon { font-size: 1.6rem; margin-bottom: 6px; }

.type-card h4 {
  font-family: 'Abril Fatface', cursive;
  font-size: .95rem;
  color: var(--forest);
  margin-bottom: 6px;
}

.type-card p {
  font-size: .88rem !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  color: #3a4a38;
}

/* ── Skills table ── */
.skills-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: .92rem;
}

.skills-table thead th {
  background: var(--forest-mid);
  color: var(--cream);
  padding: 10px 14px;
  text-align: left;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.skills-table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(74,124,94,.18);
  color: #2a3528;
}

.skills-table tr:nth-child(even) td { background: rgba(106,158,127,.08); }
.skills-table td:first-child { font-weight: 700; color: var(--forest); }

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

.vocab-list li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(74,124,94,.15);
  font-size: .98rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .45s, transform .45s;
}

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

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

.vocab-list .vterm {
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--river);
  min-width: 140px;
  flex-shrink: 0;
}

.vocab-list .vdef { color: #3a4a38; }

/* ── Security panel ── */
.security-panel {
  background: linear-gradient(135deg, #1a3d28, #1e4a40);
  border-radius: 14px;
  padding: 24px 26px;
  color: var(--cream);
  margin: 24px 0;
}

.security-panel h4 {
  font-family: 'Abril Fatface', cursive;
  font-size: 1.1rem;
  color: var(--sand);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.security-panel ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.security-panel li {
  font-size: .9rem;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.45;
  color: rgba(250,246,238,.85);
}

.security-panel li::before {
  content: '✓';
  color: var(--river-lt);
  font-weight: 700;
  flex-shrink: 0;
}

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

.olympic-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--forest), var(--river-lt), transparent);
}

.ot-item {
  position: relative;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .45s, transform .45s;
}

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

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

.ot-year {
  font-family: 'Caveat', cursive;
  font-size: 1rem;
  color: var(--river);
  font-weight: 700;
}

.ot-item p {
  font-size: .96rem !important;
  margin: 0 !important;
  color: #2a3528;
}

/* ── Sidebar ── */
.sidebar-card {
  background: var(--cream);
  border: 2px solid rgba(74,124,94,.2);
  border-radius: 14px;
  padding: 22px 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.sidebar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--forest), var(--river-lt));
}

.sidebar-card h3 {
  font-family: 'Abril Fatface', cursive;
  font-size: 1.05rem;
  color: var(--forest);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(74,124,94,.2);
}

/* Stat figures */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(74,124,94,.12);
}

.stat-row:last-child { border-bottom: none; }

.stat-number {
  font-family: 'Abril Fatface', cursive;
  font-size: 1.6rem;
  color: var(--forest-mid);
  line-height: 1;
}

.stat-label {
  font-size: .8rem;
  color: #5a6a58;
  text-align: right;
  line-height: 1.3;
  max-width: 160px;
}

/* Materials comparison */
.material-list { list-style: none; }

.material-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 8px;
  transition: background .2s;
  cursor: default;
  font-size: .9rem;
  color: #2a3528;
}

.material-list li:hover { background: rgba(74,124,94,.1); }

.mat-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--moss);
  flex-shrink: 0;
  transition: width .6s ease;
}

.mat-label {
  font-weight: 600;
  color: var(--forest);
  min-width: 80px;
}

/* Discipline grid */
.discipline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.discipline-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s;
  border: 1px solid transparent;
}

.discipline-item:hover {
  background: rgba(42,92,63,.08);
  border-color: rgba(74,124,94,.25);
}

.discipline-item .di-icon { font-size: 1.2rem; flex-shrink: 0; }

.discipline-item .di-name {
  font-weight: 700;
  font-size: .88rem;
  color: var(--forest);
  display: block;
}

.discipline-item .di-desc {
  font-size: .78rem;
  color: #5a6a58;
  line-height: 1.4;
}

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

#back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--forest);
  border: 2px solid var(--moss);
  color: var(--fern);
  font-size: 1.1rem;
  border-radius: 50%;
  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); }

/* ── Footer ── */
footer {
  background: var(--forest);
  color: var(--fern);
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 3px solid var(--moss);
}

footer .footer-logo {
  font-family: 'Abril Fatface', cursive;
  font-size: 1.1rem;
  color: var(--sand);
}

footer .footer-meta {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(107,158,127,.6);
  text-align: right;
}

/* ── Responsive ── */
@media (max-width: 800px) {
  .content-grid { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  .security-panel ul { grid-template-columns: 1fr; }
  .hero-content { padding: 32px 24px 28px; }
}
