/* APIT-MOL — la page du club de plongée de l'Empire.
   Page à part : elle ne prend ni l'en-tête, ni le pied, ni styles/empire.css.
   Plus on descend, plus le fond s'assombrit (apit-mol.js) ; la scène 3D
   (abyss-scene.js) flotte au-dessus du contenu, sans capter les clics. */

:root {
  --abysse: #03121a;
  --texte: #e7f0ee;
  --texte-2: #d5e4e2;
  --mono-2: #a9c2c0;
  --menthe: #9fe3d8;
  --jauge: #FFEF00;
  --erreur: #ffb4a8;
  --panneau: rgba(2, 12, 18, 0.55);
  --filet: rgba(159, 227, 216, 0.25);
  --cote: clamp(20px, 6vw, 96px);
  --serif: 'Instrument Serif', serif;
  --mono: 'IBM Plex Mono', monospace;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; padding: 0; background: var(--abysse); color: var(--texte); }
body { font-family: Archivo, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--menthe); text-decoration: none; }
a:hover { color: var(--texte); }
::selection { background: var(--menthe); color: var(--abysse); }
input::placeholder { color: #5f7f80; }
img { display: block; }
em { color: var(--menthe); }

.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------------------------------------------------------- */
/* Fond, scène, en-tête, jauge                                       */
/* ---------------------------------------------------------------- */

.fond-profondeur {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 120% 80% at 50% -10%, oklch(0.5 0.09 215) 0%, oklch(0.22 0.05 228) 55%, oklch(0.12 0.03 235) 100%);
}
apit-abyss { position: fixed; inset: 0; z-index: 5; pointer-events: none; display: block; }

.entete {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(18px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(2, 12, 18, 0.55), rgba(2, 12, 18, 0));
}
.entete__marque { display: flex; align-items: center; gap: 12px; color: var(--texte); }
.entete__marque img { width: 44px; height: 44px; }
.entete__marque span { font-family: var(--mono); font-size: 13px; letter-spacing: 0.18em; white-space: nowrap; }
.entete__retour {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--texte); border: 1px solid rgba(159, 227, 216, 0.45); padding: 10px 16px; border-radius: 999px;
  background: rgba(2, 12, 18, 0.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.entete__retour:hover { background: var(--menthe); color: var(--abysse); border-color: var(--menthe); }
@media (max-width: 560px) { .entete__retour-long { display: none; } }

.hud {
  position: fixed; right: clamp(18px, 4vw, 48px); bottom: 24px; z-index: 20;
  font-family: var(--mono); pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right;
}
.hud__titre { font-size: 11px; letter-spacing: 0.2em; color: var(--menthe); }
.hud__valeur { display: flex; align-items: baseline; gap: 6px; }
.hud__metres { font-size: 44px; line-height: 1; color: var(--texte); font-variant-numeric: tabular-nums; }
.hud__unite { font-size: 16px; color: var(--menthe); }
.hud__etape { font-size: 11px; letter-spacing: 0.2em; color: var(--mono-2); text-transform: uppercase; }

.jauge {
  position: fixed; right: clamp(14px, 2.4vw, 32px); top: 50%; transform: translateY(-50%);
  height: 42vh; width: 24px; z-index: 20; pointer-events: none;
}
.jauge__rail { position: absolute; left: 11px; top: 0; bottom: 0; width: 1px; background: rgba(159, 227, 216, 0.3); }
.jauge__graduations { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.jauge__graduations span { width: 24px; height: 1px; background: rgba(159, 227, 216, 0.5); }
.jauge__graduations span:nth-child(even) { width: 12px; margin-left: 6px; background: rgba(159, 227, 216, 0.35); }
.jauge__repere {
  position: absolute; left: 5px; top: 0%; width: 13px; height: 13px; margin-top: -6px; border-radius: 50%;
  background: var(--jauge); box-shadow: 0 0 14px rgba(255, 239, 0, 0.7);
}

main { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- */
/* Textes communs                                                    */
/* ---------------------------------------------------------------- */

.surtitre { font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; color: var(--menthe); text-transform: uppercase; }
.paragraphe { margin: 0; font-size: 18px; line-height: 1.6; color: var(--texte-2); text-wrap: pretty; }
.titre { margin: 0; font-family: var(--serif); font-weight: 400; }

/* Une photo pleine largeur, fondue dans le fond en haut et en bas. */
.photo-fond {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.voile { position: absolute; inset: 0; }

/* ---------------------------------------------------------------- */
/* 1. Surface                                                        */
/* ---------------------------------------------------------------- */

.surface {
  position: relative; min-height: 100vh; display: flex; align-items: flex-end;
  padding: 140px var(--cote) 120px; box-sizing: border-box; overflow: hidden;
}
.surface .photo-fond {
  object-position: center 30%; opacity: 0.7;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 35%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 35%, transparent 100%);
}
.surface .voile { background: linear-gradient(90deg, rgba(2, 14, 22, 0.75) 0%, rgba(2, 14, 22, 0.35) 55%, rgba(2, 14, 22, 0) 100%); }
.surface__contenu { position: relative; max-width: 760px; display: flex; flex-direction: column; gap: 28px; }
.surface h1 {
  font-size: clamp(60px, 9.5vw, 156px); line-height: 0.88; letter-spacing: -0.01em;
  text-shadow: 0 2px 40px rgba(2, 14, 22, 0.6);
}
.surface .paragraphe { max-width: 460px; line-height: 1.55; }
.eaux {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; color: var(--mono-2); text-transform: uppercase;
}
.eaux i { width: 24px; height: 1px; background: var(--menthe); }
.descendre {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.28em; color: var(--texte);
}
.descendre i { width: 1px; height: 48px; background: linear-gradient(180deg, var(--menthe), rgba(159, 227, 216, 0)); }

/* ---------------------------------------------------------------- */
/* 2. Emblème                                                        */
/* ---------------------------------------------------------------- */

.embleme {
  position: relative; min-height: 110vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 40px; padding: 120px 20px; box-sizing: border-box;
}
.embleme__logo { position: relative; width: min(84vw, 78vh, 760px); aspect-ratio: 1 / 1; }
.embleme__halo {
  position: absolute; inset: -12%; border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 227, 216, 0.22) 0%, rgba(159, 227, 216, 0.06) 45%, rgba(159, 227, 216, 0) 70%);
}
.embleme__logo img { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 30px 80px rgba(0, 0, 0, 0.55)); }
.embleme__legende { font-family: var(--mono); font-size: 12px; letter-spacing: 0.28em; color: var(--menthe); text-align: center; }

