/* =========================================================
   nouveau menu du haut uniquement (inspiration augen.pro)
   Le reste du site est inchangé. Copie locale.
   ========================================================= */
:root {
  --pill-bg: rgba(24, 24, 24, .72);
  --pill-line: rgba(255, 255, 255, .08);
  --pill-hover: rgba(255, 255, 255, .08);
}
:root[data-theme="light"] {
  --pill-bg: rgba(232, 232, 232, .82);
  --pill-line: rgba(0, 0, 0, .06);
  --pill-hover: rgba(0, 0, 0, .06);
}

/* Le menu garde sa place en haut, mais devient léger et flottant */
.hdr.hdr2 { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; pointer-events: none; }
.hdr2-in { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block: 8px; }
.hdr2-in > * { pointer-events: auto; }
.hdr2-l, .hdr2-r { display: flex; align-items: center; gap: 8px; }
.brand2 { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; border-radius: 999px; }
@media (min-width: 540px) { .brand2 { padding-right: 18px; background: var(--pill-bg); border: 1px solid var(--pill-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); } .brand2 .brand-dot { width: 46px; height: 46px; border: 0; background: none; backdrop-filter: none; } }
.brand-word { font-weight: 600; font-size: 0.9375rem; letter-spacing: .12em; color: var(--white); }
.brand2:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

.brand-dot { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--pill-bg); border: 1px solid var(--pill-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background-color .2s ease; }
.brand-dot svg { width: 22px; height: auto; fill: var(--white); }
.brand2:hover .brand-dot { background: var(--anth); }

.pill-nav { display: none; }
.pill-nav .lnk { display: flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 8px; color: var(--silver); font-size: 1rem; font-weight: 400; transition: color .2s ease, background-color .2s ease; }
.pill-nav .lnk:hover { color: var(--white); background: var(--pill-hover); }
.pill-nav .lnk:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

.hdr2 .hdr-cta { margin-left: 0; min-height: 48px; border-radius: 12px; }
.hdr2 .theme-tg, .hdr2 .burger { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--pill-line); background: var(--pill-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hdr2 .drawer { top: calc(100% + 4px); }

@media (max-width: 539px) { .brand-word { display: none; } }
@media (min-width: 540px) { .hdr2-in { padding-block: 16px; } }
@media (min-width: 1024px) {
  .hdr2-in { display: grid; grid-template-columns: 1fr auto 1fr; }
  .hdr2-l { grid-column: 1; }
  .pill-nav { grid-column: 2; }
  .hdr2-r { grid-column: 3; justify-self: end; }
  .hdr2 .hdr-cta { display: inline-flex; }
  .hdr2 .hdr-cta .cta-s { display: none; }
  .hdr2 .hdr-cta .cta-l { display: inline; }
  .pill-nav { display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: 12px; background: var(--pill-bg); border: 1px solid var(--pill-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .hdr2 .drawer { right: var(--gutter); }
}

/* Voile doux derrière le menu : le texte qui défile dessous reste lisible, sans barre pleine */
.hdr.hdr2::before { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: -24px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--black) 96%, transparent) 0%, color-mix(in srgb, var(--black) 82%, transparent) 60%, transparent 100%); }

/* =========================================================
   nouvelle première impression (inspiration : visuel plein cadre)
   ========================================================= */
.hero3 { position: relative; margin-top: calc(-1 * var(--hdr-real, 64px)); padding: 8px; }
.hero3-frame { position: relative; isolation: isolate; display: flex; align-items: flex-end; justify-content: center; min-height: calc(100svh - 16px); border-radius: 16px; overflow: hidden; background: #050505; color: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.hero3-bgw { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero3-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 28% 50%; 
  animation: hero3-drift 24s ease-in-out infinite alternate; }
@keyframes hero3-drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
.hero3-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 62% at 50% 100%, rgba(5,5,5,.96) 0%, rgba(5,5,5,.82) 40%, rgba(5,5,5,.35) 70%, rgba(5,5,5,0) 100%),
    linear-gradient(to bottom, rgba(5,5,5,.55) 0%, rgba(5,5,5,0) 22%, rgba(5,5,5,0) 50%, rgba(5,5,5,.6) 100%); }
