/* =========================================================
   SoenDev : descente dans les abysses
   Bleu canard, corail, formes arrondies comme des coraux.
   Une seule police ronde pour tout le site.
   Deux thèmes : sombre (par défaut) et clair.
   ========================================================= */

:root {
  --f-title: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --f-mono: "Fredoka", "Trebuchet MS", system-ui, sans-serif;

  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --r: 22px;                              /* arrondi des blocs */

  /* --- thème sombre : bleu canard --- */
  color-scheme: dark;
  --ink: #f1fbfa;
  --inv: #03242d;                         /* texte posé sur --ink */
  --muted: rgba(241, 251, 250, .78);
  --line: rgba(241, 251, 250, .34);
  --signal: #ff8a73;                      /* corail */
  --on-signal: #3a0f08;
  --surface: rgba(241, 251, 250, .09);
  --bad: #ffb0a2;
  --ok: #9eeab0;
  --page-bg: linear-gradient(#0b6e7e, #05424f 55%, #021a21);
  --foot-bg: #021a21;
  --water-now: #0b6e7e;                   /* mis à jour par le JS selon la profondeur */
  --water-rgb: 11, 110, 126;
}

/* --- thème clair : lagon ensoleillé --- */
[data-theme="light"] {
  color-scheme: light;
  --ink: #06303c;
  --inv: #fffaf0;
  --muted: rgba(6, 48, 60, .8);
  --line: rgba(6, 48, 60, .3);
  --signal: #e0482f;
  --on-signal: #fff;
  --surface: rgba(255, 255, 255, .55);
  --bad: #b3261e;
  --ok: #17692f;
  --page-bg: linear-gradient(#fffaf0, #dff4f3);
  --foot-bg: #05303d;
  --water-now: #a8ecee;
  --water-rgb: 168, 236, 238;
}
/* Thème clair, une fois assez profond : l'eau fonce, le texte s'inverse */
[data-theme="light"][data-tone="dim"] {
  --ink: #f1fbfa;
  --inv: #03242d;
  --muted: rgba(241, 251, 250, .8);
  --line: rgba(241, 251, 250, .34);
  --signal: #ff8a73;
  --on-signal: #3a0f08;
  --surface: rgba(241, 251, 250, .09);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }

body {
  background: var(--page-bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: color .6s;
}
body.home { background: var(--water-now); }

[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--signal); color: var(--on-signal); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 12px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 18px; background: var(--signal); color: var(--on-signal); font-weight: 600; border-radius: 999px; transition: top .2s; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }

/* ---------- Scène ---------- */

#ocean { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; }

/* Bulles qui remontent et éclatent à chaque palier */
.splash { position: fixed; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; }
.splash i {
  position: absolute; bottom: -40px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  border: 2px solid var(--ink); opacity: 0;
  animation: rise var(--t) cubic-bezier(.3, .6, .4, 1) var(--d) forwards;
}
@keyframes rise {
  0%   { transform: translate(0, 0) scale(.5); opacity: 0; }
  12%  { opacity: .85; }
  80%  { transform: translate(var(--dx), -78vh) scale(1); opacity: .85; }
  88%  { transform: translate(var(--dx), -82vh) scale(1.25); opacity: .6; }
  100% { transform: translate(var(--dx), -84vh) scale(1.9); opacity: 0; }   /* pop ! */
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px clamp(18px, 5vw, 64px);
  padding-top: calc(14px + env(safe-area-inset-top));
}
.is-home .nav { background: linear-gradient(rgba(var(--water-rgb), .92), rgba(var(--water-rgb), 0)); }
.calm .nav { background: linear-gradient(var(--nav-fade, rgba(5, 66, 79, .92)), transparent); }
[data-theme="light"] .calm .nav { --nav-fade: rgba(255, 250, 240, .96); }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.4rem; letter-spacing: -.01em; line-height: 1; }
.logo img { display: block; }
.logo small { font-size: .7rem; font-weight: 400; color: var(--muted); margin-left: 6px; }

.nav nav { display: flex; gap: clamp(14px, 2.4vw, 30px); align-items: center; margin-left: auto; order: 2; }
.nav nav a { font-weight: 500; font-size: 1rem; padding: 8px 2px; position: relative; }
.nav nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 2px; right: 100%; bottom: 3px; height: 3px; border-radius: 3px; background: var(--signal);
  transition: right .3s var(--ease-out);
}
.nav nav a:hover::after, .nav nav a[aria-current]::after { right: 2px; }
.nav .nav-cta { background: var(--signal); color: var(--on-signal); padding: 10px 22px; border-radius: 999px; font-weight: 600; transition: transform .2s var(--ease-pop); }
.nav .nav-cta:hover { transform: translateY(-2px) scale(1.04); }

