/* ==========================================================================
   ripol.fr — 2026
   Principe : le « R » reste fixe à gauche, on descend les étages.
   Chaque étage est découpé (clip-path) et contient sa propre couche fixe
   avec le R dans la couleur inverse : le R change de couleur au passage
   d'un étage à l'autre, comme sur l'ancien site, mais compatible iOS.
   ⚠ Ne jamais mettre transform / filter / perspective / will-change / contain
   sur .etage ou ses ancêtres : la couche fixe se mettrait à défiler.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --rouge: #e43524;
  --rouge-vif: #ef4a37;
  --rouge-sombre: #7d2922;
  --bordeaux: #4a1813;
  --creme: #fbf6f2;
  --papier: #fffdfb;
  --encre: #22140f;
  --encre-douce: #5b4740;
  --gris-ligne: rgba(34, 20, 15, .12);

  --f-titre: "Fraunces", Georgia, "Times New Roman", serif;
  --f-texte: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gouttiere: clamp(16px, 4vw, 48px);
  --col-gauche: 0px;          /* place réservée au R (desktop) */
  --rayon: 18px;
  --ease: cubic-bezier(.22, .9, .25, 1);
  --ease-ressort: cubic-bezier(.34, 1.4, .5, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--creme);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f-texte);
  font-size: clamp(16px, 0.35vw + 14.5px, 18px);
  line-height: 1.6;
  color: var(--encre);
  background: var(--creme);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-titre); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--encre); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* ==========================================================================
   Étages + R fixe
   ========================================================================== */

.etage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  clip-path: inset(0);          /* découpe la couche fixe enfant */
  display: flex;
  align-items: center;
  padding: clamp(72px, 10vh, 120px) var(--gouttiere) clamp(110px, 12vh, 140px);
  scroll-margin-top: 0;
}

.etage--rouge {
  background: linear-gradient(150deg, var(--rouge-sombre) 0%, var(--rouge) 46%, var(--rouge-vif) 100%);
  color: #fff;
}
.etage--blanc {
  background:
    radial-gradient(120% 80% at 100% 0%, #fff 0%, transparent 60%),
    var(--creme);
  color: var(--encre);
}

.etage__r {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  /* mobile : filigrane centré */
  background-size: auto 78%;
  background-position: 50% 40%;
  opacity: .11;
}
.etage--rouge .etage__r { background-image: url("../img/r-blanc.png"); opacity: .16; }
.etage--blanc .etage__r { background-image: url("../img/r-rouge.png"); }

.etage__contenu {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
  container: contenu / inline-size;   /* pas un ancêtre de .etage__r : sans risque */
}

/* picto d'étage géant en filigrane, côté droit */
.etage__numero {
  position: absolute;
  z-index: 0;
  right: var(--gouttiere);
  bottom: clamp(16px, 4vh, 40px);
  line-height: 0;
  opacity: .08;
  pointer-events: none;
  user-select: none;
}
.etage__numero svg {
  display: block;
  width: clamp(80px, 15vw, 200px);
  height: clamp(80px, 15vw, 200px);
}

@media (min-width: 900px) {
  :root { --col-gauche: 32vw; }
  .etage { padding-left: calc(var(--col-gauche) + var(--gouttiere)); padding-right: calc(var(--gouttiere) + 80px); }
  /* le R tient entièrement dans la colonne de gauche */
  .etage__r {
    right: auto;
    width: calc(var(--col-gauche) + var(--gouttiere));
    padding: 7vh 1vw 7vh 3vw;
    background-origin: content-box;
    background-size: contain;
    background-position: center;
    opacity: 1;
  }
  .etage--rouge .etage__r { opacity: 1; }
  .etage__contenu { margin-inline: 0 auto; }
}
@media (min-width: 1400px) {
  :root { --col-gauche: 40vw; }
}

/* ==========================================================================
   L'ascenseur (navigation)
   ========================================================================== */

.ascenseur {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(34, 20, 15, .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .08);
  color: #fff;
}
.ascenseur__ecran {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 52px; height: 40px; padding: 0 10px;
  border-radius: 999px;
  background: #0d0806;
  font-family: "Courier New", ui-monospace, monospace;
  font-weight: 700;
  font-size: 20px;
  color: #ff6a55;
  text-shadow: 0 0 8px rgba(255, 90, 70, .8);
}
.ascenseur__fleche { font-size: 11px; transition: transform .4s var(--ease); }
.ascenseur__ecran[data-sens="haut"] .ascenseur__fleche { transform: rotate(180deg); }
.ascenseur__chiffre { display: inline-grid; place-items: center; line-height: 0; }
.ascenseur__chiffre svg { width: 18px; height: 18px; filter: drop-shadow(0 0 4px rgba(255, 90, 70, .9)); }
.ascenseur__chiffre.change { animation: chiffre .35s var(--ease); }
@keyframes chiffre { from { transform: translateY(var(--de, 60%)); opacity: 0; } to { transform: none; opacity: 1; } }

.ascenseur ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.ascenseur a {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  color: rgba(255, 255, 255, .78);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22);
  transition: background .25s, color .25s, box-shadow .25s, transform .15s;
}
.ascenseur a > svg { width: 19px; height: 19px; pointer-events: none; }
.ascenseur a:active { transform: scale(.92); }
.ascenseur a[aria-current="true"] {
  background: var(--rouge);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5), 0 0 14px rgba(228, 53, 36, .7);
}
.ascenseur__label { display: none; }

