/* ============================================================
   CERVOLAND — feuille de style
   Univers steampunk-Pixar, féérique, pour les enfants.
   ============================================================ */

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sky);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================================
   TOKENS — ambiance par défaut "Plein jour"
   ============================================================ */
:root {
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Lecture */
  --body-spacing: 0em;
  --body-word: normal;
  --body-line: 1.65;

  /* Encre & matières (charte Cervoland) */
  --ink: #142c5c;
  --ink-soft: #4a4a55;
  --parchment: #fffaf2;
  --parchment-edge: #ffe6f5;
  --brass: #ffdd55;
  --brass-dark: #f4c01a;
  --brass-light: #fff6cc;

  /* Ciel (bleu charte vers crème) */
  --sky: linear-gradient(180deg, #3f73c5 0%, #6f9fda 38%, #c9dbf3 76%, #fffaf2 100%);
  --sky-top: #3f73c5;
  --cloud: rgba(255,255,255,.92);
  --star-opacity: 0;
  --twinkle: 0;

  /* Planète */
  --planet-a: #6fd08a;
  --planet-b: #3f8f6b;
  --planet-c: #2c6f8f;
  --planet-atmo: rgba(150,225,255,.85);

  /* Accent global (cœur Cervoland) */
  --heart: #e83f9f;

  --speed: 1; /* multiplié par les durées — 0 = pas d'anim */

  /* Couleurs personnages */
  --c-cally:#e23ba0;     --c-cally-deep:#7b3fa0;
  --c-motus:#ef7d24;     --c-motus-deep:#2f6db0;
  --c-paola:#d65b7a;     --c-paola-deep:#a23a57;
  --c-aoutch:#3f9e4d;    --c-aoutch-deep:#23692f;
  --c-tisto:#2f7fd1;     --c-tisto-deep:#243b86;
  --c-tadach:#f2c218;    --c-tadach-deep:#1f2f7a;
  --c-gribouilli:#3f8fd6;--c-gribouilli-deep:#7a3fb0;
}

/* ---------- Ambiance NUIT ---------- */
body[data-ambiance="nuit"] {
  --ink:#eef0ff; --ink-soft:#b9c0e6;
  --parchment:#27295a; --parchment-edge:#3a3d78;
  --sky: radial-gradient(140% 100% at 50% -10%, #243a85 0%, #16205c 45%, #0c1340 100%);
  --sky-top:#0c1340;
  --cloud: rgba(255,255,255,.05);
  --star-opacity:1; --twinkle:1;
  --planet-a:#7ec8ff; --planet-b:#3f6fc0; --planet-c:#2a3f8f;
  --planet-atmo: rgba(140,200,255,.7);
  --brass:#d9b25a; --brass-dark:#9c7322; --brass-light:#f3da93;
}
body[data-ambiance="nuit"] .panel,
body[data-ambiance="nuit"] .usine-card .plate { color: var(--ink); }

/* ---------- Ambiance PASTEL ---------- */
body[data-ambiance="pastel"] {
  --ink:#5a4a6b; --ink-soft:#8a7c9c;
  --parchment:#fff6fb; --parchment-edge:#f2dcec;
  --sky: linear-gradient(180deg,#ffd6ec 0%, #e0d4ff 30%, #cfe6ff 60%, #d4fbf0 100%);
  --sky-top:#ffd6ec;
  --cloud: rgba(255,255,255,.85);
  --planet-a:#ffc2e2; --planet-b:#b9a8ff; --planet-c:#8fd9ff;
  --planet-atmo: rgba(255,220,245,.9);
  --brass:#d9a6c8; --brass-dark:#b07a9c; --brass-light:#f6d9ec;
}

/* ---------- Reduce motion ---------- */
body.no-motion *, body.no-motion *::before, body.no-motion *::after {
  animation: none !important;
  transition: none !important;
}

/* ============================================================
   STRUCTURE GÉNÉRALE
   ============================================================ */
.wrap { width: min(1200px, 92vw); margin-inline: auto; }
section { position: relative; }

/* Texte courant — lecture facile pilotée par tokens */
p, li, .lead { letter-spacing: var(--body-spacing); word-spacing: var(--body-word); line-height: var(--body-line); }

/* ============================================================
   LOGO / BADGE
   ============================================================ */
.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand-badge {
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--brass-light), var(--brass) 60%, var(--brass-dark));
  display: grid; place-items: center;
  box-shadow: inset 0 2px 4px rgba(255,255,255,.5), 0 4px 10px rgba(0,0,0,.25);
  flex: none;
}
.brand-badge svg { width: 60%; height: 60%; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .04em;
  font-size: 1.15rem; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.35);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem clamp(1rem, 4vw, 2.4rem);
  transition: background .4s ease, backdrop-filter .4s ease;
}
.topbar.scrolled {
  background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,0));
  backdrop-filter: blur(2px);
}
.topbar nav { display: flex; gap: 1.4rem; }
.topbar nav a {
  color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem;
  text-shadow: 0 2px 4px rgba(0,0,0,.4); opacity: .9; transition: opacity .2s, transform .2s;
}
.topbar nav a:hover { opacity: 1; transform: translateY(-2px); }
@media (max-width: 720px){ .topbar nav { display: none; } }

