/* ===== Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue: #1a6dff;
    --blue-dark: #0b3fb3;
    --ink: #0b1a33;
    --night: #06122b;
    --ratio: calc(1672 / 941); /* format de la bannière */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Montserrat", system-ui, sans-serif;
    background: var(--night);
    color: #fff;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    user-select: none;
    -webkit-user-drag: none;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #9cc3f0;
}

.hero::after {
    /* fondu vers la section suivante */
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 12vh;
    background: linear-gradient(to bottom, transparent, var(--night));
    pointer-events: none;
    z-index: 20;
}

/* La scène garde le format de la bannière et couvre tout l'écran (comme background-size: cover) */
.stage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: max(100vw, calc(100vh * var(--ratio)));
    aspect-ratio: 1672 / 941;
    translate: -50% -50%;
    container-type: inline-size;
}

.layer {
    position: absolute;
    will-change: transform;
}

.layer img {
    width: 100%;
    height: auto;
}

/* Positions calées sur la bannière (en % de la scène) */
.layer-bg {
    inset: -4%;          /* marge pour que les bords ne se voient jamais */
}
.layer-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.layer-globe { left: 67%; top: 8%;   width: 36%; }
.layer-shop  { left: 0;   top: 7.5%; width: 46%; }
.layer-ia    { left: 25%; top: 6%;   width: 51%; }
.layer-logi  { left: 0;   top: 37%;  width: 48%; }
.layer-plane { left: 13%; top: 0;    width: 33%; }
.layer-desk  { left: 47%; top: 50%;  width: 57%; }
.layer-text  { inset: 0; pointer-events: none; }

/* Petites animations d'ambiance (sur l'image, pour ne pas gêner la parallaxe) */
.layer-plane img { animation: fly 6s ease-in-out infinite; }
.layer-globe img { animation: float 9s ease-in-out infinite; }
.layer-ia img    { animation: float 7s ease-in-out infinite; }

@keyframes fly {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(1.5%, -4%) rotate(-1deg); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-1.5%); }
}

/* ===== Textes du hero ===== */
.keywords {
    position: absolute;
    left: 3.5%;
    top: 73%;
    list-style: none;
    font-family: "Caveat", cursive;
    font-size: 2.1cqw;
    line-height: 1.05;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}
.keywords::after {
    content: "";
    display: block;
    width: 2cqw;
    height: .25cqw;
    margin-top: .6cqw;
    background: var(--blue);
}

.tagline {
    position: absolute;
    left: 61%;
    top: 75%;
    font-family: "Caveat", cursive;
    font-size: 1.9cqw;
    line-height: 1.1;
    color: #fff;
    transform: rotate(-8deg);
    text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}

.cta {
    position: absolute;
    left: 50%;
    top: 83%;
    translate: -50% 0;
    display: inline-flex;
    align-items: center;
    gap: .8cqw;
    padding: 1cqw 2cqw;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--blue), var(--blue-dark));
    color: #fff;
    font-size: 1.05cqw;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 0 2cqw rgba(26, 109, 255, .6), inset 0 1px 0 rgba(255, 255, 255, .35);
    pointer-events: auto;
    transition: box-shadow .3s, transform .3s;
}
.cta:hover {
    transform: scale(1.06);
    box-shadow: 0 0 3cqw rgba(26, 109, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.cta span {
    transition: transform .3s;
}
.cta:hover span {
    transform: translateX(.4cqw);
}

/* ===== Animation d'entrée ===== */
.layer > * {
    opacity: 0;
    transition: opacity 1s ease;
}
.is-loaded .layer > * {
    opacity: 1;
}
.is-loaded .layer-globe > * { transition-delay: .2s; }
.is-loaded .layer-shop  > * { transition-delay: .35s; }
.is-loaded .layer-logi  > * { transition-delay: .5s; }
.is-loaded .layer-ia    > * { transition-delay: .65s; }
.is-loaded .layer-plane > * { transition-delay: .8s; }
.is-loaded .layer-desk  > * { transition-delay: .95s; }
.is-loaded .layer-text  > * { transition-delay: 1.2s; }

/* ===== Section suivante ===== */
.features {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 7rem 1.5rem;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, #0d2a6b 0%, var(--night) 60%);
    overflow: hidden;
}

/* décor qui bouge au scroll */
.features-globe {
    position: absolute;
    right: -12vw;
    top: 10%;
    width: min(55vw, 750px);
    opacity: .35;
    pointer-events: none;
    will-change: transform;
}
.features-glow {
    position: absolute;
    left: -15vw;
    bottom: -10%;
    width: 50vw;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 109, 255, .35), transparent 65%);
    pointer-events: none;
    will-change: transform;
}