.nav-tools { display: flex; align-items: center; gap: 8px; order: 3; }
.theme-toggle, .menu-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; cursor: pointer; border-radius: 50%;
  background: transparent; color: var(--ink); border: 2px solid var(--line); transition: border-color .2s, transform .25s var(--ease-pop);
}
.theme-toggle:hover, .menu-btn:hover { border-color: var(--ink); transform: scale(1.08); }
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .i-moon { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-moon { display: block; }
.menu-btn { display: none; position: relative; }
.menu-btn i { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease-out), opacity .2s; }
.menu-btn i:nth-child(1) { top: 15px; } .menu-btn i:nth-child(2) { top: 21px; } .menu-btn i:nth-child(3) { top: 27px; }
.nav.open .menu-btn i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .menu-btn i:nth-child(2) { opacity: 0; }
.nav.open .menu-btn i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Bulle d'Abysse : même langage que les boutons ---------- */

.bubble {
  position: fixed; left: 0; top: 0; z-index: 12;
  width: min(320px, 80vw); padding: 14px 20px 16px;
  background: rgba(var(--water-rgb), .9); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 26px;
  pointer-events: none; opacity: 0; will-change: transform; transition: opacity .45s ease;
}
.bubble.show { opacity: 1; }
.bubble::after {
  content: ""; position: absolute; left: var(--tail, 50%); bottom: -11px; width: 18px; height: 18px;
  transform: translateX(-50%) rotate(45deg); border-radius: 0 0 8px 0;
  background: rgba(var(--water-rgb), .9); border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.bubble-name { display: block; font-size: .8rem; font-weight: 600; color: var(--signal); margin-bottom: 2px; }
.bubble p { font-size: 1rem; line-height: 1.45; min-height: 3em; color: var(--ink); }
.bubble p::after { content: "|"; color: var(--signal); animation: blink 1s steps(1) infinite; margin-left: 2px; }
.bubble.done p::after { content: ""; }

/* ---------- Sections ---------- */

main { position: relative; z-index: 5; }
.section {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 118px clamp(20px, 6vw, 96px) 70px;
  position: relative;
}
.section.right { justify-content: flex-end; padding-right: clamp(110px, 12vw, 180px); }

/* Pas de cartes : le texte est posé directement sur l'eau */
.entry { max-width: 590px; text-shadow: 0 1px 16px rgba(0, 0, 0, .25); }
[data-theme="light"]:not([data-tone="dim"]) .entry { text-shadow: 0 0 16px rgba(255, 255, 255, .7); }
.entry-hero { max-width: min(900px, 64vw); }
.entry-wide { max-width: 760px; }
.entry-form { max-width: 660px; }

h1, h2, h3 { font-family: var(--f-title); font-weight: 600; line-height: 1.08; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 5.2rem); margin-bottom: 24px; letter-spacing: -.025em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 16px; }
h3 { font-size: 1.6rem; }
h1 em { font-style: normal; color: var(--signal); }

.entry p { color: var(--ink); }
.entry p + p, .entry p + .list, .entry p + .ruled, .entry p + .works { margin-top: 14px; }
.lead { font-size: 1.25rem; max-width: 40ch; line-height: 1.5; }

.text-link { color: var(--ink); font-weight: 600; border-bottom: 3px solid var(--signal); border-radius: 2px; transition: color .2s; }
.text-link:hover { color: var(--signal); }

/* ---------- Apparition « pop » ---------- */