/* ============================================================
   HÉRO
   ============================================================ */
.hero {
  min-height: 100svh; display: grid; place-items: center;
  text-align: center; padding: 7rem 1rem 4rem; overflow: hidden;
}
.hero-inner { position: relative; z-index: 5; max-width: 60rem; }
.kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.9); color: var(--brass-dark);
  font-family: var(--font-display); font-weight: 600;
  padding: .4rem 1rem; border-radius: 999px; font-size: .9rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); letter-spacing: .02em;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.4rem, 12vw, 9rem); line-height: .9; color: #fff;
  margin: 1.2rem 0 .3rem; letter-spacing: .01em;
  text-shadow: 0 4px 0 var(--brass-dark), 0 10px 28px rgba(0,0,0,.35);
}
.hero h1 .accent { color: var(--brass-light); }
.hero-tag {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: #fff; font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,.4); max-width: 34ch; margin: 0 auto;
  text-wrap: balance;
}
.hero-cta {
  margin-top: 2rem; display: inline-flex; align-items: center; gap: .6rem;
  background: linear-gradient(180deg, var(--brass-light), var(--brass));
  color: var(--brass-dark); font-family: var(--font-display); font-weight: 600;
  font-size: 1.15rem; padding: .9rem 1.8rem; border-radius: 999px;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.6), 0 8px 22px rgba(0,0,0,.3);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hero-cta:hover { transform: translateY(-3px) scale(1.03); box-shadow: inset 0 2px 3px rgba(255,255,255,.6), 0 12px 30px rgba(0,0,0,.35); }

/* Planète */
.planet-stage { position: relative; width: clamp(220px, 34vw, 380px); aspect-ratio: 1; margin: 0 auto 1.5rem; }
.planet {
  position: absolute; inset: 0; border-radius: 50%;
  background: #0a1b2e url("../assets/terre.jpg") center center / 132% auto no-repeat;
  box-shadow: inset -14px -16px 42px rgba(0,0,0,.4), inset 10px 10px 26px rgba(255,255,255,.12), 0 24px 60px rgba(0,0,0,.3);
  animation: planetFloat calc(8s / var(--speed)) ease-in-out infinite;
}
@keyframes planetFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.planet::after {
  content: ""; position: absolute; inset: -10%; border-radius: 50%;
  background: radial-gradient(circle, transparent 56%, var(--planet-atmo) 60%, transparent 72%);
  filter: blur(2px); opacity: .8;
}
.planet-ring {
  position: absolute; inset: -16% -2%; border-radius: 50%;
  border: 3px dashed rgba(255,255,255,.55);
  transform: rotateX(74deg) rotate(8deg);
  animation: ringspin calc(24s / var(--speed)) linear infinite;
}
@keyframes spin { to { background-position: 360px 0, 0 0, 0 0, 0 0; } }
@keyframes ringspin { to { transform: rotateX(74deg) rotate(368deg); } }