.features-inner {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.eyebrow {
    font-family: "Caveat", cursive;
    font-size: 1.8rem;
    color: #6fa8ff;
    margin-bottom: .5rem;
}

.features h2 {
    font-size: clamp(1.3rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.intro {
    max-width: 640px;
    margin: 0 auto 3.5rem;
    line-height: 1.7;
    opacity: .8;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.card {
    position: relative;
    padding: 2.5rem 1.5rem 2rem;
    border-radius: 1rem;
    text-align: left;
    background: rgba(26, 109, 255, .08);
    border: 1px solid rgba(26, 109, 255, .35);
    box-shadow: 0 0 30px rgba(26, 109, 255, .15);
    backdrop-filter: blur(6px);
    transition: transform .4s, box-shadow .4s, opacity .8s, translate .8s;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 40px rgba(26, 109, 255, .4);
}
.card .num {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 2.2rem;
    font-weight: 800;
    color: rgba(26, 109, 255, .25);
}
.card h3 {
    color: #4d8dff;
    font-size: 1.3rem;
    margin-bottom: .8rem;
}
.card p {
    line-height: 1.6;
    opacity: .85;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem 5rem;
    margin-top: 4rem;
}
.stat strong {
    display: block;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(180deg, #fff, #4d8dff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat span {
    font-size: .9rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .7;
}

/* apparition au scroll */
.reveal {
    opacity: 0;
    translate: 0 40px;
    transition: opacity .8s ease, translate .8s ease;
}
.reveal.is-visible {
    opacity: 1;
    translate: 0 0;
}
.card.reveal {
    transition: transform .4s, box-shadow .4s, opacity .8s ease, translate .8s ease;
}
.cards .reveal:nth-child(2), .stats .reveal:nth-child(2) { transition-delay: .1s; }
.cards .reveal:nth-child(3), .stats .reveal:nth-child(3) { transition-delay: .2s; }
.cards .reveal:nth-child(4) { transition-delay: .3s; }

/* ===== Titres communs ===== */
.about h2,
.video-overlay h2,
.galleries h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

/* ===== About ===== */
.about {
    position: relative;
    padding: 8rem 1.5rem;
    background: linear-gradient(180deg, var(--night), #081a40);
    overflow: hidden;
}

.about-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1 1 380px;
}
.about-text h2 span {
    background: linear-gradient(90deg, #4d8dff, #9cc3ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.about-text p:not(.eyebrow) {
    line-height: 1.8;
    opacity: .85;
    margin-bottom: 1.2rem;
}

.about-visual {
    position: relative;
    flex: 1 1 380px;
    will-change: transform;
}
.about-visual img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 1.2rem;
    border: 1px solid rgba(26, 109, 255, .4);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(26, 109, 255, .25);
}

/* micro-animation : badge qui flotte */
.about-badge {
    position: absolute;
    left: -1.5rem;
    bottom: -1.5rem;
    display: grid;
    place-items: center;
    width: 7rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #4d8dff, var(--blue-dark));
    box-shadow: 0 0 40px rgba(26, 109, 255, .7);
    animation: badge 4s ease-in-out infinite;
}
.about-badge strong {
    font-size: 2.2rem;
    line-height: 1;
}
.about-badge span {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    margin-top: -1.6rem;
}
@keyframes badge {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%      { transform: translateY(-10px) rotate(4deg); }
}

/* micro-animation : bouton secondaire qui se remplit */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-top: .8rem;
    padding: .9rem 1.8rem;
    border-radius: 999px;
    border: 1px solid var(--blue);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(90deg, var(--blue), var(--blue)) no-repeat left / 0% 100%;
    transition: background-size .4s ease, box-shadow .4s, opacity .8s ease, translate .8s ease;
}
.btn-ghost:hover {
    background-size: 100% 100%;
    box-shadow: 0 0 30px rgba(26, 109, 255, .6);
}
.btn-ghost span {
    transition: transform .3s;
}
.btn-ghost:hover span {
    transform: translateX(6px);
}

/* ===== Vidéo réelle (YouTube) ===== */
.yt-section {
    padding: 7rem 1.5rem;
    background: linear-gradient(180deg, var(--night), #081a40);
    text-align: center;
}

.yt-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.yt-section h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 2.5rem;
}

.yt-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1.2rem;
    border: 1px solid rgba(26, 109, 255, .5);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(26, 109, 255, .3);
    background: #000;
}
.yt-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* image de couverture par-dessus le lecteur */
.yt-poster {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    transition: opacity .5s;
}
.yt-poster.is-hidden {
    opacity: 0;
    pointer-events: none;
}
.yt-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease, filter .6s ease;
}
.yt-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 30%, rgba(6, 18, 43, .6));
}

/* micro-animation : bouton play qui pulse, image qui zoome au survol */
.yt-play {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 5.5rem;
    aspect-ratio: 1;
    padding-left: .4rem;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 0 0 0 rgba(26, 109, 255, .7);
    animation: pulse 2s infinite;
    transition: transform .3s;
}
.yt-poster:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}
.yt-poster:hover .yt-play {
    transform: scale(1.12);
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(26, 109, 255, .7); }
    70%  { box-shadow: 0 0 0 25px rgba(26, 109, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(26, 109, 255, 0); }
}