.js .home .pop {
  opacity: 0; transform: translateY(38px) scale(.92);
  transition: opacity .45s ease, transform .85s var(--ease-pop);
  transition-delay: calc(var(--i, 0) * 85ms + 120ms);
}
.js .home .section.visible .pop { opacity: 1; transform: none; }
.js .pop-in { opacity: 0; transform: translateY(28px) scale(.95); transition: opacity .45s ease, transform .8s var(--ease-pop); transition-delay: calc(var(--i, 0) * 70ms); }
.js .pop-in.in { opacity: 1; transform: none; }

/* ---------- Boutons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 28px; border-radius: 999px;
  font: 600 1rem var(--f-body);
  cursor: pointer; border: 2px solid transparent;
  transition: transform .2s var(--ease-pop), background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--signal); color: var(--on-signal); }
.btn-primary:hover { transform: translateY(-3px) scale(1.03); }
.btn-primary:active { transform: scale(.98); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--inv); }
.btn-danger { color: var(--bad); border-color: currentColor; background: transparent; }
.btn-danger:hover { background: var(--bad); color: var(--inv); }
.btn-sm { min-height: 40px; padding: 7px 18px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: progress; }

/* ---------- Contenus ---------- */

.ruled { margin: 24px 0 4px; }
.ruled > div { display: grid; grid-template-columns: 11.5rem 1fr; gap: 6px 24px; padding: 16px 0; border-top: 2px solid var(--line); }
.ruled dt { font-weight: 600; font-size: 1.2rem; line-height: 1.2; }
.ruled dd { font-size: 1.02rem; }

.list { list-style: none; margin: 22px 0; display: grid; gap: 12px; }
.list li { position: relative; padding-left: 32px; }
.list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--signal); }

/* Réalisations */
.works { list-style: none; margin-top: 20px; }
.works li + li { margin-top: 12px; }
.work {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 1.6rem; align-items: center; gap: 4px 20px; padding: 18px 22px;
  border: 2px solid var(--line); border-radius: var(--r);
  transition: transform .3s var(--ease-pop), border-color .2s, background .2s;
}
a.work:hover { transform: translateX(8px); border-color: var(--ink); background: var(--surface); }
.work-main { display: grid; gap: 2px; min-width: 0; }
.work-kind { font-size: .9rem; color: var(--signal); font-weight: 500; }
.work strong { font-weight: 600; font-size: 1.5rem; line-height: 1.15; }
.work-desc { font-size: .98rem; }
.work-img { width: 150px; height: 104px; object-fit: cover; border-radius: 18px; background: var(--surface); transition: transform .4s var(--ease-pop); }
a.work:hover .work-img { transform: rotate(-3deg) scale(1.05); }
.work-go { font-size: 1.5rem; font-weight: 600; color: var(--signal); transition: transform .3s var(--ease-pop); }
a.work:hover .work-go { transform: translateX(6px); }

/* Avis */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars svg { fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .55; }
.stars svg.on { fill: var(--signal); stroke: var(--signal); opacity: 1; }
.rating-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.reviews { display: grid; gap: 22px; margin-top: 20px; }
.review { padding: 18px 22px; border: 2px solid var(--line); border-radius: var(--r); }
.review blockquote { margin: 0 0 10px; font-size: 1.12rem; line-height: 1.5; }
.review figcaption { font-size: .92rem; color: var(--muted); }
.review figcaption strong { color: var(--ink); font-weight: 600; }

/* ---------- Formulaire « bouteille à la mer » ---------- */

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bottle { margin-top: 22px; display: grid; gap: 18px; }
.bottle fieldset { border: 0; min-width: 0; display: grid; gap: 14px; }
.bottle legend { font-weight: 600; font-size: 1.7rem; line-height: 1.12; letter-spacing: -.01em; margin-bottom: 14px; padding: 0; text-wrap: balance; }
.hint { font-size: .98rem; color: var(--muted); margin: -6px 0 2px; }

.bottle.stepper fieldset[hidden] { display: none; }
.bottle.stepper fieldset.in { animation: stepIn .55s var(--ease-pop) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(28px) scale(.97); } to { opacity: 1; transform: none; } }
.bottle:not(.stepper) .bottle-nav [data-next], .bottle:not(.stepper) .bottle-nav [data-prev] { display: none; }
.bottle.stepper .bottle-nav [data-send] { display: none; }
.bottle.stepper.last .bottle-nav [data-send] { display: inline-flex; }
.bottle.stepper.last .bottle-nav [data-next] { display: none; }