/* mini-portholes flottants autour de la planète */
.orbiter {
  position: absolute; width: 76px; height: 76px; border-radius: 50%;
  overflow: hidden; border: 4px solid var(--brass);
  box-shadow: 0 8px 20px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.4);
  animation: bob calc(5s / var(--speed)) ease-in-out infinite;
}
.orbiter img { width: 200%; height: 200%; object-fit: cover; object-position: center 30%; transform: translate(-25%, -12%); }
.orbiter.o1 { top: -6%;  left: -14%;  animation-delay: -.2s; }
.orbiter.o2 { top: 12%;  right: -16%; animation-delay: -1.4s; width: 64px; height: 64px; }
.orbiter.o3 { bottom: 2%; left: -18%; animation-delay: -2.6s; width: 60px; height: 60px; }
.orbiter.o4 { bottom: -8%; right: -8%; animation-delay: -3.5s; }

/* Nuages */
.clouds { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cloud {
  position: absolute; background: var(--cloud); border-radius: 100px;
  filter: blur(1px); opacity: .9;
}
.cloud::before, .cloud::after { content:""; position:absolute; background: inherit; border-radius: 50%; }
.cloud.c1 { width: 180px; height: 46px; top: 18%; left: -10%; animation: drift calc(48s / var(--speed)) linear infinite; }
.cloud.c2 { width: 130px; height: 38px; top: 30%; right: -12%; animation: drift-r calc(60s / var(--speed)) linear infinite; }
.cloud.c3 { width: 220px; height: 56px; bottom: 14%; left: -16%; animation: drift calc(72s / var(--speed)) linear infinite; }
.cloud.c1::before{ width:70px;height:70px;top:-30px;left:30px;} .cloud.c1::after{width:50px;height:50px;top:-18px;left:90px;}
.cloud.c2::before{ width:54px;height:54px;top:-22px;left:24px;} .cloud.c2::after{width:40px;height:40px;top:-12px;left:70px;}
.cloud.c3::before{ width:90px;height:90px;top:-40px;left:40px;} .cloud.c3::after{width:64px;height:64px;top:-22px;left:120px;}
@keyframes drift { from{ transform: translateX(0);} to{ transform: translateX(130vw);} }
@keyframes drift-r { from{ transform: translateX(0);} to{ transform: translateX(-130vw);} }

/* Étoiles (visibles la nuit) */
.stars { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: var(--star-opacity); transition: opacity .6s; }
.star { position: absolute; width: 4px; height: 4px; background: #fff; border-radius: 50%; box-shadow: 0 0 6px 1px rgba(255,255,255,.8); animation: twinkle calc(3s / var(--speed)) ease-in-out infinite; }

@keyframes twinkle { 0%,100%{ opacity: calc(.2 * var(--twinkle)); transform: scale(.7);} 50%{ opacity: var(--twinkle); transform: scale(1.2);} }

/* Doodles flottants */
.doodles { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.doodle {
  position: absolute; font-family: var(--font-display); font-weight: 700;
  color: #fff; opacity: .85; text-shadow: 0 3px 8px rgba(0,0,0,.25);
  animation: floaty calc(7s / var(--speed)) ease-in-out infinite;
}
@keyframes floaty { 0%,100%{ transform: translateY(0) rotate(-4deg);} 50%{ transform: translateY(-22px) rotate(5deg);} }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-12px);} }

.scroll-hint {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0,0,0,.4); display: flex; flex-direction: column; align-items: center; gap: .4rem;
  z-index: 5; opacity: .85;
}
.scroll-hint .chev { width: 14px; height: 14px; border-right: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(45deg); animation: nudge calc(1.6s / var(--speed)) ease-in-out infinite; }
@keyframes nudge { 0%,100%{ transform: rotate(45deg) translate(0,0);} 50%{ transform: rotate(45deg) translate(4px,4px);} }

