/* Page d'accueil publique */
.principal--plein { max-width: none; padding: 0; }
.principal--plein > .flash { max-width: 1180px; margin: 1rem auto; }

.vitrine {
    --nuit: #050b15;
    --nuit-2: #0a1424;
    --ligne: rgb(140 170 220 / 0.14);
    --rouge: #e0443b;
    --bleu: #3d7fe6;
    --halo: rgb(61 127 230 / 0.35);
    --v-texte: var(--texte);
    --v-doux: var(--texte-doux);
    --v-carte: color-mix(in srgb, var(--surface) 82%, transparent);
    overflow: hidden;
}

.v-enveloppe { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

.v-surtitre {
    margin: 0 0 .9rem;
    font: 600 .74rem/1.3 var(--police-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--bleu);
}

/* ---------- Hero ---------- */
.v-hero {
    position: relative;
    isolation: isolate;
    padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5.5rem);
    background: linear-gradient(180deg, var(--nuit) 70%, var(--fond));
    color: #e6edf7;
}
[data-theme="clair"] .v-hero { background: var(--nuit); }
.v-hero__fond {
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(60% 70% at 85% 30%, rgb(61 127 230 / 0.28), transparent 70%),
        radial-gradient(40% 40% at 6% 45%, rgb(224 68 59 / 0.16), transparent 70%),
        linear-gradient(180deg, transparent 60%, var(--nuit) 100%);
}
.v-hero__fond::before {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background: url("../img/banniere.webp") center 30% / cover no-repeat;
    opacity: .22;
    mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.v-hero__fond::after {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--ligne) 1px, transparent 1px),
        linear-gradient(90deg, var(--ligne) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(70% 80% at 70% 40%, #000 20%, transparent 75%);
    transform: perspective(700px) rotateX(55deg) translateY(28%) scale(1.6);
    transform-origin: 50% 100%;
}
.v-hero__grille { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); gap: clamp(2rem, 4vw, 3rem); align-items: center; }
.v-hero h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.6rem);
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.06;
    margin: 0 0 1.2rem;
    max-width: 16ch;
}
.v-hero h1 span {
    display: block;
    background: linear-gradient(90deg, #ff6a5c, #ffb199 40%, #8db8ff 70%, #3d7fe6);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.v-hero__intro { font-size: 1.1rem; line-height: 1.6; color: #a9b8cd; max-width: 54ch; }
.v-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.vitrine .bouton--grand { padding: .8rem 1.4rem; font-size: 1rem; border-radius: 10px; }
.vitrine .bouton--principal { box-shadow: 0 10px 30px -10px var(--halo); }
[data-theme] .vitrine a.v-bouton-clair, .vitrine .v-bouton-clair {
    background: rgb(255 255 255 / 0.06);
    border-color: rgb(255 255 255 / 0.18);
    color: #e6edf7;
    backdrop-filter: blur(6px);
}
.vitrine .v-bouton-clair:hover { background: rgb(255 255 255 / 0.12); }
.v-hero__prix { margin: 1.2rem 0 0; font-size: .92rem; color: #8b9db6; }
.v-hero__prix strong { color: #fff; font-size: 1.05rem; }

/* Pile d'écrans en 3D */
.v-scene { --rx: 0deg; --ry: 0deg; perspective: 1400px; }
.v-pile {
    position: relative;
    aspect-ratio: 16 / 11.5;
    margin-right: -6%;
    transform-style: preserve-3d;
    transform: rotateX(calc(12deg + var(--rx))) rotateY(calc(-22deg + var(--ry))) rotateZ(2deg);
    transition: transform 500ms cubic-bezier(.2, .7, .2, 1);
}
.v-pile__ecran {
    position: absolute;
    width: 88%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top left;
    border-radius: 12px;
    border: 1px solid rgb(255 255 255 / 0.14);
    box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(0 0 0 / 0.4);
    backface-visibility: hidden;
}
.v-pile__ecran--arriere { top: 0; right: 0; transform: translateZ(-140px); opacity: .55; filter: saturate(.7); }
.v-pile__ecran--milieu { top: 16%; right: 9%; transform: translateZ(-60px); opacity: .85; }
.v-pile__ecran--avant {
    bottom: 0; left: 0;
    transform: translateZ(40px);
    box-shadow: 0 50px 100px -30px rgb(0 0 0 / 0.9), 0 0 60px -10px var(--halo);
    animation: v-flotte 7s ease-in-out infinite;
}
.v-pile__logo {
    position: absolute; right: 4%; bottom: 6%;
    width: 17%; height: auto;
    border-radius: 50%;
    transform: translateZ(120px);
    filter: drop-shadow(0 16px 30px rgb(0 0 0 / 0.6));
    animation: v-flotte 6s ease-in-out -2s infinite;
}
@keyframes v-flotte {
    50% { translate: 0 -10px; }
}

/* ---------- Bandeau des services ---------- */
.v-services {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
    margin-top: -2.5rem;
}
.v-service {
    --rx: 0deg; --ry: 0deg;
    position: relative;
    padding: 1.3rem 1.2rem 1.1rem;
    border-radius: 14px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--svc) 16%, var(--surface)), var(--surface) 60%);
    border: 1px solid color-mix(in srgb, var(--svc) 35%, var(--bordure));
    box-shadow: 0 20px 40px -24px rgb(0 0 0 / 0.6);
    transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform 250ms ease, box-shadow 250ms ease;
}
.v-service:hover { box-shadow: 0 24px 50px -20px color-mix(in srgb, var(--svc) 55%, transparent); }
.v-service__numero {
    display: inline-grid; place-items: center;
    min-width: 2.6rem; height: 2.6rem; padding: 0 .5rem;
    margin-bottom: .8rem;
    border-radius: 10px;
    background: var(--svc); color: #fff;
    font: 700 1.05rem var(--police-mono);
    box-shadow: 0 8px 20px -6px var(--svc);
}
.v-service h2 { font-size: 1.05rem; margin-bottom: .35rem; }
.v-service p { margin: 0; font-size: .9rem; color: var(--v-doux); }

/* ---------- Sections ---------- */
.v-section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.v-section.v-enveloppe { padding-left: clamp(1rem, 4vw, 2rem); padding-right: clamp(1rem, 4vw, 2rem); }
.v-entete { max-width: 46rem; margin-bottom: 2.6rem; }
.v-entete h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 720; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.v-entete__texte { margin: 1rem 0 0; color: var(--v-doux); font-size: 1.02rem; }
.v-entete--centre { margin-left: auto; margin-right: auto; text-align: center; }

.v-fonctions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.v-fonction {
    padding: 1.5rem;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--bordure);
    transition: border-color 200ms ease, transform 200ms ease;
}
.v-fonction:hover { border-color: color-mix(in srgb, var(--bleu) 55%, var(--bordure)); transform: translateY(-3px); }
.v-fonction__icone {
    width: 2.8rem; height: 2.8rem; padding: .65rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--bleu) 14%, transparent);
    fill: none; stroke: var(--bleu); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.v-fonction h3 { font-size: 1.08rem; margin-bottom: .45rem; }