.hero3-body { width: 100%; padding: 0 16px 32px; display: flex; justify-content: center; text-align: center; }
.hero3 .hero-txt { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 720px; }
.hero3-kicker { font-size: 0.875rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.hero3-h1 { color: #FFFFFF; font-stretch: 125%; font-weight: 700; font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.hero3-sub { max-width: 52ch; font-size: 1rem; line-height: 1.6; color: rgba(255,255,255,.78); text-wrap: pretty; }
.hero3-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.pbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(5,5,5,.25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #FFFFFF; font-weight: 600; font-size: 1rem; transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.pbtn:hover { border-color: #FFFFFF; background: rgba(255,255,255,.1); }
.pbtn-light { background: #FFFFFF; border-color: #FFFFFF; color: #050505; }
.pbtn-light:hover { background: #E6E6E6; color: #050505; }
.pbtn:focus-visible, .hero3-more:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }
.hero3-more { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; margin-top: 8px; font-size: 0.9375rem; color: rgba(255,255,255,.82); transition: color .2s ease; }
.hero3-more:hover { color: #FFFFFF; }
.hero3-more span { transition: transform .25s var(--ease); }
.hero3-more:hover span { transform: translateX(4px); }

/* Le menu passe par-dessus le visuel, dans le cadre (toujours clair sur le visuel) */
.hero3 { --hdr-real: 64px; }
@media (min-width: 540px) { .hero3 { --hdr-real: 82px; } }
@media (min-width: 768px) {
  .hero3 { padding: 12px; }
  .hero3-frame { min-height: calc(100svh - 24px); border-radius: 20px; }
  .hero3-body { padding-bottom: 48px; }
  .hero3-bg { object-position: 50% 50%; }
}
}
@media (min-width: 1024px) {
  .hero3-body { padding-bottom: 64px; }
}

/* Entrée : le visuel s'éclaire, puis le texte monte */
.anim .hero3-bgw { opacity: 0; transition: opacity 1.6s ease; }
.anim.intro-done .hero3-bgw { opacity: 1; }
.anim:not(.intro-done) .hero3-bgw { animation: show-safety 0s 5s forwards; }

@media (prefers-reduced-motion: reduce) {
  .hero3-bg { animation: none; transform: none; }
}
@media (max-width: 767px) {
  .hero3-shade { background:
    radial-gradient(140% 70% at 50% 100%, rgba(5,5,5,.96) 0%, rgba(5,5,5,.85) 45%, rgba(5,5,5,.3) 80%, rgba(5,5,5,0) 100%),
    linear-gradient(to bottom, rgba(5,5,5,.6) 0%, rgba(5,5,5,0) 20%); }
}

/* Cadrage de chaque photo de fond (sujet bien placé, de l'air pour le texte) */
.hero3-frame[data-fond="phare-armellin"] .hero3-bg { object-position: 58% 40%; }
.hero3-frame[data-fond="autoroute-sambhav"] .hero3-bg { object-position: 46% 55%; }
.hero3-frame[data-fond="ville-federi"] .hero3-bg { object-position: 45% 70%; }
.hero3-frame[data-fond="carrefour-federi"] .hero3-bg { object-position: 50% 40%; }

/* Outil de l'aperçu seulement : choisir le fond (n'existera pas sur le vrai site) */

/* Phare vu du ciel : le phare à droite, le texte en bas à gauche (comme l'île de la référence) */
.hero3-bgw picture { display: contents; }
.hero3-frame[data-fond="phare-mrazek"] .hero3-bg { object-position: 50% 45%; }
@media (min-width: 1024px) {
  .hero3-frame[data-fond="phare-mrazek"] { justify-content: flex-start; }
  .hero3-frame[data-fond="phare-mrazek"] .hero3-body { justify-content: flex-start; text-align: left; padding-left: 48px; }
  .hero3-frame[data-fond="phare-mrazek"] .hero-txt { align-items: flex-start; }
  .hero3-frame[data-fond="phare-mrazek"] .hero3-cta { justify-content: flex-start; }
  .hero3-frame[data-fond="phare-mrazek"] .hero3-bg { object-position: 50% 40%; transform-origin: 70% 40%; }
  .hero3-frame[data-fond="phare-mrazek"] .hero3-shade { background:
    radial-gradient(70% 70% at 0% 100%, rgba(5,5,5,.88) 0%, rgba(5,5,5,.55) 45%, rgba(5,5,5,0) 80%),
    linear-gradient(to bottom, rgba(5,5,5,.45) 0%, rgba(5,5,5,0) 22%); }
}

/* Phare ChatGPT : texte en bas à gauche, le faisceau mène vers lui (principe Tekiyo) */
.hero3-frame[data-fond="phare-gpt"] .hero3-bg { object-position: 66% 40%; filter: none; }
.hero3-frame[data-fond="phare-gpt"] .hero3-shade { background:
  radial-gradient(130% 60% at 50% 100%, rgba(3,10,12,.85) 0%, rgba(3,10,12,.45) 50%, rgba(3,10,12,0) 85%),
  linear-gradient(to bottom, rgba(3,10,12,.35) 0%, rgba(3,10,12,0) 16%); }
@media (min-width: 1024px) {
  .hero3-frame[data-fond="phare-gpt"] .hero3-body { justify-content: flex-start; text-align: left; padding-left: 64px; padding-bottom: 72px; }
  .hero3-frame[data-fond="phare-gpt"] .hero-txt { align-items: flex-start; max-width: 600px; }
  .hero3-frame[data-fond="phare-gpt"] .hero3-cta { justify-content: flex-start; }
  .hero3-frame[data-fond="phare-gpt"] .hero3-bg { object-position: 50% 50%; transform-origin: 68% 28%; }
  .hero3-frame[data-fond="phare-gpt"] .hero3-shade { background:
    radial-gradient(60% 65% at 0% 100%, rgba(3,10,12,.7) 0%, rgba(3,10,12,.3) 55%, rgba(3,10,12,0) 85%),
    linear-gradient(to bottom, rgba(3,10,12,.3) 0%, rgba(3,10,12,0) 14%); }
}
.hero3-frame[data-fond="phare-gpt"] .hero3-bg { animation-name: hero3-drift-soft; }
@keyframes hero3-drift-soft { from { transform: scale(1); } to { transform: scale(1.05); } }

/* Phare noir & argent : texte en bas à gauche, le faisceau mène vers lui (principe Tekiyo) */
.hero3-frame[data-fond="phare-noir"] .hero3-bg { object-position: 60% 40%; filter: none; }
.hero3-frame[data-fond="phare-noir"] .hero3-shade { background:
  radial-gradient(130% 60% at 50% 100%, rgba(5,5,5,.85) 0%, rgba(5,5,5,.45) 50%, rgba(5,5,5,0) 85%),
  linear-gradient(to bottom, rgba(5,5,5,.35) 0%, rgba(5,5,5,0) 16%); }
@media (min-width: 1024px) {
  .hero3-frame[data-fond="phare-noir"] .hero3-body { justify-content: flex-start; text-align: left; padding-left: 64px; padding-bottom: 72px; }
  .hero3-frame[data-fond="phare-noir"] .hero-txt { align-items: flex-start; max-width: 600px; }
  .hero3-frame[data-fond="phare-noir"] .hero3-cta { justify-content: flex-start; }
  .hero3-frame[data-fond="phare-noir"] .hero3-bg { object-position: 50% 50%; transform-origin: 68% 28%; }
  .hero3-frame[data-fond="phare-noir"] .hero3-shade { background:
    radial-gradient(60% 65% at 0% 100%, rgba(5,5,5,.7) 0%, rgba(5,5,5,.3) 55%, rgba(5,5,5,0) 85%),
    linear-gradient(to bottom, rgba(5,5,5,.3) 0%, rgba(5,5,5,0) 14%); }
}
.hero3-frame[data-fond="phare-noir"] .hero3-bg { animation-name: hero3-drift-soft; }
@keyframes hero3-drift-soft { from { transform: scale(1); } to { transform: scale(1.05); } }

/* Phare bleu nuit (version finale ChatGPT) : ordinateur = texte en bas à gauche ; téléphone = image verticale, texte en bas */
.hero3-frame[data-fond="phare-nuit"] .hero3-bg { object-position: 50% 30%; animation-name: hero3-drift-soft; transform-origin: 55% 30%; }
.hero3-frame[data-fond="phare-nuit"] .hero3-shade { background:
  linear-gradient(to top, rgba(3,6,14,.75) 0%, rgba(3,6,14,0) 45%),
  linear-gradient(to bottom, rgba(3,6,14,.35) 0%, rgba(3,6,14,0) 14%); }
@media (min-width: 768px) {
  .hero3-frame[data-fond="phare-nuit"] .hero3-bg { object-position: 50% 40%; transform-origin: 66% 30%; }
}
@media (min-width: 1024px) {
  .hero3-frame[data-fond="phare-nuit"] .hero3-body { justify-content: flex-start; text-align: left; padding-left: 64px; padding-bottom: 72px; }
  .hero3-frame[data-fond="phare-nuit"] .hero-txt { align-items: flex-start; max-width: 600px; }
  .hero3-frame[data-fond="phare-nuit"] .hero3-cta { justify-content: flex-start; }
  .hero3-frame[data-fond="phare-nuit"] .hero3-shade { background:
    radial-gradient(60% 65% at 0% 100%, rgba(3,6,14,.6) 0%, rgba(3,6,14,.25) 55%, rgba(3,6,14,0) 85%),
    linear-gradient(to bottom, rgba(3,6,14,.3) 0%, rgba(3,6,14,0) 14%); }
}

/* Phare noir & blanc (test) : ordinateur = texte en bas à gauche ; téléphone = image verticale, texte en bas */
.hero3-frame[data-fond="phare-nb"] .hero3-bg { object-position: 66% 30%; animation-name: hero3-drift-soft; transform-origin: 55% 30%; }
.hero3-frame[data-fond="phare-nb"] .hero3-shade { background:
  linear-gradient(to top, rgba(5,5,5,.75) 0%, rgba(5,5,5,0) 45%),
  linear-gradient(to bottom, rgba(5,5,5,.35) 0%, rgba(5,5,5,0) 14%); }
@media (min-width: 768px) {
  .hero3-frame[data-fond="phare-nb"] .hero3-bg { object-position: 50% 40%; transform-origin: 66% 30%; }
}
@media (min-width: 1024px) {
  .hero3-frame[data-fond="phare-nb"] .hero3-body { justify-content: flex-start; text-align: left; padding-left: 64px; padding-bottom: 72px; }
  .hero3-frame[data-fond="phare-nb"] .hero-txt { align-items: flex-start; max-width: 600px; }
  .hero3-frame[data-fond="phare-nb"] .hero3-cta { justify-content: flex-start; }
  .hero3-frame[data-fond="phare-nb"] .hero3-shade { background:
    radial-gradient(60% 65% at 0% 100%, rgba(5,5,5,.6) 0%, rgba(5,5,5,.25) 55%, rgba(5,5,5,0) 85%),
    linear-gradient(to bottom, rgba(5,5,5,.3) 0%, rgba(5,5,5,0) 14%); }
}

/* Transition douce vers la section suivante : le bas du visuel se fond dans le noir exact du site (#050505 = --black).
   Mode sombre uniquement (en mode clair, le visuel garde son cadre arrondi). */
:root:not([data-theme="light"]) .hero3 { padding-bottom: 0; }
:root:not([data-theme="light"]) .hero3-frame { border-bottom-left-radius: 0; border-bottom-right-radius: 0; box-shadow: none; min-height: calc(100svh - 8px); }
:root:not([data-theme="light"]) .hero3-frame::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(5,5,5,0) 0%, rgba(5,5,5,.55) 45%, rgba(5,5,5,.9) 75%, var(--black) 100%); }
@media (min-width: 768px) {
  :root:not([data-theme="light"]) .hero3-frame { min-height: calc(100svh - 12px); }
}

/* Parcours de l'œil (phare bleu nuit, ordinateur) : le texte remonte au bout du faisceau,
   et un léger halo prolonge la lumière jusque derrière le titre. */
@media (min-width: 1024px) {
  .hero3-frame[data-fond="phare-nuit"] { align-items: center; }
  .hero3-frame[data-fond="phare-nuit"] .hero3-body { padding-top: 120px; padding-bottom: 48px; }
  .hero3-frame[data-fond="phare-nuit"] .hero3-shade { background:
    radial-gradient(38% 34% at 24% 52%, rgba(150,175,220,.16) 0%, rgba(150,175,220,.06) 45%, rgba(150,175,220,0) 100%),
    radial-gradient(55% 70% at 100% 100%, rgba(3,6,14,.35) 0%, rgba(3,6,14,0) 70%),
    linear-gradient(to bottom, rgba(3,6,14,.3) 0%, rgba(3,6,14,0) 14%); }
  .hero3-frame[data-fond="phare-nuit"] .hero3-h1 { }
  .hero3-frame[data-fond="phare-nuit"] .hero-txt { max-width: 760px; }
}

/* Boutons « verre » façon DRIVE : presque transparents, fin contour clair, flou léger derrière */
.pbtn.pbtn-glass { position: relative; color: #FFFFFF; font-weight: 500; min-height: 44px; padding: 10px 24px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.26);
  backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  transition: background-color .2s ease, border-color .2s ease; }
.pbtn.pbtn-glass.pbtn-light { background: rgba(255,255,255,.06); color: #FFFFFF; }
.pbtn.pbtn-glass:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); }
.pbtn.pbtn-glass.pbtn-light:hover { background: rgba(255,255,255,.12); }

.hero3-sub { text-wrap: balance; }

/* Lumière qui traverse les boutons : un reflet passe de droite à gauche, comme le faisceau du phare.
   Toutes les 6 s, le 2e bouton juste après le 1er. Au survol, le reflet passe aussitôt. */
.pbtn.pbtn-glass { overflow: hidden; isolation: isolate; }
.pbtn.pbtn-glass::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 45%; left: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, rgba(255,255,255,0) 0%, rgba(220,232,255,.10) 30%, rgba(255,255,255,.42) 50%, rgba(220,232,255,.10) 70%, rgba(255,255,255,0) 100%);
  transform: translateX(260%) skewX(-18deg); animation: pbtn-sheen 6s ease-in-out infinite; }