/* ============================================================
   PANNEAUX (signage émaillé)
   ============================================================ */
.intro { padding: clamp(4rem, 9vw, 7rem) 0; }
.panel {
  position: relative; background: var(--parchment);
  border-radius: 28px; padding: clamp(2rem, 5vw, 3.4rem);
  border: 6px solid var(--brass);
  box-shadow: inset 0 0 0 3px var(--parchment-edge), 0 18px 40px rgba(0,0,0,.22);
  color: var(--ink);
}
.panel::before { /* rivets */
  content: ""; position: absolute; inset: 12px; border-radius: 18px;
  border: 2px dotted color-mix(in srgb, var(--brass) 60%, transparent);
  pointer-events: none;
}
.intro .panel { text-align: center; max-width: 56rem; margin-inline: auto; }
.eyebrow {
  font-family: var(--font-display); color: var(--heart); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; font-size: .85rem;
}
h2.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.02; color: var(--ink);
  margin: .5rem 0 1rem; text-wrap: balance;
}
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 48ch; margin: 0 auto; }
.intro .lead + .lead { margin-top: 1rem; }
.intro strong { color: var(--ink); }

/* ============================================================
   CARTE DES USINES (grille)
   ============================================================ */
.factories { padding: clamp(2rem, 6vw, 4rem) 0 6rem; }
.factories-head { text-align: center; margin-bottom: 2.6rem; }
.grid {
  display: grid; gap: clamp(1.2rem, 2.5vw, 1.8rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
}
.usine-card {
  --accent: var(--c-cally); --deep: var(--c-cally-deep);
  position: relative; border-radius: 24px; overflow: hidden; cursor: pointer;
  background: var(--parchment); border: 5px solid var(--accent);
  box-shadow: 0 14px 32px rgba(0,0,0,.2);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
  text-align: left;
  display: flex; flex-direction: column;
}
.usine-card:hover, .usine-card:focus-visible {
  transform: translateY(-10px) scale(1.015);
  box-shadow: 0 26px 50px rgba(0,0,0,.3), 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent);
  outline: none;
}
.usine-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.usine-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.usine-card:hover .usine-photo img { transform: scale(1.07); }
.usine-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--deep) 55%, transparent));
}
.usine-tag {
  position: absolute; top: .8rem; left: .8rem; z-index: 2;
  background: #fff; color: var(--deep); font-weight: 800; font-size: .78rem;
  padding: .3rem .7rem; border-radius: 999px; box-shadow: 0 4px 10px rgba(0,0,0,.2);
  letter-spacing: .01em;
}
.usine-body { padding: 1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.usine-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.7rem;
  color: var(--accent); line-height: 1;
}
.usine-where { font-weight: 800; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.usine-quote { color: var(--ink); font-size: .98rem; font-style: italic; margin-top: .25rem; }
.usine-go {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-display); font-weight: 600; color: #fff; font-size: .9rem;
  background: var(--accent); padding: .5rem 1rem; border-radius: 999px;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: gap .2s ease;
}
.usine-card:hover .usine-go { gap: .8rem; }

/* Couleurs par perso */
.usine-card[data-key="cally"]      { --accent:var(--c-cally);      --deep:var(--c-cally-deep); }
.usine-card[data-key="motus"]      { --accent:var(--c-motus);      --deep:var(--c-motus-deep); }
.usine-card[data-key="paola"]      { --accent:var(--c-paola);      --deep:var(--c-paola-deep); }
.usine-card[data-key="aoutch"]     { --accent:var(--c-aoutch);     --deep:var(--c-aoutch-deep); }
.usine-card[data-key="tisto"]      { --accent:var(--c-tisto);      --deep:var(--c-tisto-deep); }
.usine-card[data-key="tadach"]     { --accent:var(--c-tadach);     --deep:var(--c-tadach-deep); }
.usine-card[data-key="gribouilli"] { --accent:var(--c-gribouilli); --deep:var(--c-gribouilli-deep); }