.v-fonction p { margin: 0; color: var(--v-doux); font-size: .94rem; line-height: 1.55; }

/* Galerie */
.v-section--sombre {
    position: relative;
    background:
        radial-gradient(50% 60% at 50% 0%, rgb(61 127 230 / 0.18), transparent 70%),
        var(--nuit);
    color: #e6edf7;
}
.v-section--sombre .v-entete__texte, .v-section--sombre figcaption { color: #93a5bd; }
.v-galerie { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.6rem 1.4rem; perspective: 1600px; }
.v-ecran { margin: 0; }
.v-ecran { grid-column: span 2; }
.v-ecran--large { grid-column: 1 / -1; }
.v-ecran:nth-child(2), .v-ecran:nth-child(3) { grid-column: span 3; }
.v-ecran__cadre {
    --rx: 0deg; --ry: 0deg;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 0.12);
    background: #0b1626;
    box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.9);
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform 250ms ease, box-shadow 250ms ease;
    cursor: zoom-in;
}
.v-ecran__cadre:hover { box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.9), 0 0 50px -12px var(--halo); }
.v-ecran__cadre img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; }
.v-ecran--large .v-ecran__cadre img { aspect-ratio: 21 / 9; }
.v-ecran figcaption { margin-top: .8rem; font-size: .9rem; line-height: 1.45; }
.v-ecran figcaption strong { display: block; color: #fff; font-size: .98rem; margin-bottom: .1rem; }

/* Publics */
.v-publics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--bordure); }
.v-public { padding: 1.8rem 1.6rem 0 0; }
.v-public + .v-public { padding-left: 1.6rem; border-left: 1px solid var(--bordure); }
.v-public__rang { display: block; margin-bottom: 1rem; font: 600 .82rem var(--police-mono); color: var(--rouge); letter-spacing: .1em; }
.v-public h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.v-public p { margin: 0; color: var(--v-doux); line-height: 1.6; }