/* Choix : des galets arrondis */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 12px 22px; border: 2px solid var(--line); border-radius: 999px; font-weight: 500; transition: transform .25s var(--ease-pop), background .2s, border-color .2s, color .2s; }
.chip:hover span { border-color: var(--ink); transform: translateY(-2px); }
.chip input:checked + span { background: var(--signal); color: var(--on-signal); border-color: var(--signal); font-weight: 600; transform: scale(1.05); }
.chip input:focus-visible + span { outline: 3px solid var(--signal); outline-offset: 3px; }

/* Budget = curseur */
.depth-range { display: grid; gap: 12px; padding-top: 6px; }
.depth-range input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: transparent; cursor: grab; }
.depth-range input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--signal), var(--line) 70%); }
.depth-range input[type=range]::-moz-range-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--signal), var(--line) 70%); }
.depth-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; background: var(--signal); border: 4px solid var(--ink); border-radius: 50%; transition: transform .25s var(--ease-pop); }
.depth-range input[type=range]::-moz-range-thumb { width: 22px; height: 22px; background: var(--signal); border: 4px solid var(--ink); border-radius: 50%; }
.depth-range input[type=range]:active::-webkit-slider-thumb { transform: scale(1.25); }
.depth-range input[type=range]:disabled { opacity: .35; }
.ticks { list-style: none; display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); gap: 4px; }
.ticks li { flex: 1; text-align: center; }
.ticks li:first-child { text-align: left; } .ticks li:last-child { text-align: right; }
.depth-range output { font-weight: 600; font-size: 1.7rem; color: var(--signal); }