/* reveal au scroll */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   OVERLAY FICHE PERSONNAGE
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(20,16,40,.55); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.fiche {
  --accent: var(--c-cally); --deep: var(--c-cally-deep);
  position: relative; width: min(960px, 100%); max-height: 90svh; overflow: auto;
  background: var(--parchment); border-radius: 30px; border: 7px solid var(--accent);
  box-shadow: inset 0 0 0 3px var(--parchment-edge), 0 30px 70px rgba(0,0,0,.5);
  display: grid; grid-template-columns: 1.05fr 1fr;
  transform: scale(.92) translateY(20px); transition: transform .4s cubic-bezier(.2,.9,.3,1.1);
}
.overlay.open .fiche { transform: none; }
.fiche-photo { position: relative; overflow: hidden; min-height: 320px; }
.fiche-photo img { width: 100%; height: 100%; object-fit: cover; }
.fiche-photo::after { content:""; position:absolute; inset:0; background: linear-gradient(115deg, transparent 60%, color-mix(in srgb, var(--accent) 30%, transparent)); }
.fiche-body { padding: clamp(1.6rem, 3vw, 2.6rem); display: flex; flex-direction: column; gap: .9rem; }
.fiche-where { font-family: var(--font-display); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-size: .85rem; }
.fiche-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.4rem); color: var(--accent); line-height: .95; }
.fiche-trouble {
  align-self: flex-start; background: var(--accent); color: #fff; font-weight: 800;
  padding: .4rem .9rem; border-radius: 999px; font-size: .88rem;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 45%, transparent);
}
.fiche-quote {
  font-size: 1.15rem; font-style: italic; color: var(--ink);
  border-left: 4px solid var(--accent); padding-left: 1rem; margin: .2rem 0;
}
.fiche-desc { color: var(--ink-soft); font-size: 1.02rem; }
.powers-title { font-family: var(--font-display); font-weight: 600; color: var(--ink); margin-top: .3rem; }
.powers { display: flex; flex-wrap: wrap; gap: .5rem; }
.power {
  background: color-mix(in srgb, var(--accent) 16%, var(--parchment));
  color: var(--deep); font-weight: 700; font-size: .85rem;
  padding: .4rem .8rem; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.fiche-close {
  position: absolute; top: .8rem; right: .8rem; z-index: 4;
  width: 2.7rem; height: 2.7rem; border-radius: 50%;
  background: #fff; color: var(--deep); font-size: 1.4rem; font-weight: 800;
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.3);
  transition: transform .2s; line-height: 1;
}
.fiche-close:hover { transform: rotate(90deg) scale(1.08); }
.fiche-nav { display: flex; justify-content: space-between; gap: .6rem; margin-top: auto; padding-top: .6rem; }
.fiche-nav button {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-display); font-weight: 600; color: var(--ink-soft);
  font-size: .92rem; padding: .5rem .9rem; border-radius: 999px;
  background: color-mix(in srgb, var(--ink-soft) 12%, transparent); transition: color .2s, background .2s, transform .2s;
}
.fiche-nav button:hover { color: var(--accent); transform: translateY(-2px); }

.fiche[data-key="cally"]      { --accent:var(--c-cally);      --deep:var(--c-cally-deep); }
.fiche[data-key="motus"]      { --accent:var(--c-motus);      --deep:var(--c-motus-deep); }
.fiche[data-key="paola"]      { --accent:var(--c-paola);      --deep:var(--c-paola-deep); }
.fiche[data-key="aoutch"]     { --accent:var(--c-aoutch);     --deep:var(--c-aoutch-deep); }
.fiche[data-key="tisto"]      { --accent:var(--c-tisto);      --deep:var(--c-tisto-deep); }
.fiche[data-key="tadach"]     { --accent:var(--c-tadach);     --deep:var(--c-tadach-deep); }
.fiche[data-key="gribouilli"] { --accent:var(--c-gribouilli); --deep:var(--c-gribouilli-deep); }