/* ---------------------------------------------------------------- */
/* 3–6. Techniques                                                   */
/* ---------------------------------------------------------------- */

.technique {
  position: relative; min-height: 110vh; display: flex; align-items: center;
  padding: 140px var(--cote); box-sizing: border-box; overflow: hidden;
}
.technique .voile { background: linear-gradient(90deg, rgba(2, 14, 22, 0.9) 0%, rgba(2, 14, 22, 0.6) 42%, rgba(2, 14, 22, 0.05) 80%); }
.technique--profonde .voile { background: linear-gradient(90deg, rgba(2, 14, 22, 0.92) 0%, rgba(2, 14, 22, 0.65) 42%, rgba(2, 14, 22, 0.1) 80%); }
#recycleur .voile { background: linear-gradient(90deg, rgba(2, 14, 22, 0.92) 0%, rgba(2, 14, 22, 0.68) 42%, rgba(2, 14, 22, 0.1) 80%); }
.technique__contenu { position: relative; max-width: 540px; display: flex; flex-direction: column; gap: 24px; }
.technique h2 { font-size: clamp(84px, 12vw, 184px); line-height: 0.85; }
#recycleur h2 { font-size: clamp(72px, 10.5vw, 168px); }
.fiche {
  display: grid; grid-template-columns: auto 1fr; column-gap: 28px; margin: 0;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em;
}
.fiche dt, .fiche dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--filet); }
.fiche dt { color: var(--menthe); }
.fiche dt:nth-last-of-type(1), .fiche dd:nth-last-of-type(1) { border-bottom: 1px solid var(--filet); }

/* Sur mobile, les objets 3D passent sur le texte : la photo s'efface. */
@media (max-width: 720px) {
  .technique .photo-fond { opacity: 0.35 !important; }
}

/* ---------------------------------------------------------------- */
/* 7. Instructeur                                                    */
/* ---------------------------------------------------------------- */