@media (hover: hover) {
  .ascenseur a:hover { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6); }
}

@media (min-width: 900px) {
  .ascenseur {
    left: auto; bottom: auto;
    right: 24px; top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    border-radius: 30px;
    padding: 8px;
  }
  .ascenseur ol { flex-direction: column; gap: 6px; }
  .ascenseur__ecran { width: 48px; min-width: 0; height: 52px; border-radius: 22px 22px 10px 10px; padding: 0; flex-direction: column; gap: 0; }
  .ascenseur li { position: relative; }
  .ascenseur__label {
    display: block;
    position: absolute; right: calc(100% + 14px); top: 50%;
    transform: translate(6px, -50%);
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(34, 20, 15, .88);
    font-size: 13px; font-weight: 600; letter-spacing: .02em;
    opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .25s var(--ease);
  }
  .ascenseur a:hover .ascenseur__label,
  .ascenseur a:focus-visible .ascenseur__label { opacity: 1; transform: translate(0, -50%); }
}

/* ==========================================================================
   Typo commune des étages
   ========================================================================== */

.surtitre {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  margin-bottom: 14px;
  opacity: .85;
}
.surtitre::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.etage--blanc .surtitre { color: var(--rouge); opacity: 1; }

.titre-etage {
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 500;
  margin-bottom: clamp(18px, 3vh, 28px);
  font-variation-settings: "SOFT" 50, "WONK" 1;
}
.titre-etage em { font-style: italic; font-weight: 400; color: var(--rouge); }
.etage--rouge .titre-etage em { color: #ffd9d2; }

.chapo { font-size: 1.12em; max-width: 60ch; }

/* --------------------------------------------------------------------------
   Bloc « prompt » : texte provisoire à remplacer
   -------------------------------------------------------------------------- */
.prompt {
  position: relative;
  margin: 0 0 1.1em;
  padding: 14px 16px 14px 16px;
  border: 1.5px dashed currentColor;
  border-radius: 12px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  opacity: .82;
  background: rgba(255, 255, 255, .08);
  white-space: normal;
  overflow-wrap: anywhere;
}
.etage--blanc .prompt { background: rgba(228, 53, 36, .04); border-color: rgba(228, 53, 36, .45); color: var(--encre-douce); }
.prompt::before {
  content: "✎ " attr(data-prompt) " · texte à remplacer";
  display: table;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .06em;
  background: var(--encre);
  color: #fff;
}
.etage--rouge .prompt::before { background: #fff; color: var(--rouge-sombre); }

/* ==========================================================================
   Étage 0 — carte de visite 3D
   ========================================================================== */

.etage--accueil .etage__contenu { display: flex; flex-direction: column; align-items: center; text-align: center; }
@media (min-width: 900px) { .etage--accueil .etage__contenu { align-items: flex-start; text-align: left; } }

.accroche {
  font-family: var(--f-titre);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 2vw, 24px);
  margin: 0 0 clamp(18px, 4vh, 36px);
  opacity: .92;
}

.carte-scene {
  width: min(100%, 540px);
  aspect-ratio: 85 / 55;
  perspective: 1400px;
  container-type: inline-size;
}
.carte-incline {
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .5s var(--ease);
}
.carte {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform .9s var(--ease-ressort);
  cursor: pointer;
}
.carte.retournee { transform: rotateY(180deg); }

.carte__face {
  position: absolute; inset: 0;
  border-radius: clamp(12px, 3.2cqi, 20px);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  overflow: hidden;                 /* sur la face seulement, jamais sur .carte */
  text-align: left;
  box-shadow:
    0 1px 1px rgba(0,0,0,.08),
    0 12px 24px -6px rgba(40, 6, 2, .35),
    0 40px 80px -20px rgba(40, 6, 2, .55);
}

/* Recto */
.carte__recto {
  background:
    radial-gradient(140% 120% at 0% 0%, #fff 30%, #f6efea 100%);
  color: var(--encre);
  padding: 7.5cqi 7.5cqi 6cqi;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
}
.carte__recto::after {         /* liseré rouge + reflet */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(115deg, transparent 40%, rgba(255,255,255,.65) 50%, transparent 60%) no-repeat,
    linear-gradient(var(--rouge), var(--rouge)) left top / 1.6cqi 100% no-repeat;
  background-size: 250% 100%, 1.6cqi 100%;
  background-position: var(--reflet, 120%) 0, 0 0;
  pointer-events: none;
}
.carte__nom {
  font-size: 9cqi;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}
.carte__metier {
  margin: 1.4cqi 0 0;
  font-size: 3.1cqi;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rouge);
}
.carte__logo { grid-column: 2; grid-row: 1 / span 2; width: 12cqi; height: auto; margin-top: -1cqi; filter: drop-shadow(0 4px 6px rgba(125,41,34,.25)); }
.carte__coord {
  grid-column: 1 / -1; grid-row: 3;
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.6cqi;
  font-size: 3.7cqi;
  font-weight: 600;
}
.carte__coord a {
  display: inline-flex; align-items: center; gap: 2.4cqi;
  text-decoration: none;
  color: var(--encre);
  border-radius: 6px;
}
.carte__coord a:hover .carte__txt { color: var(--rouge); }
.picto {
  flex: none;
  display: inline-grid; place-items: center;
  width: 6.4cqi; height: 6.4cqi;
  border-radius: 50%;
  background: var(--rouge);
  color: #fff;
}
.picto svg { width: 55%; height: 55%; }
.carte__depuis {
  position: absolute; right: 7.5cqi; bottom: 6cqi;
  font-family: var(--f-titre); font-style: italic;
  font-size: 3.2cqi; color: var(--encre-douce);
}

/* Verso : enveloppe postale + tampon */
.carte__verso {
  transform: rotateY(180deg);
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255,255,255,.035) 14px 28px),
    linear-gradient(150deg, var(--rouge-sombre) 0%, var(--rouge) 60%);
  color: #fff;
  padding: 6.5cqi 7.5cqi;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr auto;
}
.verso__adresse {
  grid-column: 1; grid-row: 1;
  align-self: end;
  font-style: normal;
  font-family: var(--f-titre);
  font-size: 4.6cqi;
  line-height: 1.35;
}
.verso__adresse strong { display: block; font-weight: 600; font-size: 1.15em; margin-bottom: .3em; }
.verso__adresse .ligne-ecrite {
  display: block;
  border-bottom: 1px solid rgba(255,255,255,.35);
  padding-bottom: .1em; margin-bottom: .25em;
  font-style: italic;
}
.verso__timbre {
  grid-column: 2; grid-row: 1;
  position: relative;
  width: 22cqi;
  align-self: start;
}
.timbre {
  display: block;
  width: 19cqi; height: auto;
  margin-left: auto;
  transform: rotate(4deg);
  filter: drop-shadow(0 .8cqi 1.2cqi rgba(0,0,0,.25));
}
.tampon {
  position: absolute;
  left: -15cqi; top: 11cqi;
  width: 34cqi; height: auto;
  color: rgba(255, 255, 255, .78);
  transform: rotate(-14deg);
  mix-blend-mode: screen;
}
.verso__actions {
  grid-column: 1 / -1; grid-row: 2;
  display: flex; flex-wrap: wrap; gap: 2cqi;
  margin-top: 3.5cqi;
}
.verso__actions a {
  display: inline-flex; align-items: center; gap: 1.4cqi;
  padding: 1.6cqi 3cqi;
  border-radius: 999px;
  background: #fff; color: var(--rouge-sombre);
  font-size: 3.1cqi; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.verso__actions a.secondaire { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); }