.yt-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* micro-animation : boutons qui s'illuminent */
.yt-btn {
    padding: .8rem 1.6rem;
    border-radius: 999px;
    border: 1px solid var(--blue);
    background: rgba(26, 109, 255, .1);
    color: #fff;
    font: 600 1rem "Montserrat", sans-serif;
    cursor: pointer;
    transition: background .3s, box-shadow .3s, transform .2s;
}
.yt-btn:hover {
    background: var(--blue);
    box-shadow: 0 0 25px rgba(26, 109, 255, .6);
}
.yt-btn:active {
    transform: scale(.95);
}
.yt-btn[aria-pressed="true"] {
    background: var(--blue-dark);
    border-color: #fff;
}

/* ===== Vidéo ===== */
.video-section {
    position: relative;
    height: 85vh;
    min-height: 480px;
    display: grid;
    place-items: center;
    overflow: hidden;
    text-align: center;
}

.video-bg {
    position: absolute;
    left: 0;
    top: -12%;
    width: 100%;
    height: 124%;
    object-fit: cover;
    will-change: transform;
}

.video-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, #081a40 0%, transparent 25%, transparent 75%, var(--night) 100%),
        rgba(6, 18, 43, .45);
}

.video-overlay {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 0 1.5rem;
}
.video-overlay h2 {
    text-shadow: 0 4px 20px rgba(0, 0, 0, .6);
}
.video-overlay p:not(.eyebrow) {
    font-size: 1.1rem;
    line-height: 1.7;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
}

/* ===== Galeries (flexbox) ===== */
.galleries {
    padding: 7rem 1.5rem;
    background: var(--night);
    text-align: center;
}

.galleries-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-title {
    margin: 3rem 0 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #6fa8ff;
}

/* Smooth Cards (d'après le modèle fourni) :
   la carte survolée passe de flex 1 à flex 5, quitte le gris et redresse son titre */
.smooth-cards {
    width: 100%;
    height: 460px;
    margin: 0 auto;
    display: flex;
    gap: 5px;
    padding: .4em;
    border-radius: 4px;
}

.card-item {
    position: relative;
    flex: 1;
    height: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    font-family: "Poppins", sans-serif;
    text-transform: uppercase;
    filter: grayscale(100%);
    transition: all .5s, opacity .8s ease, translate .8s ease;
}
.card-item.is-active {
    flex: 5;
    filter: none;
}
.card-item:focus-visible {
    box-shadow: 0 0 0 2px #fff;
}

/* l'image remplace le background-image du modèle (même rendu, + texte alternatif) */
.card-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-item span {
    position: relative;
    z-index: 1;
    min-width: 14em;
    padding: .5em;
    color: #fff;
    text-align: center;
    letter-spacing: .1em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
    transform: rotate(-90deg);
    transition: all .5s;
}
.card-item.is-active span {
    transform: rotate(0);
    text-shadow: 0 0 15px var(--blue), 0 0 7px #fff, 0 0 45px var(--blue);
}

/* tablette / mobile */
@media (max-width: 600px) {
    .smooth-cards {
        flex-direction: column;
        height: 520px;
    }
    .card-item span {
        transform: none;
    }
}

/* ===== Footer ===== */
.footer {
    padding: 5rem 1.5rem 2rem;
    background: #030a1a;
    border-top: 1px solid rgba(26, 109, 255, .3);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-brand {
    flex: 1 1 240px;
}
.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: .5rem;
}
.footer-logo span {
    color: var(--blue);
}
.footer-brand p:not(.footer-logo) {
    font-size: .8rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    opacity: .6;
}

.footer-col {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.footer-col:last-child {
    flex-basis: 280px;
}
.footer-col h4 {
    margin-bottom: .4rem;
    color: #6fa8ff;
    font-size: .85rem;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.footer-col p {
    font-size: .85rem;
    line-height: 1.5;
    opacity: .7;
}

/* micro-animation : soulignement des liens */
.footer a {
    width: fit-content;
    color: #fff;
    opacity: .8;
    text-decoration: none;
    background: linear-gradient(var(--blue), var(--blue)) no-repeat left bottom / 0% 2px;
    transition: background-size .3s ease, opacity .3s;
}
.footer a:hover {
    opacity: 1;
    background-size: 100% 2px;
}

.footer-bottom {
    max-width: 1100px;
    margin: 4rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .8rem;
    text-align: center;
    opacity: .5;
}

/* ===== Accessibilité ===== */
@media (prefers-reduced-motion: reduce) {
    .layer img { animation: none; }
    .layer > * { transition: none; }
    .reveal { opacity: 1; translate: none; transition: none; }
    .about-badge { animation: none; }
}
