@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Lato:ital,wght@0,300;0,400;1,300&family=Anonymous+Pro:wght@400&display=swap');

:root {
  --parch:       #f2ead8;
  --old-paper:   #e8dcc8;
  --crust-light: #d8c8a8;
  --crust-mid:   #c0a878;
  --crust-dark:  #8a7050;
  --mantle:      #6a4828;
  --core-hot:    #b83818;
  --core-inner:  #d86020;
  --ridge:       #1a6080;
  --subduct:     #4a2880;
  --transform:   #207840;
  --mountain:    #705040;
  --ocean:       #2a5880;
  --text-dark:   #2a1808;
  --text-mid:    #5a3818;
  --text-light:  #8a6840;
  --card-bg:     rgba(242,234,216,0.88);
  --card-border: rgba(138,112,80,0.25);
  --mono:        'Anonymous Pro', monospace;
  --shadow:      0 4px 24px rgba(42,24,8,0.08);
}

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

body {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  background: var(--parch);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Parchment texture bg ── */
.parch-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 80%, rgba(176,136,80,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(200,168,120,0.12) 0%, transparent 55%),
    linear-gradient(160deg, #f0e8d4 0%, #eadfc8 40%, #f2e8d8 80%, #f5edd8 100%);
}
.parch-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 200px; opacity: 0.6; mix-blend-mode: multiply;
}

#geo-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.18;
}

#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--core-hot), var(--core-inner));
  z-index: 9999;
}

/* ── Layout ── */
.wrap {
  position: relative; z-index: 1;
  max-width: 1000px; margin: 0 auto; padding: 0 28px 100px;
}

/* ══ HERO ══ */
.hero {
  padding: 80px 0 60px;
  border-bottom: 2px solid rgba(138,112,80,0.25);
  opacity: 0; animation: parchIn 1s 0.1s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes parchIn {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:none; }
}

.hero-tag {
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--crust-dark); margin-bottom: 22px;
}

.hero h1 {
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 700; line-height: 1;
  letter-spacing: -0.01em; color: var(--text-dark);
  margin-bottom: 12px;
}
.hero h1 .sub {
  display: block; font-weight: 400; font-size: 45%;
  letter-spacing: 0.12em; color: var(--crust-dark); margin-bottom: 6px;
}

.hero-belt {
  display: flex; gap: 36px; margin: 32px 0 28px; flex-wrap: wrap;
}
.hero-belt-item { text-align: left; }
.belt-val {
  font-family: 'Cinzel', serif; font-size: 2.2rem; color: var(--core-hot);
  line-height: 1; display: block; margin-bottom: 3px;
}
.belt-lbl { font-size: 0.83rem; color: var(--text-light); line-height: 1.4; }

.hero-desc {
  font-size: 1.05rem; line-height: 1.85; color: var(--text-mid);
  max-width: 680px; font-style: italic;
}

/* ── Divider ── */
.geo-rule {
  width: 100%; height: 1px; margin: 64px 0;
  background: linear-gradient(90deg, transparent, var(--crust-mid), transparent);
  opacity: 0.5;
}
.geo-rule::before {
  content: '✦'; display: block; text-align: center;
  color: var(--crust-mid); font-size: 0.8rem; margin-top: -10px; line-height: 1;
  background: var(--parch); width: 24px; margin-left: auto; margin-right: auto;
}

/* ── Sec util ── */
.sec-tag {
  font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--crust-dark); margin-bottom: 10px;
}
.sec-h2 {
  font-family: 'Cinzel', serif; font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 700; color: var(--text-dark);
  margin-bottom: 28px; line-height: 1.1;
}

/* ══ PLAQUES TABLE ══ */
.plates-section { opacity: 0; animation: rise 0.8s forwards; }

.plates-table { width: 100%; border-collapse: collapse; }
.plates-table th {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--crust-dark); padding: 12px 16px; text-align: left; border-bottom: 2px solid var(--crust-light);
}
.plates-table td {
  padding: 14px 16px; border-bottom: 1px solid rgba(138,112,80,0.12);
  font-size: 0.91rem; color: var(--text-mid); vertical-align: middle;
}
.plates-table tr:hover td { background: rgba(192,168,120,0.12); }
.plates-table td:first-child { font-family: 'Cinzel', serif; font-size: 0.95rem; color: var(--text-dark); font-weight: 700; }
.plates-table .speed { font-family: var(--mono); font-size: 0.86rem; color: var(--core-hot); }
.plate-type {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-family: var(--mono);
}
.pt-oceanique  { background: rgba(42,88,128,0.12); color: var(--ocean); }
.pt-continentale{ background: rgba(112,80,64,0.12); color: var(--mountain); }
.pt-mixte      { background: rgba(74,40,128,0.12); color: var(--subduct); }