.instructeur {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 140px var(--cote); box-sizing: border-box;
}
.instructeur__grille {
  width: 100%; max-width: 1180px; margin: 0 auto; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(40px, 6vw, 96px); align-items: center;
}
.instructeur__portrait {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(159, 227, 216, 0.5), 0 0 0 14px rgba(3, 18, 26, 0.6), 0 0 0 15px rgba(159, 227, 216, 0.25), 0 40px 120px rgba(0, 0, 0, 0.6);
}
.instructeur__texte { display: flex; flex-direction: column; gap: 28px; }
.instructeur h2 { font-size: clamp(64px, 8vw, 128px); line-height: 0.88; }
.instructeur .paragraphe { max-width: 460px; }
.brevets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.brevets li {
  display: grid; grid-template-columns: 48px 1fr 72px; align-items: center; column-gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--filet);
}
.brevets li:last-child { border-bottom: 1px solid var(--filet); }
.brevets__numero { font-family: var(--mono); font-size: 12px; color: var(--menthe); }
.brevets__titre { font-size: 22px; font-weight: 500; }
.brevets img { width: 72px; height: 52px; object-fit: contain; }

/* ---------------------------------------------------------------- */
/* 8. Carnet de plongée                                              */
/* ---------------------------------------------------------------- */

.galerie { position: relative; padding: 80px 0 120px; display: flex; flex-direction: column; gap: 32px; }
.galerie__tete {
  padding: 0 var(--cote); display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.galerie h2 { font-size: clamp(48px, 6vw, 88px); line-height: 0.9; }
.galerie__indice { font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; color: var(--mono-2); }
.galerie__bande {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--cote) 12px; scrollbar-width: none;
}
.galerie__bande::-webkit-scrollbar { display: none; }
.galerie__bande img {
  height: 58vh; min-height: 300px; aspect-ratio: 3 / 2; object-fit: cover;
  flex: none; scroll-snap-align: start; border-radius: 4px;
}
.galerie__bande img.portrait { aspect-ratio: 3 / 4; }

/* ---------------------------------------------------------------- */
/* 9. Le club                                                        */
/* ---------------------------------------------------------------- */

.club {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 140px 20px; box-sizing: border-box;
}
.club__colonne { width: 100%; max-width: 500px; display: flex; flex-direction: column; gap: 32px; }
.club__tete { display: flex; flex-direction: column; gap: 18px; text-align: center; align-items: center; }
.club__tete img { width: 96px; height: 96px; }
.club h2 { font-size: clamp(56px, 7vw, 96px); line-height: 0.9; }

.carte {
  background: var(--panneau); border: 1px solid rgba(159, 227, 216, 0.22); border-radius: 6px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.formulaire { display: flex; flex-direction: column; gap: 26px; padding: 36px clamp(20px, 4vw, 40px); }
.formulaire[hidden], .merci[hidden] { display: none; }
.champ { display: flex; flex-direction: column; gap: 8px; }
.champ__label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--menthe); }
.champ input {
  background: transparent; border: 0; border-bottom: 1px solid rgba(159, 227, 216, 0.4); border-radius: 0;
  color: var(--texte); font: inherit; font-size: 18px; padding: 10px 0; outline: none;
}
.champ input:focus { border-bottom-color: var(--menthe); }
.consentement { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.consentement input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--menthe); flex: none; cursor: pointer; }
.consentement span { font-size: 15px; line-height: 1.5; color: var(--texte-2); }
.verification { min-height: 65px; }
.formulaire__erreur { font-family: var(--mono); font-size: 12px; color: var(--erreur); }
.formulaire__erreur:empty { display: none; }
.formulaire button {
  appearance: none; border: 0; cursor: pointer; background: var(--menthe); color: var(--abysse);
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.2em;
  padding: 18px 24px; border-radius: 999px; transition: background 0.2s;
}
.formulaire button:hover { background: var(--texte); }
.formulaire button:disabled { opacity: 0.6; cursor: progress; }

.merci {
  display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center;
  padding: 44px 32px; border-color: rgba(159, 227, 216, 0.35);
}
.merci__nom { margin: 0; font-family: var(--serif); font-size: 36px; line-height: 1.1; }
.merci p:last-child { margin: 0; font-size: 16px; line-height: 1.6; color: var(--texte-2); }

/* ---------------------------------------------------------------- */
/* Pied                                                              */
/* ---------------------------------------------------------------- */

.pied {
  position: relative; padding: 56px var(--cote) 40px; border-top: 1px solid rgba(159, 227, 216, 0.18);
  display: flex; flex-direction: column; gap: 28px; align-items: flex-start; background: rgba(1, 8, 12, 0.6);
}
.pied__identite { display: flex; gap: 20px; align-items: center; }
.pied__identite img { width: 64px; height: 64px; flex: none; }
.pied__textes { display: flex; flex-direction: column; gap: 6px; }
.pied__nom { font-size: 15px; font-weight: 500; letter-spacing: 0.04em; }
.pied__mentions { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--mono-2); line-height: 1.6; }
.pied__retour { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