.field { display: grid; gap: 6px; }
.field > span { font-size: .92rem; font-weight: 500; color: var(--muted); padding-left: 4px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 20px; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: 999px; outline: none; resize: vertical;
  transition: border-color .2s, background .2s;
}
.field textarea { border-radius: 24px; padding: 16px 20px; }
.field select option { background: #03242d; color: #f1fbfa; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--signal); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: .98rem; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin-top: 1px; accent-color: var(--signal); }

.err { color: var(--bad); font-weight: 600; font-size: .95rem; display: none; text-shadow: none; }
.err.show { display: block; }
em.err { font-style: normal; }
.step-status { font-size: .88rem; color: var(--muted); }
.bottle-nav { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.sent { padding: 8px 0; }
.sent p { margin-top: 8px; }
.bottle-svg { display: block; margin: 0 0 14px; transform-origin: 50% 80%; }
.bottle-svg .glass { fill: none; stroke: var(--ink); stroke-width: 3; }
.bottle-svg .cork { fill: var(--signal); }
.bottle-svg .scroll { stroke: var(--signal); stroke-width: 3; stroke-linecap: round; fill: none; }
.sent:not([hidden]) .bottle-svg { animation: bottleIn 1.1s var(--ease-pop) both, bob 3.6s ease-in-out 1.1s infinite; }
@keyframes bottleIn { from { opacity: 0; transform: translateY(-80px) rotate(-40deg) scale(.5); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(6deg); } }

/* ---------- Pied de page & FAQ (toujours sombre : c'est le fond) ---------- */

.footer {
  --ink: #f1fbfa; --muted: rgba(241, 251, 250, .78); --line: rgba(241, 251, 250, .3); --signal: #ff8a73;
  position: relative; z-index: 5; background: var(--foot-bg); color: var(--ink);
  padding: 70px clamp(20px, 6vw, 96px) calc(28px + env(safe-area-inset-bottom));
  border-radius: 40px 40px 0 0;
}
.faq { max-width: 860px; margin-bottom: 52px; }
.faq h2 { margin-bottom: 20px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 2px solid var(--line); border-radius: 22px; padding: 0 22px; transition: border-color .2s; }
.faq-list details[open] { border-color: var(--ink); }
.faq-list summary { cursor: pointer; padding: 16px 36px 16px 0; font-weight: 600; font-size: 1.12rem; line-height: 1.3; list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 500; color: var(--signal); transition: transform .3s var(--ease-pop); }
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p { padding: 0 0 18px; max-width: 68ch; animation: stepIn .45s var(--ease-pop) both; }
.footer-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 28px; font-size: .95rem; color: var(--muted); padding-top: 22px; border-top: 2px solid var(--line); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer a:hover { color: var(--signal); }

@keyframes blink { 50% { opacity: 0; } }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .ruled > div { grid-template-columns: 9.5rem 1fr; }
}

@media (max-width: 820px) {
  body { font-size: 1.05rem; }

  .menu-btn { display: inline-grid; }
  .nav { flex-wrap: wrap; }
  .nav nav {
    display: none; order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 10px 0 0;
    background: rgba(3, 36, 45, .97); border-radius: 26px; padding: 8px; overflow: hidden;
  }
  [data-theme="light"] .nav nav { background: rgba(255, 250, 240, .98); }
  [data-theme="light"][data-tone="dim"] .nav nav { background: rgba(3, 36, 45, .97); }
  .nav.open nav { display: flex; animation: stepIn .35s var(--ease-pop) both; }
  .nav nav a { padding: 15px 18px; border-radius: 18px; }
  .nav nav a:hover { background: var(--surface); }
  .nav nav a::after { display: none; }
  .nav .nav-cta { margin: 8px 6px 6px; text-align: center; }

  /* Profondeur : juste le chiffre */
  .gauge { top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); transform: none; right: 14px; flex-direction: row; }
  .gauge-track { display: none; }
  .gauge-depth { font-size: .85rem; background: rgba(var(--water-rgb), .8); padding: 4px 12px; border-radius: 999px; }

  .section, .section.right { justify-content: center; align-items: flex-end; padding: 46vh 16px 0; }
  .section.hero { padding-top: 38vh; padding-bottom: 60px; }
  .section:last-of-type { padding-bottom: 0; }

  /* Le contenu repose sur une « nappe » d'eau : elle recouvre la bulle d'Abysse (qui passe dessous) */
  .bubble { z-index: 4; width: min(300px, calc(100vw - 32px)); }
  .entry, .entry-hero, .entry-wide, .entry-form {
    max-width: none; width: calc(100% + 32px); margin: 0 -16px; padding: 38px 20px 46px; text-shadow: none;
    background: rgba(var(--water-rgb), .95); border-radius: 34px 34px 0 0;
  }
  .entry-hero { background: none; padding-bottom: 20px; border-radius: 0; }

  .ruled > div { grid-template-columns: 1fr; gap: 2px; }
  .row { grid-template-columns: 1fr; gap: 14px; }
  .actions .btn { flex: 1 1 100%; }
  .bottle legend { font-size: 1.5rem; }
  .work { grid-template-columns: minmax(0, 1fr) auto; padding: 16px 18px; }
  .work-img { grid-column: 1 / -1; width: 100%; height: 150px; order: 5; margin-top: 8px; }
  .work-go { display: none; }
  .footer { padding-top: 54px; border-radius: 30px 30px 0 0; }
}

@media (max-width: 440px) {
  .ticks li:not(:first-child):not(:last-child) { display: none; }
  .logo { font-size: 1.25rem; }
  .logo img { width: 28px; height: 28px; }
  .nav { padding-left: 14px; padding-right: 14px; gap: 10px; }
}



/* =========================================================
   Icônes, ciel, chargement, étapes de profondeur, récif
   ========================================================= */

.i { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em; }
.i-go { transition: transform .25s var(--ease-pop); }
.btn:hover .i-go, .text-link:hover .i-go { transform: translateX(4px); }
.btn .i { width: 1.25em; height: 1.25em; }
.work-go .i { width: 1.4rem; height: 1.4rem; }

