/* ==========================================================================
   BlueSerenity : site vitrine
   Même identité que Sereno : bleu nuit, bleu, bleu clair, vert, noir, blanc.
   Version « nuit » : le site se déroule dans un monde 3D nocturne (monde.js).
   ========================================================================== */
@import url('/assets/css/fonts.css');

:root {
    --nuit: #0B1F3A;
    --noir: #050B16;
    --fond: #060E1B;
    --panneau: rgb(10 24 46 / .78);
    --panneau-plein: #0C1D36;
    --ciel: #7CC0F5;
    --ciel-2: #A9D6FA;
    --bleu: #2E7BC8;
    --vert: #34C77B;
    --alerte: #F06A5F;
    --texte: #EEF3FA;
    --texte-2: #A9B9CE;
    --trait: rgb(255 255 255 / .12);
    --f-titre: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --f-texte: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --page: 1200px;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; background: var(--fond); }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 1.0625rem/1.6 var(--f-texte); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-titre); font-weight: 750; line-height: 1.06; letter-spacing: -.025em; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ciel); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--ciel); color: var(--nuit); }
.page { max-width: var(--page); margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .page { padding: 0 18px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saut { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ciel); color: var(--nuit); padding: 10px 16px; font-weight: 700; border-radius: 8px; text-decoration: none; }
.saut:focus { top: 12px; }

/* ---------- Logo (vectoriel) ---------- */
.logo { display: inline-flex; align-items: center; gap: .32em; text-decoration: none; font: 800 1.25rem/1 var(--f-titre); letter-spacing: .06em; color: #fff; white-space: nowrap; }
.logo svg { width: .95em; height: 1.15em; flex-shrink: 0; transform: translateY(-.04em); }
.logo .logo-ecu { width: 1.55em; height: auto; margin-right: .3em; transform: translateY(-.06em); }
.logo .cadenas-anse { stroke: var(--ciel); }
.logo .cadenas-corps { fill: var(--bleu); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 50px; padding: 0 1.5rem; border-radius: 999px; border: 1.5px solid transparent; font: 650 1rem var(--f-titre); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease; }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn-ciel { background: var(--ciel); color: var(--nuit); border-color: var(--ciel); }
.btn-ciel:hover { background: var(--ciel-2); border-color: var(--ciel-2); }
.btn-trait { background: rgb(255 255 255 / .04); color: #fff; border-color: rgb(255 255 255 / .28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-trait:hover { border-color: #fff; }
.btn-sm { min-height: 42px; padding: 0 1.1rem; font-size: .95rem; }

/* ---------- Navigation ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background-color .3s ease, border-color .3s ease; border-bottom: 1px solid transparent; }
.nav.pleine { background: rgb(6 14 27 / .82); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); border-color: var(--trait); }
.nav-in { display: flex; align-items: center; gap: 24px; min-height: 74px; }
.nav-in .logo { margin-right: auto; }
.nav-liens { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-liens a { display: block; padding: .5rem .85rem; border-radius: 999px; text-decoration: none; color: var(--texte-2); font-weight: 700; font-size: .98rem; }
.nav-liens a:hover, .nav-liens a.actif { color: #fff; background: rgb(255 255 255 / .07); }
.nav-sereno { display: inline-flex !important; align-items: center; gap: 8px; }
.nav-sereno img { width: 22px; height: 22px; border-radius: 50%; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--trait); background: transparent; color: #fff; cursor: pointer; place-items: center; }
.menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 920px) {
    .menu-btn { display: grid; }
    .nav-liens { display: none; position: absolute; top: 74px; left: 12px; right: 12px; flex-direction: column; gap: 4px; padding: 12px; border-radius: 20px; background: var(--panneau-plein); border: 1px solid var(--trait); box-shadow: 0 30px 60px -20px #000; }
    .nav.ouvert .nav-liens { display: flex; }
    .nav-liens a { padding: .85rem 1rem; font-size: 1.05rem; }
    .nav .btn-devis { display: none; }
}

/* ---------- Monde 3D ---------- */
#monde { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.sans-3d #monde { display: none; }
body.sans-3d { background: radial-gradient(80% 60% at 70% 20%, #12335C, transparent 70%), linear-gradient(180deg, #0B1F3A, #050B16); background-attachment: fixed; }
.voile { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgb(6 14 27 / .72) 0%, rgb(6 14 27 / .25) 45%, transparent 70%); transition: background .6s ease; }
.voile.droite { background: linear-gradient(270deg, rgb(6 14 27 / .72) 0%, rgb(6 14 27 / .25) 45%, transparent 70%); }
main, .pied { position: relative; z-index: 2; }

/* Les étapes du monde : une section = une île */
.etape { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; }
.etape .page { width: 100%; }
.bloc { max-width: 540px; }
.etape.a-droite .bloc { margin-left: auto; }
.surtitre { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ciel); margin-bottom: 18px; }
.surtitre b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ciel); font: 800 .85rem var(--f-titre); }
.etape h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
.etape .chapo { margin-top: 20px; font-size: 1.2rem; color: var(--texte-2); max-width: 46ch; }

/* Accueil */
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); letter-spacing: -.04em; line-height: .98; max-width: 11ch; }
.hero h1 span { color: var(--ciel); }
.hero .chapo { font-size: 1.3rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.defile { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--texte-2); font-size: .9rem; font-weight: 700; }
.defile span { width: 26px; height: 40px; border-radius: 999px; border: 2px solid rgb(255 255 255 / .35); position: relative; }
.defile span::after { content: ''; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ciel); animation: molette 1.8s ease-in-out infinite; }
@keyframes molette { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* Chiffres */
.chiffres { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }
.chiffres li { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: baseline; padding: 18px 20px; border-radius: 18px; background: var(--panneau); border: 1px solid var(--trait); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.chiffres strong { font: 800 clamp(1.9rem, 3.4vw, 2.5rem)/1 var(--f-titre); letter-spacing: -.03em; color: var(--ciel); grid-row: span 2; min-width: 4.2ch; font-variant-numeric: tabular-nums; }
.chiffres small { color: var(--texte-2); font-size: .82rem; }

/* Ateliers */
.ateliers { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.ateliers a { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 16px; align-items: center; padding: 18px 20px; border-radius: 18px; background: var(--panneau); border: 1px solid var(--trait); text-decoration: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: border-color .2s ease, transform .2s ease; }
.ateliers a:hover { border-color: var(--ciel); transform: translateX(4px); }
.ateliers .num { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ciel); color: var(--nuit); font: 800 1rem var(--f-titre); }
.ateliers h3 { font-size: 1.15rem; }
.ateliers p { color: var(--texte-2); font-size: .95rem; grid-column: 2; }
.ateliers .prix { grid-row: 1 / span 2; grid-column: 3; font: 750 1.05rem var(--f-titre); color: #fff; text-align: right; }
.ateliers .prix small { display: block; font: 400 .8rem var(--f-texte); color: var(--texte-2); }

/* Sereno */
.sereno-tete { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sereno-tete img { width: 54px; height: 54px; border-radius: 50%; box-shadow: 0 0 0 4px rgb(124 192 245 / .25); }
.sereno-tete span { font: 750 1.4rem var(--f-titre); }
.publics { list-style: none; margin: 26px 0 30px; padding: 0; display: grid; gap: 10px; }
.publics li { padding: 14px 18px; border-left: 3px solid var(--ciel); background: var(--panneau); border-radius: 0 14px 14px 0; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.publics strong { font-family: var(--f-titre); display: block; }
.publics span { color: var(--texte-2); font-size: .97rem; }

/* Engagements */
.engagements { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.engagements li { display: flex; gap: 16px; padding: 18px 20px; border-radius: 18px; background: var(--panneau); border: 1px solid var(--trait); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.engagements .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: rgb(124 192 245 / .14); color: var(--ciel); }
.engagements .ico.vert { background: rgb(52 199 123 / .16); color: var(--vert); }
.engagements .ico svg { width: 24px; height: 24px; }
.engagements h3 { font-size: 1.12rem; }
.engagements p { color: var(--texte-2); font-size: .97rem; margin-top: 4px; }

/* Contact */
.contact { padding: 120px 0 100px; }
.contact-grille { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
.contact h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.contact .chapo { margin-top: 18px; font-size: 1.15rem; color: var(--texte-2); }
.coord { margin-top: 28px; display: grid; gap: 12px; }
.coord a { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; }
.coord a span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgb(124 192 245 / .14); color: var(--ciel); }
.coord a svg { width: 20px; height: 20px; }
.formulaire { padding: clamp(24px, 4vw, 36px); border-radius: 24px; background: var(--panneau-plein); border: 1px solid var(--trait); box-shadow: 0 40px 80px -40px #000; }
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.champ { display: grid; gap: 7px; }
.champ.large { grid-column: 1 / -1; }
.champ label { font-weight: 700; font-size: .95rem; }
.champ input, .champ select, .champ textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid rgb(255 255 255 / .16); background: rgb(255 255 255 / .04); color: #fff; font: inherit; }
.champ select option { background: var(--panneau-plein); color: #fff; }
.champ textarea { min-height: 130px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--ciel); box-shadow: 0 0 0 4px rgb(124 192 245 / .2); }
.formulaire .btn { width: 100%; margin-top: 20px; }
.form-message { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-weight: 700; }
.form-message:empty { display: none; }
.form-message.success { background: rgb(52 199 123 / .14); color: var(--vert); }
.form-message.error { background: rgb(240 106 95 / .14); color: var(--alerte); }
.mention { margin-top: 12px; color: var(--texte-2); font-size: .85rem; }
.mention a { color: var(--ciel); }

/* Pied de page */
.pied { background: var(--noir); border-top: 1px solid var(--trait); }
.pied-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-top: 56px; padding-bottom: 36px; }
.pied p { color: var(--texte-2); margin-top: 14px; max-width: 32ch; }
.pied h2 { font-size: 1rem; margin-bottom: 12px; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pied ul a { color: var(--texte-2); text-decoration: none; }
.pied ul a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pied-bas { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--trait); color: #7D8EA6; font-size: .92rem; }

/* Apparition douce du texte de chaque étape (une seule fois) */
.js .bloc > * { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .vu .bloc > * { opacity: 1; transform: none; }
.js .vu .bloc > *:nth-child(2) { transition-delay: .08s; }
.js .vu .bloc > *:nth-child(3) { transition-delay: .16s; }
.js .vu .bloc > *:nth-child(n+4) { transition-delay: .24s; }

/* Pages intérieures (services, légal) */
.interieur { padding: 130px 0 90px; }
.interieur .tete { max-width: 760px; margin-bottom: 48px; }
.interieur h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); letter-spacing: -.035em; }
.interieur .tete p { margin-top: 18px; font-size: 1.2rem; color: var(--texte-2); }
.carte { padding: clamp(24px, 4vw, 36px); border-radius: 24px; background: var(--panneau-plein); border: 1px solid var(--trait); }
.texte-legal { max-width: 800px; }
.texte-legal h2 { font-size: 1.5rem; margin: 36px 0 12px; }
.texte-legal h3 { font-size: 1.15rem; margin: 22px 0 8px; }
.texte-legal p, .texte-legal li { color: #CFD9E6; line-height: 1.7; }
.texte-legal p + p { margin-top: 12px; }
.texte-legal a { color: var(--ciel); }

@media (max-width: 920px) {
    .voile, .voile.droite { background: linear-gradient(180deg, transparent 0%, rgb(6 14 27 / .35) 40%, rgb(6 14 27 / .85) 75%); }
    .etape { align-items: flex-end; padding: 46vh 0 60px; }
    .etape.hero { padding-top: 40vh; }
    .hero h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
    .defile { display: none; }
    .bloc, .etape.a-droite .bloc { max-width: none; margin: 0; }
    .contact-grille { grid-template-columns: 1fr; }
    .pied-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .champs { grid-template-columns: 1fr; }
    .ateliers a { grid-template-columns: auto 1fr; }
    .ateliers .prix { grid-row: auto; grid-column: 2; text-align: left; }
    .pied-in { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
    .js .bloc > * { opacity: 1; transform: none; }
}