/* Valeurs */
.v-valeurs-zone {
    position: relative;
    background:
        radial-gradient(40% 60% at 15% 50%, rgb(224 68 59 / 0.14), transparent 70%),
        radial-gradient(40% 60% at 85% 50%, rgb(61 127 230 / 0.16), transparent 70%),
        var(--nuit-2);
    color: #e6edf7;
    border-block: 1px solid rgb(255 255 255 / 0.06);
}
.v-valeurs__logo {
    display: block; width: 84px; height: auto; margin: 0 auto 1.2rem;
    border-radius: 50%;
    filter: drop-shadow(0 12px 30px rgb(61 127 230 / 0.45));
}
.v-valeurs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; perspective: 1000px; }
.v-valeur {
    --rx: 0deg; --ry: 0deg;
    position: relative;
    overflow: hidden;
    padding: 2rem 1.6rem 1.7rem;
    border-radius: 16px;
    background: linear-gradient(170deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.02));
    border: 1px solid rgb(255 255 255 / 0.1);
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transform-style: preserve-3d;
    transition: transform 250ms ease;
}
.v-valeur__chiffre {
    position: absolute; right: .6rem; top: -1.4rem;
    font: 800 7rem/1 var(--police);
    color: transparent;
    -webkit-text-stroke: 1px rgb(255 255 255 / 0.12);
    transform: translateZ(30px);
}
.v-valeur h3 { position: relative; font-size: 1.45rem; margin-bottom: .6rem; }
.v-valeur h3::before {
    content: ""; display: block; width: 2rem; height: 3px; margin-bottom: 1rem;
    border-radius: 2px; background: linear-gradient(90deg, var(--rouge), var(--bleu));
}
.v-valeur p { position: relative; margin: 0; color: #a9b8cd; line-height: 1.6; }

/* Étapes */
.v-etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; counter-reset: etape; }
.v-etapes li {
    counter-increment: etape;
    position: relative;
    padding: 1.4rem 1.4rem 1.4rem 4.4rem;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--bordure);
}
.v-etapes li::before {
    content: counter(etape);
    position: absolute; left: 1.2rem; top: 1.3rem;
    display: grid; place-items: center;
    width: 2.3rem; height: 2.3rem;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--bleu) 60%, transparent);
    color: var(--bleu);
    font: 700 1rem var(--police-mono);
}
.v-etapes strong { display: block; font-size: 1.05rem; margin-bottom: .3rem; }
.v-etapes span { color: var(--v-doux); font-size: .93rem; line-height: 1.55; }