/* ---------- Profondeur : un trait avec des étapes cliquables ---------- */
.gauge {
  position: fixed; right: clamp(14px, 2.6vw, 36px); top: 50%; transform: translateY(-50%); z-index: 15;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.gauge-track { position: relative; width: 4px; height: 34vh; border-radius: 4px; background: var(--line); }
.gauge .step {
  position: absolute; left: 50%; top: var(--p); width: 14px; height: 14px; border-radius: 50%;
  transform: translate(-50%, -50%); background: rgb(var(--water-rgb)); border: 3px solid var(--ink);
  transition: transform .25s var(--ease-pop), background .2s;
}
.gauge .step::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
.gauge .step:hover, .gauge .step:focus-visible { transform: translate(-50%, -50%) scale(1.35); background: var(--signal); }
.gauge .step[aria-current] { background: var(--signal); border-color: var(--signal); }
.gauge .step span {
  position: absolute; right: 26px; top: 50%; transform: translateY(-50%) translateX(8px); white-space: nowrap;
  padding: 5px 14px; border-radius: 999px; background: rgba(var(--water-rgb), .92); color: var(--ink); border: 2px solid var(--ink);
  font-size: .9rem; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease-pop);
}
.gauge .step:hover span, .gauge .step:focus-visible span { opacity: 1; transform: translateY(-50%); }
.gauge-dot {
  position: absolute; left: 50%; top: 0%; width: 22px; height: 22px; border-radius: 50%; pointer-events: none;
  background: var(--signal); transform: translate(-50%, -50%); box-shadow: 0 0 0 5px rgba(var(--water-rgb), .6); z-index: 2;
}
.gauge-depth { font-size: .95rem; font-weight: 600; white-space: nowrap; }