.verso__actions svg { width: 3.6cqi; height: 3.6cqi; }
.verso__gps {
  position: absolute; right: 7.5cqi; bottom: 6.5cqi;
  font-family: ui-monospace, Consolas, monospace; font-size: 2.4cqi; opacity: .7; text-align: right;
}

/* Boutons sous la carte */
.carte-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: clamp(20px, 4vh, 32px);
}
@media (min-width: 900px) { .carte-actions { justify-content: flex-start; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s var(--ease), background .2s, color .2s, box-shadow .2s;
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.96); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--blanc { background: #fff; color: var(--rouge-sombre); box-shadow: 0 8px 20px -6px rgba(0,0,0,.35); }
.btn--contour { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn--rouge { background: var(--rouge); color: #fff; box-shadow: 0 8px 20px -8px rgba(228,53,36,.8); }
/* États de survol (souris) et de focus (clavier) */
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn:hover svg { animation: secoue .5s var(--ease); }
}
@keyframes secoue { 25% { transform: rotate(-12deg); } 60% { transform: rotate(10deg); } }
.btn--blanc:hover, .btn--blanc:focus-visible {
  background: var(--encre); color: #fff;
  box-shadow: 0 12px 26px -8px rgba(0,0,0,.5);
}
.btn--contour:hover, .btn--contour:focus-visible {
  background: #fff; color: var(--rouge-sombre); box-shadow: inset 0 0 0 2px #fff, 0 12px 26px -8px rgba(0,0,0,.4);
}
.btn--rouge:hover, .btn--rouge:focus-visible { background: var(--rouge-sombre); }
@media (hover: none) { .btn:hover { transform: none; } }
.btn-retourner svg { transition: transform .6s var(--ease); }
.btn-retourner[aria-pressed="true"] svg { transform: rotate(180deg); }

.descendre {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  margin-top: clamp(28px, 6vh, 56px);
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; opacity: .85;
}
.descendre span { display: block; width: 2px; height: 34px; background: linear-gradient(currentColor, transparent); animation: descend 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes descend { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ==========================================================================
   Étage 1 — métiers
   ========================================================================== */

.depuis {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin: 0 0 clamp(20px, 3vh, 32px);
}
.depuis__annees {
  font-family: var(--f-titre);
  font-size: clamp(64px, 10vw, 120px);
  font-weight: 300;
  line-height: .9;
  color: var(--rouge);
  font-variant-numeric: tabular-nums;
}
.depuis__txt { font-weight: 600; max-width: 22ch; line-height: 1.35; }
.depuis__txt b { color: var(--rouge); }

.metiers {
  list-style: none; margin: 0 0 clamp(24px, 4vh, 40px); padding: 0;
  display: grid; gap: 14px;
}
@container contenu (min-width: 600px) { .metiers { grid-template-columns: 1fr 1fr; } }

.metier {
  position: relative;
  padding: 22px 20px 8px;
  border-radius: var(--rayon);
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 10px 30px -14px rgba(74, 24, 19, .35);
  border: 1px solid var(--gris-ligne);
}
.metier--ia {
  background: linear-gradient(160deg, rgba(34,20,15,.94), rgba(74,24,19,.94));
  color: #fff;
  border-color: transparent;
}
.metier--ia .prompt { color: #f1dcd6; border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.05); }
.metier--ia .prompt::before { background: #fff; color: var(--encre); }
.metier__icone {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--rouge); color: #fff;
  margin-bottom: 14px;
}
.metier__icone svg { width: 24px; height: 24px; }
.metier h3 { font-size: 24px; margin-bottom: 6px; }
.metier__alias { font-size: 13px; font-weight: 600; color: var(--encre-douce); margin: 0 0 10px; }
.metier--ia .metier__alias { color: #f3b9ae; }
.tags { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: 12.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(228, 53, 36, .1); color: var(--rouge-sombre);
}
.metier--ia .tags li { background: rgba(255,255,255,.12); color: #fff; }
.badge-new {
  position: absolute; top: 18px; right: 18px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--rouge); color: #fff;
}

/* bloc CMS */
.cms {
  position: relative;
  padding: clamp(22px, 3vw, 32px);
  border-radius: calc(var(--rayon) + 4px);
  background: var(--papier);
  border: 1px solid var(--gris-ligne);
  box-shadow: 0 20px 50px -30px rgba(74, 24, 19, .5);
}
.cms h3 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 14px; }
.cms h3 em { color: var(--rouge); font-style: italic; font-weight: 400; }
.atouts { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.atouts li {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px;
  border: 1.5px solid rgba(228,53,36,.35); color: var(--rouge-sombre);
}
.atouts svg { width: 15px; height: 15px; }

/* ==========================================================================
   Étage 2 — références
   ========================================================================== */

.secteurs { display: grid; gap: 14px; margin-bottom: clamp(22px, 4vh, 36px); }
@container contenu (min-width: 620px) { .secteurs { grid-template-columns: 1fr 1fr; } }
.secteur {
  padding: 20px;
  border-radius: var(--rayon);
  background: rgba(34, 20, 15, .18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.secteur h3 { font-size: 22px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.secteur h3 svg { width: 22px; height: 22px; flex: none; }
.secteur .tags li { background: rgba(255,255,255,.14); color: #fff; }

.vitrine {
  display: grid;
  border-radius: calc(var(--rayon) + 4px);
  overflow: hidden;
  background: #fff;
  color: var(--encre);
  text-decoration: none;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
@container contenu (min-width: 600px) { .vitrine { grid-template-columns: 1.1fr 1fr; } }
@media (hover: hover) { .vitrine:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -30px rgba(0,0,0,.7); } }
.navigateur { background: #eee6e2; display: flex; flex-direction: column; }
.navigateur__barre {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  font-size: 11.5px; font-weight: 600; color: var(--encre-douce);
}
.navigateur__barre i { width: 9px; height: 9px; border-radius: 50%; background: #d9cbc5; }
.navigateur__barre i:first-child { background: var(--rouge); }
.navigateur__barre span { margin-left: 8px; padding: 3px 10px; border-radius: 999px; background: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* images carrées, visibles en entier */
.navigateur img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.vitrine__txt { padding: clamp(18px, 2.4vw, 28px); }
.vitrine__txt h3 { font-size: 26px; margin-bottom: 4px; }
.vitrine__type { font-size: 13px; font-weight: 700; color: var(--rouge); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; }
.vitrine__lien { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--rouge); }
.vitrine__lien svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.vitrine:hover .vitrine__lien svg { transform: translate(3px, -3px); }

.confidentiel {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 18px 0 0;
  font-size: 14.5px;
  opacity: .92;
}
.confidentiel svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }

/* ==========================================================================
   Étage 3 — bénévolat + contact
   ========================================================================== */

.benevolat { display: grid; gap: 16px; margin-bottom: clamp(36px, 7vh, 64px); }
@container contenu (min-width: 620px) { .benevolat { grid-template-columns: 1fr 1fr; } }
.benevolat .vitrine { grid-template-columns: 1fr; box-shadow: 0 24px 50px -30px rgba(74, 24, 19, .55); border: 1px solid var(--gris-ligne); }
.benevolat .vitrine__type { color: var(--rouge-sombre); }

/* logos des sites bénévoles, centrés sur leur couleur de fond */
.logo-site { overflow: hidden; }
.navigateur .logo-site img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.logo-site--webamag { background: #f6e6c4; }
.logo-site--dondusang { background: #266caa; }

.coeur { color: var(--rouge); animation: battement 1.4s infinite; display: inline-block; }
@keyframes battement { 0%, 40%, 100% { transform: scale(1); } 20% { transform: scale(1.18); } }

/* contact final */
.contact {
  position: relative;
  border-radius: calc(var(--rayon) + 6px);
  padding: clamp(24px, 4vw, 40px);
  background: linear-gradient(150deg, var(--rouge-sombre), var(--rouge) 70%);
  color: #fff;
  display: grid; gap: 22px;
  box-shadow: 0 30px 60px -30px rgba(125, 41, 34, .8);
}
@container contenu (min-width: 600px) { .contact { grid-template-columns: 1fr auto; align-items: center; } }
.contact .prompt { color: #fff; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.08); }
.contact .prompt::before { background: #fff; color: var(--rouge-sombre); }
.contact h2 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 500; margin-bottom: 10px; }
.contact h2 em { font-style: italic; font-weight: 300; }
.contact__boutons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.qr {
  display: none;
  background: #fff; color: var(--encre);
  padding: 14px; border-radius: 16px; text-align: center;
  font-size: 12px; font-weight: 700; line-height: 1.3;
  justify-self: start;
}
.qr__code { width: 132px; height: 132px; margin: 0 auto 8px; image-rendering: pixelated; }
@media (min-width: 900px) and (hover: hover) { .qr { display: block; } }

.pied {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; align-items: center;
  font-size: 13.5px; color: var(--encre-douce);
}
.pied button, .pied a {
  font: inherit; color: inherit; background: none; border: 0; padding: 4px 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.pied nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ==========================================================================
   Mentions légales (dialog)
   ========================================================================== */
.mentions {
  width: min(640px, calc(100vw - 32px));
  max-height: min(80vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--encre);
  background: var(--papier);
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
}
.mentions::backdrop { background: rgba(34, 20, 15, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.mentions[open] { animation: ouvrir .35s var(--ease); }
@keyframes ouvrir { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.mentions__corps { padding: 28px clamp(20px, 4vw, 36px) 24px; font-size: 15px; }
.mentions h2 { font-size: 30px; margin-bottom: 16px; }
.mentions h3 { font-family: var(--f-texte); font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rouge); margin: 20px 0 6px; }
.a-completer { background: #fff1c2; padding: 0 4px; border-radius: 4px; }
.mentions__fermer {
  position: sticky; top: 0; float: right;
  margin: 12px 12px 0 0;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--creme); color: var(--encre); font-size: 22px; cursor: pointer;
}

/* ==========================================================================
   Apparitions au défilement
   ========================================================================== */
.js .apparait { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .apparait.vu { opacity: 1; transform: none; }

/* Entrée de la carte */
.js .carte-scene { opacity: 0; transform: translateY(30px) rotateX(18deg); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.js.pret .carte-scene { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .js .apparait, .js .carte-scene { opacity: 1; transform: none; transition: none; }
  .carte-incline { transition: none; transform: none !important; }
  /* fondu au lieu de rotation */
  .carte { transform: none !important; transition: none; }
  .carte__face { transition: opacity .4s; }
  .carte__verso { transform: none; opacity: 0; }
  .carte.retournee .carte__recto { opacity: 0; }
  .carte.retournee .carte__verso { opacity: 1; }
}

/* ==========================================================================
   Petits écrans
   ========================================================================== */
@media (max-width: 899px) {
  .etage { align-items: flex-start; }
  .etage--accueil { align-items: center; }
}
@media (max-width: 420px) {
  .verso__gps { display: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .etage { min-height: auto; }
}

@media print {
  .ascenseur, .carte-actions, .descendre, .prompt::before { display: none; }
  .etage { min-height: auto; clip-path: none; break-inside: avoid; }
  .etage__r { display: none; }
}