/* ══ FRONTIÈRES ══ */
.fronts-section { opacity: 0; animation: rise 0.8s forwards; }

.fronts-panels { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px; background: rgba(138,112,80,0.15); border-radius: 14px; overflow: hidden; }
.front-panel {
  background: var(--card-bg); padding: 26px 22px; backdrop-filter: blur(6px);
  transition: background 0.3s;
}
.front-panel:hover { background: rgba(230,218,196,0.95); }
.front-icon { font-size: 2rem; margin-bottom: 14px; display: block; }
.front-panel h3 { font-family: 'Cinzel', serif; font-size: 1.05rem; color: var(--text-dark); margin-bottom: 4px; }
.front-type {
  font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.15em; margin-bottom: 12px; display: block;
}
.front-panel p { font-size: 0.9rem; line-height: 1.72; color: var(--text-mid); }
.front-panel ul { padding-left: 1.1em; }
.front-panel li { font-size: 0.9rem; line-height: 1.72; color: var(--text-mid); margin-bottom: 4px; }
.front-exemple {
  margin-top: 12px; font-family: var(--mono); font-size: 0.65rem; color: var(--crust-dark); letter-spacing: 0.1em;
}

/* ══ STRUCTURE INTERNE ══ */
.structure-section { opacity: 0; animation: rise 0.8s forwards; }

.struct-list { display: flex; flex-direction: column; gap: 0;
  border: 2px solid var(--crust-light); border-radius: 14px; overflow: hidden; }
.struct-row {
  display: grid; grid-template-columns: 12px 160px 1fr auto;
  align-items: center; gap: 0;
  border-bottom: 1px solid rgba(138,112,80,0.12); transition: background 0.25s;
}
.struct-row:last-child { border-bottom: none; }
.struct-row:hover { background: rgba(192,168,120,0.15); }
.struct-color { min-height: 100%; }
.struct-name {
  font-family: 'Cinzel', serif; font-size: 0.95rem; font-weight: 700;
  color: var(--text-dark); padding: 20px; border-right: 1px solid rgba(138,112,80,0.1);
}
.struct-desc { padding: 20px; font-size: 0.9rem; line-height: 1.7; color: var(--text-mid); }
.struct-depth {
  font-family: var(--mono); font-size: 0.78rem; color: var(--core-hot);
  padding: 20px; white-space: nowrap; border-left: 1px solid rgba(138,112,80,0.1);
}

/* ══ DÉRIVE ══ */
.drift-section { opacity: 0; animation: rise 0.8s forwards; }

.drift-timeline {
  display: flex; flex-direction: column; gap: 0;
  padding-left: 28px; position: relative;
}
.drift-timeline::before {
  content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--core-hot), transparent);
}
.drift-event { position: relative; margin-bottom: 32px; }
.drift-event::before {
  content: ''; position: absolute; left: -24px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--crust-mid); border: 2px solid var(--parch);
  box-shadow: 0 0 0 2px var(--crust-mid);
}
.drift-age { font-family: var(--mono); font-size: 0.72rem; color: var(--core-hot); letter-spacing: 0.12em; margin-bottom: 4px; display: block; }
.drift-event h3 { font-family: 'Cinzel', serif; font-size: 1rem; color: var(--text-dark); margin-bottom: 6px; }
.drift-event p { font-size: 0.91rem; line-height: 1.72; color: var(--text-mid); }

/* ══ PREUVES ══ */
.evidence-section { opacity: 0; animation: rise 0.8s forwards; }

.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.evidence-card {
  padding: 22px 20px; background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 12px; box-shadow: var(--shadow); transition: transform 0.3s;
}
.evidence-card:hover { transform: translateY(-3px); }
.evidence-icon { font-size: 1.8rem; margin-bottom: 12px; display: block; }
.evidence-card h3 { font-family: 'Cinzel', serif; font-size: 0.95rem; color: var(--text-dark); margin-bottom: 8px; }
.evidence-card p { font-size: 0.88rem; line-height: 1.7; color: var(--text-mid); }

/* ══ FOOTER ══ */
footer {
  margin-top: 80px; padding-top: 22px;
  border-top: 2px solid var(--crust-light);
  text-align: center; font-family: var(--mono);
  font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-light); opacity: 0.7;
}

@keyframes rise { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }

.plates-section    { animation-delay: 0.7s; }
.fronts-section    { animation-delay: 0.9s; }
.structure-section { animation-delay: 1.1s; }
.drift-section     { animation-delay: 1.3s; }
.evidence-section  { animation-delay: 1.5s; }

@media (max-width: 700px) {
  .fronts-panels { grid-template-columns: 1fr; }
  .struct-row { grid-template-columns: 8px 1fr; }
  .struct-name { display: none; }
  .struct-depth { display: none; }
}