/* ---------- Ciel : le héros est aux trois quarts hors de l'eau ---------- */
.sky {
  --sky: linear-gradient(#010b12, #0a2f47 50%, #1d6b8c 82%, #f08f7c 100%);
  --orb: #f6f1d8; --orb-glow: rgba(246, 241, 216, .55);
  position: absolute; top: 0; left: 0; right: 0; height: 100vh; height: 100svh; z-index: 0; overflow: hidden; pointer-events: none;
}
[data-theme="light"] .sky { --sky: linear-gradient(#4cb9e4, #a6e4f2 60%, #d8f6f8); --orb: #fff1a8; --orb-glow: rgba(255, 224, 120, .8); }
.sky-air { position: absolute; inset: 0 0 27% 0; background: var(--sky); }
.orb { position: absolute; right: 16%; top: 16%; width: clamp(56px, 8vw, 104px); aspect-ratio: 1; border-radius: 50%; background: var(--orb); box-shadow: 0 0 70px 14px var(--orb-glow); }
.stars {
  position: absolute; inset: 0 0 20% 0;
  background-image:
    radial-gradient(2px 2px at 24px 38px, #fff, transparent), radial-gradient(1.5px 1.5px at 96px 120px, #fff, transparent),
    radial-gradient(2px 2px at 170px 64px, #fff, transparent), radial-gradient(1.5px 1.5px at 220px 150px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 60px 190px, #fff, transparent);
  background-size: 260px 220px; opacity: .8; animation: twinkle 4s ease-in-out infinite alternate;
}
[data-theme="light"] .stars { display: none; }
.cloud { position: absolute; display: none; height: 34px; border-radius: 40px; background: rgba(255, 255, 255, .92); animation: drift 60s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 44px; height: 44px; left: 18px; top: -22px; }
.cloud::after { width: 30px; height: 30px; right: 20px; top: -14px; }
.cloud.c1 { width: 140px; top: 24%; left: 8%; }
.cloud.c2 { width: 100px; top: 42%; left: 52%; animation-duration: 80s; animation-direction: reverse; }
[data-theme="light"] .cloud { display: block; }
.sky-waves { position: absolute; left: 0; bottom: calc(27% - 3px); width: 200%; height: 54px; }
.sky-waves path { fill: rgb(var(--water-rgb)); }
.sky-waves.w-back { animation: waveMove 16s linear infinite reverse; bottom: calc(27% + 6px); opacity: .55; }
.sky-waves.w-front { animation: waveMove 11s linear infinite; }
@keyframes waveMove { to { transform: translateX(-50%); } }
@keyframes twinkle { from { opacity: .45; } to { opacity: .95; } }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(110vw); } }

.hero { align-items: flex-start; padding-top: clamp(96px, 14vh, 150px); }

/* ---------- Écran de chargement ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; display: none; place-items: center; text-align: center;
  background: radial-gradient(circle at 50% 40%, #0f7a8d, #05424f 70%); color: #f1fbfa;
  clip-path: circle(150% at 50% 55%);
}
.js .loader { display: grid; animation: loaderFailsafe .01s 9s forwards; }
.loader.done { clip-path: circle(0% at 50% 55%); transition: clip-path .95s cubic-bezier(.7, 0, .25, 1); }
@keyframes loaderFailsafe { to { visibility: hidden; } }
.loader-inner { display: grid; justify-items: center; gap: 14px; width: min(320px, 78vw); }
.loader-fish { animation: loaderSwim 2.4s ease-in-out infinite; }
.loader-lure { animation: lurePulse 1.2s ease-in-out infinite; transform-origin: 58px 11px; }
@keyframes loaderSwim { 0%, 100% { transform: translate(-14px, 4px) rotate(-3deg); } 50% { transform: translate(14px, -6px) rotate(3deg); } }
@keyframes lurePulse { 50% { transform: scale(1.5); opacity: .7; } }
.loader-text { font-weight: 500; font-size: 1.15rem; }
.loader-bar { width: 100%; height: 10px; border-radius: 10px; background: rgba(241, 251, 250, .22); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0%; border-radius: 10px; background: #ff8a73; transition: width .35s var(--ease-out); }
.loader-pct { font-size: .9rem; font-weight: 600; opacity: .85; }
html.js.loading { overflow: hidden; }

/* ---------- Récif de coraux au fond ---------- */
.reef { position: relative; z-index: 6; line-height: 0; pointer-events: none; margin-bottom: -1px; }
.reef svg { display: block; width: 100%; height: clamp(120px, 17vw, 250px); }
.reef-floor { fill: var(--foot-bg); stroke: none; }
.sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 5s ease-in-out var(--d, 0s) infinite alternate; }
@keyframes sway { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
.footer { border-radius: 0; margin-top: 0; }

@media (max-width: 820px) {
  .gauge { top: 50%; bottom: auto; transform: translateY(-50%); right: 6px; flex-direction: column; gap: 0; }
  .gauge-track { display: block; height: 30vh; }
  .gauge .step span { display: none; }
  .gauge-depth { display: none; }
  .gauge .step { width: 12px; height: 12px; border-width: 2px; }
  .gauge-dot { width: 18px; height: 18px; }
  .section.hero { padding-top: clamp(86px, 12vh, 120px); padding-bottom: 60px; align-items: flex-start; }
  .sky-air { bottom: 30%; }
  .sky-waves { bottom: calc(30% - 3px); }
  .sky-waves.w-back { bottom: calc(30% + 6px); }
}

/* ---------- Bouton « Réduire les animations » ---------- */
.motion-toggle {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); border: 2px solid var(--line); font: 500 .95rem var(--f-body);
  transition: border-color .2s, background .2s, transform .25s var(--ease-pop);
}
.motion-toggle:hover { border-color: var(--ink); transform: scale(1.04); }
.motion-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.motion-toggle .slash { opacity: 0; transition: opacity .2s; }
.motion-toggle[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.motion-toggle[aria-pressed="true"] .slash { opacity: 1; }
@media (max-width: 1180px) { .motion-toggle .mt-label { display: none; } .motion-toggle { width: 44px; padding: 0; justify-content: center; } }

/* ---------- Animations réduites (choix du bouton ou préférence du système) ---------- */
[data-motion="reduced"] *, [data-motion="reduced"] *::before, [data-motion="reduced"] *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important;
  transition-duration: .01ms !important; transition-delay: 0s !important;
}
[data-motion="reduced"] .splash { display: none; }
[data-motion="reduced"] .sway, [data-motion="reduced"] .stars, [data-motion="reduced"] .cloud,
[data-motion="reduced"] .sky-waves, [data-motion="reduced"] .loader-fish, [data-motion="reduced"] .loader-lure,
[data-motion="reduced"] .water i { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion]) *, html:not([data-motion]) *::before, html:not([data-motion]) *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important;
  }
}

/* ---------- Filets de sécurité : si le JavaScript échoue, le site s'affiche quand même ---------- */
.js .home .pop { animation: popFailsafe .01s 10s forwards; }
@keyframes popFailsafe { to { opacity: 1; transform: none; } }
html.js.loading { animation: unlockScroll .01s 9s forwards; }
@keyframes unlockScroll { to { overflow: visible; } }

html.seen .loader { display: none !important; }