.hero3-cta .pbtn.pbtn-glass:nth-child(2)::after { animation-delay: .35s; }
@keyframes pbtn-sheen {
  0%, 62% { transform: translateX(260%) skewX(-18deg); opacity: 0; }
  64% { opacity: 1; }
  80% { transform: translateX(-160%) skewX(-18deg); opacity: 1; }
  82%, 100% { transform: translateX(-160%) skewX(-18deg); opacity: 0; }
}
.pbtn.pbtn-glass:hover::after { animation: pbtn-sheen-hover .7s ease-out 1; }
@keyframes pbtn-sheen-hover { from { transform: translateX(260%) skewX(-18deg); opacity: 1; } to { transform: translateX(-160%) skewX(-18deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pbtn.pbtn-glass::after { animation: none; opacity: 0; } }

/* Menu sans fond, en blanc : plus de pastilles ni de contours, seulement le texte et les icônes */
.hdr2 .brand2, .hdr2 .brand2 .brand-dot, .hdr2 .pill-nav, .hdr2 .theme-tg, .hdr2 .burger {
  background: none !important; border-color: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; }
.hdr2 .brand2 { padding-right: 0; }
.hdr2 .brand2 .brand-dot { width: 40px; }
/* Le logo est centré dans un rond invisible de 40 px : on le décale de 9 px pour que le dessin démarre sur la même ligne que les textes */
.hdr2 .brand2 { margin-left: -9px; }
@media (min-width: 540px) { .hdr2 .brand2 { margin-left: -10px; } } /* dès 540 px, le logo a une bordure invisible d’1 px */
.hdr2 .pill-nav .lnk { color: #FFFFFF; }
.hdr2 .pill-nav .lnk:hover { color: #FFFFFF; background: rgba(255,255,255,.08); }
.hdr2 .theme-tg, .hdr2 .burger { color: #FFFFFF; }
.hdr2 .theme-tg:hover, .hdr2 .burger:hover { background: rgba(255,255,255,.08) !important; }
:root[data-theme="light"] .hdr2 .pill-nav .lnk, :root[data-theme="light"] .hdr2 .theme-tg, :root[data-theme="light"] .hdr2 .burger { color: var(--white); }

/* Moins de vide entre le visuel et la section suivante */
.hero3 + .sec { padding-top: 24px; }
@media (min-width: 1024px) {
  :root:not([data-theme="light"]) .hero3-frame::after { height: 26%; }
  .hero3 + .sec { padding-top: 32px; }
}
@media (min-width: 1024px) {
  .hero3-frame[data-fond="phare-nuit"] { align-items: flex-end; }
  .hero3-frame[data-fond="phare-nuit"] .hero3-body { padding-top: 96px; padding-bottom: 56px; }
}

/* Plein écran à l'arrivée (on ne voit que le haut de page), texte calé en bas : le vide reste au-dessus, dans l'image */
@media (min-width: 1024px) {
  :root:not([data-theme="light"]) .hero3-frame[data-fond="phare-nuit"] { min-height: calc(100svh - 8px); }
  .hero3-frame[data-fond="phare-nuit"] .hero3-body { padding-bottom: 72px; }
  .hero3-frame[data-fond="phare-nuit"] .hero3-bg { object-position: 50% 22%; }
}

/* Passage en douceur entre les sections : plus de trait ni de cassure de couleur.
   Les sections « grises » démarrent dans le noir exact du site (#050505) et s'éclaircissent progressivement. */
:root:not([data-theme="light"]) main .sec { border-bottom: 0; }
:root:not([data-theme="light"]) .sec-tone { position: relative; isolation: isolate; border-top: 0; }
:root:not([data-theme="light"]) .sec-tone::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 280px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, var(--black) 0%, rgba(5,5,5,.75) 30%, rgba(5,5,5,.3) 65%, rgba(5,5,5,0) 100%); }
:root:not([data-theme="light"]) .sec-tone::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 200px; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, var(--black) 0%, rgba(5,5,5,0) 100%); }

/* Bloc de texte remonté : il ne colle plus au bas de l'écran, il se place dans la zone éclairée */
@media (min-width: 1024px) {
  .hero3-frame[data-fond="phare-nuit"] .hero3-body { padding-bottom: clamp(120px, 21vh, 240px); }
}

/* Boutons plus marquants : plus grands, texte plus gras */
.hero3-cta { gap: 14px; margin-top: 16px; }
.hero3-cta .pbtn.pbtn-glass { min-height: 54px; padding: 14px 32px; font-size: 1.0625rem; font-weight: 600; letter-spacing: .005em; }
.hero3-cta .pbtn.pbtn-glass:not(.pbtn-light) { border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.07); }
.hero3-cta .pbtn.pbtn-glass:not(.pbtn-light):hover { border-color: #FFFFFF; background: rgba(255,255,255,.14); }

/* 1er bouton : blanc plein, texte « découpé » qui laisse voir la mer derrière (fusion « screen » : le noir devient transparent) */
.hero3-cta .pbtn.pbtn-glass.pbtn-light { background: #FFFFFF; border-color: #FFFFFF; color: #000000;
  mix-blend-mode: screen; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 0 36px rgba(200,220,255,.22);
  transition: box-shadow .3s ease, transform .3s var(--ease); }
.hero3-cta .pbtn.pbtn-glass.pbtn-light:hover { background: #FFFFFF; box-shadow: 0 0 52px rgba(200,220,255,.38); transform: translateY(-1px); }
.hero3-cta .pbtn.pbtn-glass.pbtn-light::after { display: none; }
@media (max-width: 479px) { .hero3-cta .pbtn.pbtn-glass { padding-inline: 24px; } }
@media (prefers-reduced-motion: reduce) { .hero3-cta .pbtn.pbtn-glass.pbtn-light:hover { transform: none; } }
/* Écrans de 1024 à 1599 px : le titre ne doit pas toucher le phare */
@media (min-width: 1024px) and (max-width: 1599px) {
  .hero3-frame[data-fond="phare-nuit"] .hero3-body { padding-bottom: clamp(96px, 17vh, 200px); }
  .hero3-frame[data-fond="phare-nuit"] .hero3-bg { object-position: 15% 22%; }
  .hero3-frame[data-fond="phare-nuit"] .hero3-h1 { font-size: clamp(2.25rem, 1rem + 3.3vw, 4.25rem); }
}

/* ===== Rappels du bleu nuit de la mer dans tout le site (mode sombre) =====
   Le noir reste la base. Les surfaces (cartes, encadrés, sections grises) prennent une teinte bleu nuit,
   et quelques halos rappellent la lumière du phare sur l'eau. */
:root:not([data-theme="light"]) {
  --sea-1: #0A1322;           /* bleu nuit profond (mer dans l'ombre) */
  --sea-2: #12213A;           /* bleu nuit éclairé */
  --sea-glow: rgba(70, 110, 170, .16);
  --sea-line: rgba(140, 170, 215, .16);
  --stage-bg: radial-gradient(120% 90% at 30% 20%, #142339, #060910 70%);
  --tone-bg: radial-gradient(100% 70% at 12% 0%, #0E1A2D, #05070B 72%);
  --anth: #101A2A;
  --line: #1E2633;
  --line-2: #2E3949;
  --dash-2: #2C3A52;
  --car-btn-h: rgba(18, 33, 58, .9);
}

/* La mer « continue » sous le haut de page : un halo bleu nuit au départ de la 1re section */
:root:not([data-theme="light"]) .hero3 + .sec { position: relative; isolation: isolate; }
:root:not([data-theme="light"]) .hero3 + .sec::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 760px; z-index: -1; pointer-events: none;
  background: radial-gradient(55% 48% at 30% 50%, var(--sea-glow), rgba(5,5,5,0) 100%); }

/* Carte « 23 h 00 » : c'est la nuit, elle reprend la mer éclairée par le phare */
:root:not([data-theme="light"]) .night { background:
    radial-gradient(90% 70% at 85% 0%, rgba(150,180,225,.14), rgba(150,180,225,0) 60%),
    linear-gradient(160deg, var(--sea-2), var(--sea-1) 70%);
  border-color: var(--sea-line); }

/* Cartes et encadrés : contour légèrement bleuté */
:root:not([data-theme="light"]) .stage,
:root:not([data-theme="light"]) .qa,
:root:not([data-theme="light"]) .plan { border-color: var(--sea-line); }

/* Pied de page : un horizon bleu nuit derrière le grand « YM DIGITAL » */
:root:not([data-theme="light"]) .ftr { position: relative; isolation: isolate; }
:root:not([data-theme="light"]) .ftr::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 30% at 50% 32%, var(--sea-glow), rgba(5,5,5,0) 100%); }

/* Moins de bleu : chaque surface démarre en bleu nuit (couleur principale du dégradé) puis se fond dans le noir du site */
:root:not([data-theme="light"]) {
  --stage-bg: radial-gradient(130% 100% at 25% 0%, #12203A 0%, #0A1220 38%, #060709 72%, #050505 100%);
  --ticket: linear-gradient(170deg, #12203A 0%, #0B1424 45%, #060708 100%);
}
:root:not([data-theme="light"]) .night { background:
    radial-gradient(80% 55% at 85% 0%, rgba(150,180,225,.12), rgba(150,180,225,0) 60%),
    linear-gradient(170deg, #142441 0%, #0B1526 40%, #070809 78%, #050505 100%); }

/* Barre du menu : transparente sur le haut de page, noire dès qu'on le quitte */
.hdr.hdr2 { transition: background-color .25s ease, border-color .25s ease, transform .7s var(--ease) .1s; border-bottom: 1px solid transparent; }
.hdr.hdr2::before { transition: opacity .25s ease; }
.hdr.hdr2.hdr-solid { background: var(--black); border-bottom-color: var(--line); }
.hdr.hdr2.hdr-solid::before { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .hdr.hdr2, .hdr.hdr2::before { transition: none; } }

/* ===== Tiroir du menu : panneau qui glisse depuis la droite (comme un panier) ===== */
.hdr2 .drawer { position: fixed; top: 0; right: 0; bottom: 0; left: auto; z-index: 60;
  width: min(440px, calc(100vw - 40px)); max-height: none; height: 100dvh; padding: 0; gap: 0;
  display: flex; flex-direction: column; overflow: hidden;
  border: 0; border-left: 1px solid var(--line-2); border-radius: 0;
  background: linear-gradient(170deg, #12203A 0%, #0A1220 30%, #060709 65%, #050505 100%);
  box-shadow: -24px 0 64px rgba(0,0,0,.55);
  opacity: 1; visibility: hidden; transform: translateX(100%); pointer-events: none;
  transition: transform .45s cubic-bezier(.32,.72,0,1), visibility 0s linear .45s; }
.hdr2 .drawer.is-open { visibility: visible; transform: none; pointer-events: auto;
  transition: transform .45s cubic-bezier(.32,.72,0,1), visibility 0s; }
@media (min-width: 1024px) { .hdr2 .drawer { right: 0; } }

.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 12px 16px 12px 24px; border-bottom: 1px solid var(--line); }
.drawer-name { font-stretch: 125%; font-weight: 700; font-size: 1.25rem; color: #FFFFFF; }
.drawer-x { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: #FFFFFF; cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.drawer-x:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }
.drawer-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.drawer-x:focus-visible, .drawer-cta:focus-visible, .drawer-main a:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }

.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.drawer-main { list-style: none; display: grid; margin-bottom: 16px; }
.drawer-main a { display: flex; align-items: center; min-height: 52px; font-stretch: 125%; font-weight: 700; font-size: 1.5rem; color: #FFFFFF; border-bottom: 1px solid var(--line); }
@media (min-width: 1024px) { .drawer-main { display: none; } }

.drawer-foot { display: grid; gap: 12px; padding: 16px 24px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(5,5,5,.6); }
.drawer-cta { display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 14px 24px; border-radius: 999px; background: #FFFFFF; color: #050505; font-weight: 600; font-size: 1.0625rem; transition: background-color .2s ease; }
.drawer-cta:hover { background: #E6E6E6; }
.drawer-note { text-align: center; font-size: 0.875rem; color: var(--silver); }

/* Voile sombre derrière le tiroir : un clic dessus ferme le menu */
.drawer-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s ease, visibility 0s linear .35s; }
.drawer.is-open ~ .drawer-scrim { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .35s ease, visibility 0s; }
html.menu-open, html.menu-open body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .hdr2 .drawer, .hdr2 .drawer.is-open { transform: none; transition: visibility 0s !important; }
  .drawer-scrim, .drawer.is-open ~ .drawer-scrim { transition: none; }
}


/* Téléphone et tablette en portrait (image verticale) : le phare est en haut à droite,
   sa lumière tombe sur le titre. On cale l'image pour que la tache de lumière reste derrière le texte. */
@media (max-width: 1023px) and (orientation: portrait) {
  .hero3-frame[data-fond="phare-nuit"] .hero3-bg { object-position: 50% 0%; transform-origin: 50% 50%; }
  .hero3-frame[data-fond="phare-nuit"] .hero3-shade { background:
    linear-gradient(to top, rgba(3,6,14,.75) 0%, rgba(3,6,14,0) 40%),
    linear-gradient(to bottom, rgba(3,6,14,.35) 0%, rgba(3,6,14,0) 14%); }
}

/* Carte des services sur téléphone : 3 onglets, un seul groupe affiché (moins long à faire défiler). */
@media (max-width: 767px) {
  .grp-tabs { display: flex; gap: 4px; margin-bottom: 24px; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; }
  .grp-tab { flex: 1 1 auto; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 999px; background: none; color: var(--silver);
    font: inherit; font-size: 0.9375rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
  .grp-tab:hover { color: var(--white); }
  .grp-tab[aria-selected="true"] { background: var(--white); color: var(--black); }
  .grp-tab:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
  .grp-tabs ~ .menu .grp .h3 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .grp-tabs ~ .menu .grp > .lnk-arrow { margin-top: 16px; }
  .grp[hidden] { display: none; }
  .grp-in { animation: grp-in .25s ease both; }
  @keyframes grp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .grp-in { animation: none; } }
/* Petits téléphones (écran court) : on remonte l'image pour que le phare reste au-dessus du titre. */
@media (max-width: 767px) and (max-height: 700px) and (orientation: portrait) {
  .hero3-frame[data-fond="phare-nuit"] .hero3-bgw { bottom: auto; height: 100%; transform: translateY(-10%); }
}
@media (max-width: 359px) and (max-height: 700px) and (orientation: portrait) {
  .hero3-frame[data-fond="phare-nuit"] .hero3-bgw { transform: translateY(-15%); }
}
/* Téléphone : moins d'espace entre le haut de page et la section suivante
   (le haut de page garde toute la hauteur de l'écran, la section suivante reste cachée à l'arrivée). */
@media (max-width: 767px) {
  .hero3-frame[data-fond="phare-nuit"] .hero3-body { padding-bottom: 24px; }
  .hero3 + .sec { padding-top: 8px; }
}
/* Ordinateur : le texte du haut de page démarre sur la même ligne que le logo et que toutes les sections
   (bord du conteneur de 1240 px + marge intérieure). Le cadre de la photo est déjà décalé de 12 px. */
@media (min-width: 1024px) {
  .hero3-frame[data-fond="phare-nuit"] .hero3-body { padding-left: max(calc(var(--gutter) - 12px), calc(50% - 620px + var(--gutter))); }
}
/* FAQ de l'accueil : la hauteur reste fixe (la page ne bouge pas quand une réponse s'ouvre),
   mais on n'ajoute plus d'espace en plus sous le bouton « Voir toutes les questions ». */
.js .faq-zone .faq-more { min-height: 80px; }
@media (min-width: 768px) { .js .faq-zone .faq-more { min-height: 80px; } }
@media (min-width: 1024px) { .js .faq-zone .faq-more { min-height: 80px; } }
/* Pages intérieures : un léger halo bleu nuit en haut de page, comme la mer éclairée de l'accueil */
:root:not([data-theme="light"]) .page-simple main { position: relative; isolation: isolate; }
:root:not([data-theme="light"]) .page-simple main::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 640px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 55% at 25% 0%, var(--sea-glow), rgba(5,5,5,0) 100%); }
/* Nos créations : le fond derrière chaque projet reprend les couleurs du site présenté
   (Growtine bordeaux, L’Éthique ambré, Under Gear aux couleurs de son logo : turquoise, rose-violet, bleu et une touche de vert ; nos logiciels gardent le bleu nuit de YM DIGITAL). */
:root:not([data-theme="light"]) .slide.t-gt .stage { background: radial-gradient(130% 100% at 25% 0%, #4A1C24 0%, #2B1015 38%, #0E0607 72%, #050505 100%); border-color: rgba(170, 90, 105, .28); }
:root:not([data-theme="light"]) .slide.t-eth .stage { background: radial-gradient(130% 100% at 25% 0%, #3E2914 0%, #24170B 38%, #0C0805 72%, #050505 100%); border-color: rgba(205, 155, 85, .24); }
:root:not([data-theme="light"]) .slide.t-ug .stage { background:
  radial-gradient(55% 60% at 90% 4%, rgba(214, 140, 226, .30), rgba(214, 140, 226, 0) 70%),
  radial-gradient(55% 60% at 8% 2%, rgba(46, 196, 214, .28), rgba(46, 196, 214, 0) 70%),
  radial-gradient(45% 50% at 50% 0%, rgba(110, 150, 240, .20), rgba(110, 150, 240, 0) 70%),
  radial-gradient(40% 45% at 85% 100%, rgba(176, 228, 80, .10), rgba(176, 228, 80, 0) 70%),
  linear-gradient(180deg, #0C1220 0%, #07090E 60%, #050505 100%);
  border-color: rgba(150, 175, 230, .26); }

/* Accueil, ordinateur : défilement section par section (js/sections.js ajoute la classe .snap sur <html>) */
@media (min-width: 1024px) {
  /* Hauteur naturelle, espacement régulier entre les sections (80 px en haut et en bas) */
  html.snap main > section.sec:not(.hero3), html.snap main > section:not(.hero3) { padding-top: 80px; padding-bottom: 80px; }
  html.snap main > section:not(.hero3) > .wrap { width: 100%; }
  html.snap .sec .head { margin-bottom: 32px; }
  html.snap .board { padding: 40px 56px; }
  html.snap .board-top { margin-bottom: 32px; }
  html.snap .grp { gap: 20px; }
  html.snap .board-foot { margin-top: 32px; padding-top: 20px; }
}

/* Ordinateur à écran peu haut : la carte des services passe en onglets, les 3 services côte à côte */
@media (min-width: 1024px) and (max-height: 900px) and (hover: hover) and (pointer: fine) {
  .grp-tabs { display: flex; gap: 4px; width: max-content; margin: 0 auto 32px; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; }
  .grp-tab { flex: none; min-height: 44px; padding: 8px 28px; border: 0; border-radius: 999px; background: none; color: var(--silver);
    font: inherit; font-size: 1rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
  .grp-tab:hover { color: var(--white); }
  .grp-tab[aria-selected="true"] { background: var(--white); color: var(--black); }
  .grp-tab:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
  .grp-tabs ~ .menu { grid-template-columns: 1fr; }
  .grp-tabs ~ .menu .grp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 48px; }
  .grp-tabs ~ .menu .grp .h3 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .grp-tabs ~ .menu .grp > .lnk-arrow { grid-column: 1 / -1; justify-self: start; }
  .grp[hidden] { display: none !important; }
  .grp-in { animation: grp-in .25s ease both; }
}
/* Accueil, ordinateur : le carrousel des créations se rétrécit pour tenir en hauteur dans l'écran */
@media (min-width: 1024px) {
  html.snap #creations .car { max-width: calc((100vh - var(--snap-top, 107px) - var(--snap-bottom, 88px) - 195px) * 1.7); margin-inline: auto; }
}

/* Accueil, ordinateur : deux lignes de départ, en alternance.
   Sections impaires (1 accueil, 3 carte des services, 5 méthode) : ligne du texte d'accueil, comme avant
   (au moins 64 px dans le cadre de la photo ; sur les grands écrans, bord aligné sur une largeur de 1440 px).
   Sections paires (2 le soir, 4 créations, 6 questions) : ligne habituelle du texte, toujours au moins 48 px plus à droite.
   Les % de padding se rapportent à la largeur de la section (barre de défilement exclue) : alignement exact. */
@media (min-width: 1024px) {
  .hero3-frame[data-fond="phare-nuit"] .hero3-body { padding-left: max(64px, calc(50% - 720px + var(--gutter))); }
  #carte > .wrap, #methode > .wrap { max-width: none; padding-inline: max(76px, calc(50% - 720px + var(--gutter))); }
  body:has(.hero3) main > section.sec:not(#carte):not(#methode) > .wrap { padding-left: max(var(--gutter), min(124px, calc(744px - 50%))); }
  /* Carrousel des créations : démarre sur la ligne de sa section ; hauteur fixe (celle du projet le plus haut),
     pour que l'écran ne se réajuste pas à chaque changement de projet */
  html.snap #creations .car { margin-inline: 0 auto; }
  html.snap #creations .car-view { height: auto !important; }
}

/* Accueil, ordinateur : fondu discret vers le noir tout en bas de l'écran, sous la barre d'action,
   pour que le début de la section suivante n'apparaisse pas coupé net */
@media (min-width: 1024px) {
  html.snap body::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 88px; z-index: 17; pointer-events: none;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0), rgba(5, 5, 5, .94) 70%); }
}

/* Bouton « liquid glass » (modèle : iOS 26 Liquid Glass) : pilule de verre qui laisse voir la photo floutée,
   liseré lumineux sur le contour, éclat intérieur en haut et en bas, icône dans un rond blanc à gauche */
.hero3-cta .pbtn.pbtn-glass.pbtn-lg { gap: 14px; min-height: 54px; padding: 6px 30px 6px 6px; border-color: transparent;
  background: linear-gradient(180deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.12) 42%, rgba(255,255,255,.08) 60%, rgba(255,255,255,.16) 100%);
  backdrop-filter: blur(12px) saturate(170%) brightness(1.3); -webkit-backdrop-filter: blur(12px) saturate(170%) brightness(1.3);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.6), inset 0 -1px 1px rgba(255,255,255,.2),
    inset 0 12px 20px -14px rgba(255,255,255,.45), inset 0 -10px 18px -14px rgba(255,255,255,.3),
    0 12px 32px rgba(0,0,0,.38), 0 2px 6px rgba(0,0,0,.2);
  transition: background .25s ease, box-shadow .25s ease, transform .25s ease; }
/* Liseré lumineux : plus clair en haut à gauche et en bas à droite, comme un reflet sur du verre courbé */
.hero3-cta .pbtn.pbtn-lg::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,.18) 28%, rgba(255,255,255,.06) 55%, rgba(255,255,255,.2) 78%, rgba(255,255,255,.7) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.pbtn-lg-ico { position: relative; z-index: 2; display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: #FFFFFF; color: #0A0F18; box-shadow: 0 2px 8px rgba(0,0,0,.28), inset 0 -2px 4px rgba(10,15,24,.08); }
.pbtn-lg-ico svg { width: 20px; height: 20px; }
.hero3-cta .pbtn.pbtn-glass.pbtn-lg:hover { border-color: transparent; transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255,255,255,.36) 0%, rgba(255,255,255,.16) 42%, rgba(255,255,255,.11) 60%, rgba(255,255,255,.2) 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.75), inset 0 -1px 1px rgba(255,255,255,.26),
    inset 0 12px 20px -12px rgba(255,255,255,.55), inset 0 -10px 18px -12px rgba(255,255,255,.36),
    0 14px 38px rgba(0,0,0,.42), 0 0 40px rgba(200,220,255,.18); }
@media (max-width: 479px) { .hero3-cta .pbtn.pbtn-glass.pbtn-lg { padding-inline: 6px 22px; } }
@media (prefers-reduced-motion: reduce) { .hero3-cta .pbtn.pbtn-glass.pbtn-lg:hover { transform: none; } }