/* Offre */
.v-section:has(> .v-offre) { padding-top: 0; }
.v-offre {
    --rx: 0deg; --ry: 0deg;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem;
    padding: clamp(1.8rem, 4vw, 3rem);
    border-radius: 20px;
    background:
        radial-gradient(70% 120% at 100% 0%, rgb(61 127 230 / 0.35), transparent 60%),
        radial-gradient(60% 120% at 0% 100%, rgb(224 68 59 / 0.25), transparent 60%),
        var(--nuit-2);
    color: #e6edf7;
    border: 1px solid rgb(255 255 255 / 0.1);
    box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.8);
    transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform 300ms ease;
}
.v-offre .v-actions { margin-top: 0; }
.v-offre__prix { margin: 0 0 .5rem; font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.v-offre__prix small { font-size: 1rem; font-weight: 500; letter-spacing: 0; color: #93a5bd; }
.v-offre__texte { margin: 0; max-width: 48ch; color: #a9b8cd; }

/* FAQ */
.v-faq-zone { padding-top: 1rem; }
.v-faq { max-width: 52rem; margin: 0 auto; display: grid; gap: .7rem; }
.v-question {
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--bordure);
    transition: border-color 200ms ease;
}
.v-question[open] { border-color: color-mix(in srgb, var(--bleu) 55%, var(--bordure)); }
.v-question summary {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 1.05rem 1.3rem;
    font-weight: 600; font-size: 1.02rem;
    cursor: pointer;
    list-style: none;
}
.v-question summary::-webkit-details-marker { display: none; }
.v-question summary::after {
    content: "";
    flex: none;
    width: .6rem; height: .6rem;
    border-right: 2px solid var(--v-doux); border-bottom: 2px solid var(--v-doux);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 200ms ease;
}
.v-question[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.v-question p { margin: 0; padding: 0 1.3rem 1.2rem; color: var(--v-doux); line-height: 1.65; }
.v-faq__suite { margin: 2rem 0 0; text-align: center; color: var(--v-doux); font-size: .92rem; }

/* Visionneuse */
.v-visionneuse {
    width: min(94vw, 1500px); max-width: none; max-height: 92vh;
    padding: 0; border: 0; border-radius: 12px;
    background: transparent; overflow: visible;
}
.v-visionneuse::backdrop { background: rgb(3 7 14 / 0.85); backdrop-filter: blur(4px); }
.v-visionneuse img { display: block; width: 100%; max-height: 92vh; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px rgb(0 0 0 / 0.7); }
.v-visionneuse form { position: absolute; top: -.6rem; right: -.6rem; z-index: 1; }
.v-visionneuse .bouton { background: var(--surface); border-radius: 50%; width: 2.4rem; height: 2.4rem; }

/* Apparition au défilement */
.vitrine.js [data-apparait] { opacity: 0; translate: 0 24px; transition: opacity 600ms ease, translate 600ms cubic-bezier(.2, .7, .2, 1); }
.vitrine.js [data-apparait].est-visible { opacity: 1; translate: 0 0; }

/* Thème clair : les zones sombres le restent, le reste suit le thème */
[data-theme="clair"] .vitrine { --bleu: #1d56b8; --rouge: #c22a22; }
[data-theme="clair"] .v-section--sombre, [data-theme="clair"] .v-valeurs-zone, [data-theme="clair"] .v-offre { --bleu: #6aa2ff; --rouge: #ff6a5c; }
[data-theme="clair"] .v-service { box-shadow: 0 16px 30px -22px rgb(15 27 44 / 0.35); }
[data-theme="clair"] .v-hero .v-surtitre { color: #6aa2ff; }

/* ---------- Écrans plus petits ---------- */
@media (max-width: 1000px) {
    .v-hero__grille { grid-template-columns: 1fr; }
    .v-scene { max-width: 640px; width: 100%; margin: 0 auto; }
    .v-services { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; padding-top: 2rem; }
    .v-fonctions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .v-galerie .v-ecran { grid-column: span 3; }
    .v-galerie .v-ecran--large, .v-galerie .v-ecran:last-child { grid-column: 1 / -1; }
    .v-pile { margin-right: 0; }
    .v-etapes { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .v-services, .v-fonctions, .v-valeurs, .v-publics { grid-template-columns: 1fr; }
    .v-galerie .v-ecran { grid-column: 1 / -1; }
    .v-public, .v-public + .v-public { padding: 1.4rem 0; border-left: 0; }
    .v-public + .v-public { border-top: 1px solid var(--bordure); }
    .v-ecran--large .v-ecran__cadre img { aspect-ratio: 16 / 9; }
    .v-pile__ecran--arriere { display: none; }
    .v-actions .bouton { flex: 1 1 auto; text-align: center; }
    .v-offre .v-actions { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .v-pile, .v-pile__ecran--avant, .v-pile__logo { animation: none; transition: none; }
    .vitrine.js [data-apparait] { opacity: 1; translate: none; transition: none; }
    .v-service, .v-ecran__cadre, .v-valeur, .v-offre { transition: none; }
}