@media (max-width: 760px) {
  .fiche { grid-template-columns: 1fr; }
  .fiche-photo { aspect-ratio: 4/3; min-height: 0; }
}

/* ============================================================
   FOOTER / MESSAGE FINAL
   ============================================================ */
.outro { padding: 2rem 0 5rem; }
.outro .panel { text-align: center; max-width: 50rem; margin-inline: auto; }
.heart-line { color: var(--heart); font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin-bottom: .6rem; }
.footer { text-align: center; padding: 2.5rem 1rem 3.5rem; }
.footer .brand { justify-content: center; }
.footer .brand-name { color: var(--ink); text-shadow: none; }
.footer small { display: block; margin-top: .8rem; color: var(--ink-soft); }

/* ============================================================
   PANNEAU TWEAKS
   ============================================================ */
.tweaks {
  position: fixed; top: 1rem; right: 1rem; z-index: 100; width: 290px;
  background: #fffdf7; color: #2b2440; border-radius: 18px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
  font-family: "Nunito", sans-serif; display: none; overflow: hidden;
}
.tweaks.show { display: block; }
.tweaks-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; background: #2b2440; color: #fff; }
.tweaks-head h3 { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.05rem; }
.tweaks-close { color: #fff; font-size: 1.3rem; line-height: 1; opacity: .8; }
.tweaks-close:hover { opacity: 1; }
.tweaks-body { padding: 1rem; display: flex; flex-direction: column; gap: 1.1rem; max-height: 80vh; overflow: auto; }
.tw-group > label { display: block; font-weight: 800; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: #6a6280; margin-bottom: .5rem; }
.tw-seg { display: flex; gap: .35rem; background: #efe9dc; padding: .25rem; border-radius: 12px; }
.tw-seg button {
  flex: 1; padding: .5rem .3rem; border-radius: 9px; font-weight: 700; font-size: .82rem; color: #6a6280;
  transition: background .2s, color .2s;
}
.tw-seg button.active { background: #fff; color: #2b2440; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.tw-row { display: flex; align-items: center; justify-content: space-between; }
.tw-row span { font-weight: 700; font-size: .92rem; }
.switch { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #d6cfbf; transition: background .25s; flex: none; }
.switch.on { background: #3f9e4d; }
.switch::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; transition: transform .25s; box-shadow:0 2px 4px rgba(0,0,0,.25); }
.switch.on::after { transform: translateX(20px); }
.tw-hint { font-size: .78rem; color: #8a8398; }

/* ---------- Lien retour au site principal ---------- */
.topbar nav a.back-link {
  background: var(--heart);
  color: #fff;
  padding: .4rem .9rem;
  border-radius: 999px;
  opacity: 1;
  font-weight: 600;
}
.topbar nav a.back-link:hover { filter: brightness(1.05); transform: translateY(-2px); }

/* ---------- Bloc "En construction" ---------- */
.construction {
  max-width: 560px;
  margin: 2rem auto 0;
  text-align: center;
  background: rgba(255,255,255,.9);
  border: 2px dashed var(--brass-dark);
  border-radius: 28px;
  padding: clamp(2rem, 5vw, 3.2rem);
  box-shadow: 0 24px 60px rgba(0,0,0,.12);
}
.construction-emoji { font-size: 3rem; display: block; margin-bottom: .6rem; }
.construction h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--ink);
  margin-bottom: .6rem;
}
.construction p { color: var(--ink-soft); line-height: 1.6; }

/* ---------- Usines "en construction" (cartes visibles, clic off) ---------- */
.usine-card.is-soon { cursor: default; }
.usine-card.is-soon .usine-photo img { filter: grayscale(.35) brightness(.96); }
.usine-card.is-soon:hover { transform: none; }
.usine-soon {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 3;
  background: var(--brass);
  color: var(--ink);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .02em;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.usine-card.is-soon .usine-go { color: var(--ink-soft); opacity: .85; }
