/* =========================================================
   VARIABLES
========================================================= */

:root {
    --yellow: #FBCD00;
    --blue: #015A9E;
    --gray: #98A7CE;

    --black: #111111;
    --ink: #1A1A1A;
    --white: #FFFFFF;
    --light-gray: #F5F6F8;

    --max-width: 1200px;
    --nav-h: 80px;
}


/* =========================================================
   THÈMES DE SECTION (.theme-white / .theme-blue)
========================================================= */

.theme-white {
    --bg: var(--white);
    --fg: var(--ink);
    --fg-muted: #555555;
    --accent: var(--blue);
    --line: #D6D9DF;
    --chip-border: rgba(1, 90, 158, 0.3);

    background: var(--bg);
    color: var(--fg);
}

.theme-blue {
    --bg: var(--blue);
    --fg: var(--white);
    --fg-muted: rgba(255, 255, 255, 0.82);
    --accent: var(--yellow);
    --line: rgba(255, 255, 255, 0.3);
    --chip-border: rgba(255, 255, 255, 0.35);

    background: var(--bg);
    color: var(--fg);
}


/* =========================================================
   FONTS
========================================================= */

@font-face {
    font-family: "Designer";
    src: url("assets/fonts/designer_2/Designer.otf") format("opentype");
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: "Fast Hand";
    src: url("assets/fonts/fast_hand/Fast%20Hand.otf") format("opentype");
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("assets/fonts/Inter-4.1/web/InterVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("assets/fonts/Inter-4.1/web/InterVariable-Italic.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
}

body {
    font-family: "Inter", Arial, Helvetica, sans-serif;
    color: var(--black);
    background: var(--white);

    /* clip (et non hidden) : ne casse pas position: sticky */
    overflow-x: clip;
}

body.nav-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: var(--nav-h);

    padding: 0 40px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    z-index: 1000;

    color: white;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    color: var(--black);

    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.nav-logo img {
    display: block;
    height: 42px;
    width: auto;
}

.navbar nav {
    display: flex;
    gap: 32px;
}

.navbar nav a {
    position: relative;

    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;

    transition: color 0.2s ease;
}

.navbar nav a::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;

    height: 2px;

    background: var(--yellow);

    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.navbar nav a:hover {
    color: var(--yellow);
}

.navbar.scrolled nav a:hover {
    color: var(--blue);
}

.navbar nav a.is-active::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
}

@media (max-width: 900px) {

    .navbar {
        padding: 0 20px;
    }

    .nav-toggle {
        position: relative;
        z-index: 1001;

        display: flex;
        flex-direction: column;
        gap: 6px;

        padding: 8px;

        background: none;
        border: 0;
        color: inherit;

        cursor: pointer;
    }

    .nav-toggle span {
        display: block;

        width: 26px;
        height: 2px;

        background: currentColor;

        transition:
            transform 0.3s ease,
            opacity 0.3s ease;
    }

    .navbar.is-open .nav-toggle {
        color: white;
    }

    .navbar.is-open .nav-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .navbar.is-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .navbar.is-open .nav-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .navbar nav {
        position: fixed;
        inset: 0;

        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;

        background: rgba(17, 17, 17, 0.97);
        color: white;

        opacity: 0;
        visibility: hidden;

        transition:
            opacity 0.3s ease,
            visibility 0.3s ease;
    }

    .navbar.is-open nav {
        opacity: 1;
        visibility: visible;
    }

    .navbar nav a {
        font-size: 22px;
    }

    .navbar.scrolled nav a:hover {
        color: var(--yellow);
    }
}


/* =========================================================
   COMMON SECTIONS
========================================================= */

.section {
    width: 100%;
    padding: 140px 40px;
}

.section > * {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.section--compact {
    padding-top: 80px;
    padding-bottom: 80px;
}

.section-header {
    margin-bottom: 70px;
}

.section-label {
    color: var(--accent, var(--blue));

    font-size: 13px;
    font-weight: 700;

    letter-spacing: 0.15em;

    margin-bottom: 15px;
}

.section-title {
    font-family: "Fast Hand", Arial, sans-serif;
    font-weight: normal;

    font-size: clamp(45px, 5vw, 75px);
    line-height: 0.95;

    max-width: 800px;

    margin-bottom: 25px;
}

.section-title--sm {
    font-size: clamp(34px, 3.5vw, 50px);
}

.section-intro {
    max-width: 650px;

    font-size: 18px;
    line-height: 1.6;

    color: var(--fg-muted, #555555);
}

.subtitle {
    font-family: "Designer", Arial, sans-serif;
    font-weight: normal;

    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.05;

    margin-bottom: 20px;
}

.subtitle--sm {
    font-size: 30px;
    margin-bottom: 6px;
}

.subtitle--xl {
    font-size: clamp(40px, 4.5vw, 60px);
    line-height: 0.95;
    margin-bottom: 25px;
}

.prose p {
    font-size: 18px;
    line-height: 1.7;

    color: var(--fg-muted, #555555);

    margin-bottom: 20px;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose strong {
    color: var(--fg);
}

.counter,
.prose .counter {
    color: var(--accent);
    font-weight: 800;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 650px;

    display: flex;
    align-items: center;

    overflow: hidden;

    background: #222;
    color: white;
}

.hero-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.75),
            rgba(0, 0, 0, 0.15)
        );
}

.hero-content {
    position: relative;
    z-index: 2;

    width: min(var(--max-width), calc(100% - 80px));

    margin: auto;
}

.hero-logo img {
    width: min(860px, 85vw);
    max-width: 100%;
    height: auto;
    display: block;
}


/* Carte vitrée derrière le titre et les liens */
.hero-panel {
    width: fit-content;
    max-width: 100%;

    margin-top: 24px;
    padding: 28px 32px;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;

    background: rgba(17, 17, 17, 0.32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    margin: 0 0 26px;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
}

/* Police Designer, comme les sous-titres (pas d'accents) */
.hero-title {
    font-family: "Designer", Arial, sans-serif;
    font-weight: normal;

    font-size: clamp(26px, 3vw, 44px);
    line-height: 0.95;

    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.school-logos {
    display: flex;
    align-items: center;
    gap: 18px;

    padding-left: 28px;
    border-left: 2px solid rgba(255, 255, 255, 0.35);
}

.school-logos a {
    display: flex;
    align-items: center;
}

.school-logos img {
    width: auto;
    display: block;
    transition: transform 0.2s ease;
}

.school-logos .logo-tsp {
    height: 90px;
}

.school-logos .logo-imtbs {
    height: 58px;
}

.school-logos a:hover img {
    transform: scale(1.05);
}

/* Liens vers les vraies activités de l'asso */
.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    max-width: 900px;
}

.hero-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 11px 18px;

    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.hero-link-arrow {
    color: var(--yellow);

    transition: transform 0.2s ease;
}

.hero-links a:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--black);
}

.hero-links a:hover .hero-link-arrow {
    color: var(--black);
    transform: translateX(3px);
}

/* Sous 900px les logos passent sous le titre : plus de séparateur */
@media (max-width: 900px) {

    .school-logos {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 600px) {

    .hero-panel {
        padding: 20px;
        border-radius: 18px;
    }

    .school-logos .logo-tsp {
        height: 70px;
    }

    .school-logos .logo-imtbs {
        height: 46px;
    }

    .hero-links a {
        padding: 9px 14px;
        font-size: 13px;
    }
}

.hero-scroll {
    position: absolute;

    bottom: 30px;
    left: 50%;

    transform: translateX(-50%);

    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 10px;
    letter-spacing: 0.15em;
}

.hero-scroll span {
    width: 30px;
    height: 1px;

    background: white;
}



/* =========================================================
   DE L'IDÉE AUX ROBOTS (timeline)
========================================================= */

.project-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 70px;
    align-items: stretch;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 8px;
    top: 25px;
    bottom: 25px;

    width: 2px;

    background: var(--line);
}

.timeline-step {
    position: relative;

    display: flex;
    align-items: center;
    gap: 20px;

    width: 100%;
    height: 62px;

    background: none;
    border: 0;

    color: var(--fg-muted);

    font: inherit;
    font-size: 16px;
    text-align: left;

    cursor: pointer;

    transition: color 0.3s ease;
}

.timeline-step:hover,
.timeline-step.active {
    color: var(--fg);
}

.timeline-step.active {
    font-weight: 700;
}

.timeline-dot {
    position: relative;
    z-index: 2;
    flex-shrink: 0;

    width: 18px;
    height: 18px;

    border: 3px solid var(--line);
    border-radius: 50%;

    background: var(--bg);

    transition:
        border-color 0.3s ease,
        background 0.3s ease;
}

.timeline-step.active .timeline-dot {
    border-color: var(--fg);
    background: var(--yellow);
}

.project-display {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
}

.project-display .project-image {
    --ratio: 4 / 5;
    margin-right: -12%;
}

.project-info {
    position: relative;
    z-index: 2;
}

.project-counter {
    color: var(--accent);

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;

    margin-bottom: 25px;
}

#project-title,
#project-description {
    transition: opacity 0.18s ease;
}

#project-title.is-fading,
#project-description.is-fading {
    opacity: 0;
}

#project-description {
    font-size: 18px;
    line-height: 1.6;

    color: var(--fg-muted);
}

@media (max-width: 900px) {

    .project-layout,
    .project-display {
        grid-template-columns: 1fr;
    }

    .timeline {
        display: flex;
        gap: 20px;
        overflow-x: auto;
    }

    .timeline-line {
        display: none;
    }

    .timeline-step {
        flex-shrink: 0;
        width: auto;
    }

    /* Texte juste sous la timeline, image ensuite (le texte reste visible au tap) */
    .project-display .project-info {
        order: -1;
    }

    .project-display .project-image {
        margin: -40px 0 0;

        -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%);
        mask-image: linear-gradient(180deg, transparent, #000 40%);
    }
}

/* =========================================================
   DE L'IDÉE AUX ROBOTS — TAILLE FIXE DES IMAGES
========================================================= */

.project-image-fixed {
    width: 100%;
    max-width: 500px;
    height: 380px; /* Taille fixe pour toutes les images d'étapes */
}

.project-image-fixed img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

@media (max-width: 900px) {
    .project-image-fixed {
        height: 280px;
    }
}


/* =========================================================
   CONTACT — ARRIÈRE-PLAN AVEC CONTACT.WEBP
========================================================= */

.contact-section {
    position: relative;
    background-image: 
        linear-gradient(135deg, rgba(1, 90, 158, 0.90), rgba(1, 50, 100, 0.94)), 
        url("assets/images/contact.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.contacts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 28px;

    padding: 32px;

    border: 1px solid var(--line);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.contact-role {
    color: var(--fg-muted);
    margin-bottom: 12px;
}

.contact-phone {
    color: var(--accent);

    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.contact-phone:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .contacts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .contact-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   FOOTER
========================================================= */

.footer {
    background: var(--black);
    color: white;

    padding: 70px 40px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.footer-logo {
    display: block;

    height: 56px;
    width: auto;

    margin-bottom: 18px;
}

.footer p {
    color: #AAAAAA;
    line-height: 1.6;
}

.footer-credit {
    font-size: 14px;
}

.footer-small {
    margin-top: 24px;
    font-size: 12px;
}

.footer-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-author strong {
    color: white;
}

@media (max-width: 600px) {

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =========================================================
   COMPOSANTS — PASTILLES ET BOUTONS
========================================================= */

.chips {
    list-style: none;

    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 28px;
}

.chip {
    border: 1px solid var(--chip-border);
    border-radius: 999px;

    padding: 8px 14px;

    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;

    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-top: 28px;
    padding: 14px 26px;

    border-radius: 999px;

    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.btn--yellow {
    background: var(--yellow);
    color: var(--black);
}

.btn--yellow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}


/* =========================================================
   COMPOSANTS — PHOTOS DE PROFIL ET CADRES VIDES
========================================================= */

.avatar {
    display: block;
    flex-shrink: 0;

    width: var(--avatar-size, 120px);
    height: auto;
    aspect-ratio: 1;

    border-radius: 50%;
    border: 3px solid var(--yellow);

    object-fit: cover;
}

.avatar--md {
    --avatar-size: 88px;
}

.avatar--sm {
    --avatar-size: 56px;
    border-width: 2px;
}

.photo-missing {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
    min-height: 200px;

    padding: 12px;

    background: repeating-linear-gradient(
        135deg,
        rgba(128, 128, 128, 0.18) 0 12px,
        rgba(128, 128, 128, 0.08) 12px 24px
    );
    border: 2px dashed rgba(128, 128, 128, 0.55);

    color: var(--fg, var(--black));

    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-align: center;
    word-break: break-word;
}

.photo-missing.avatar {
    width: var(--avatar-size, 120px);
    min-height: 0;
    height: auto;
    padding: 6px;
    font-size: 10px;
}


/* =========================================================
   COMPOSANTS — PHOTO EN FONDU (.photo-fade)
   Le modificateur désigne le bord qui s'efface dans le fond.
========================================================= */

.photo-fade {
    position: relative;
    z-index: 1;
    margin: 0;
}

.photo-fade > * {
    display: block;

    width: 100%;
    height: auto;
    aspect-ratio: var(--ratio, 4 / 3);

    object-fit: cover;
}

.photo-fade--left {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
    mask-image: linear-gradient(90deg, transparent, #000 40%);
}

.photo-fade--right {
    -webkit-mask-image: linear-gradient(270deg, transparent, #000 40%);
    mask-image: linear-gradient(270deg, transparent, #000 40%);
}

.photo-fade--top {
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%);
    mask-image: linear-gradient(180deg, transparent, #000 40%);
}

.photo-fade--bottom {
    -webkit-mask-image: linear-gradient(0deg, transparent, #000 40%);
    mask-image: linear-gradient(0deg, transparent, #000 40%);
}

.photo-fade--x {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}

.photo-fade--y {
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
}


/* =========================================================
   COMPOSANTS — TEXTE + PHOTO QUI SE CHEVAUCHENT (.split)
========================================================= */

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.split-text {
    position: relative;
    z-index: 2;
}

.split--photo-right .photo-fade {
    margin-left: -12%;
}

.split--photo-left .photo-fade {
    order: -1;
    margin-right: -12%;
}

@media (max-width: 900px) {

    .split {
        grid-template-columns: 1fr;
    }

    /* Sur mobile : texte puis photo qui remonte légèrement dessous */
    .split .photo-fade,
    .split--photo-left .photo-fade,
    .split--photo-right .photo-fade {
        order: 1;
        margin: -30px 0 0;

        -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%);
        mask-image: linear-gradient(180deg, transparent, #000 40%);
    }
}


/* =========================================================
   APPARITION AU SCROLL (cachée seulement si le JS tourne)
========================================================= */

.js .reveal {
    opacity: 0;
    transform: translateY(35px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.js .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   RESPONSIVE (règles partagées ; chaque section a les siennes)
========================================================= */

@media (max-width: 600px) {

    .section {
        padding: 100px 25px;
    }

    .hero-content {
        width: calc(100% - 50px);
    }

}


/* =========================================================
   MOUVEMENT RÉDUIT
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }

}

/* =========================================================
   QUI SOMMES-NOUS — MODE EMPILÉ (par défaut, mobile, sans JS)
========================================================= */

.qui {
    position: relative;
}

.qui-track {
    position: relative;
}

.qui-panel {
    position: relative;
    z-index: 2;

    padding: 110px 40px;

    background: var(--bg);
    color: var(--fg);
}

.qui-panel-inner {
    max-width: 720px;
    margin: auto;
}

.qui-photo {
    position: relative;
    z-index: 1;

    height: clamp(260px, 60vw, 560px);
    margin: 0;

    overflow: hidden;

    background: linear-gradient(180deg, var(--from), var(--to));
}

.qui-photo-media {
    position: absolute;
    inset: 0;

    -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}

.qui-photo-media > * {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.qui-progress,
.qui-index {
    display: none;
}

@media (max-width: 600px) {

    .qui-panel {
        padding: 80px 25px;
    }
}


/* =========================================================
   QUI SOMMES-NOUS — MODE HORIZONTAL (classe posée par le JS)
========================================================= */

/* Le scroll-padding-top du html arrêterait le lien 80px trop tôt ; le padding du panneau dégage déjà la nav */
.qui.is-horizontal {
    scroll-margin-top: calc(-1 * var(--nav-h));
}

.qui.is-horizontal .qui-sticky {
    position: sticky;
    top: 0;

    height: 100vh;

    overflow: hidden;
}

.qui.is-horizontal .qui-track {
    display: flex;

    width: max-content;
    height: 100%;

    will-change: transform;
}

.qui.is-horizontal .qui-panel {
    flex: 0 0 46vw;

    height: 100%;

    display: flex;
    align-items: center;

    padding: calc(var(--nav-h) + 30px) 7vw 90px;

    /* bords transparents : la photo voisine passe légèrement dessous */
    background: linear-gradient(
        90deg,
        transparent 0,
        var(--bg) 7vw,
        var(--bg) calc(100% - 7vw),
        transparent 100%
    );
}

.qui.is-horizontal .qui-panel:first-child {
    background: linear-gradient(90deg, var(--bg) calc(100% - 7vw), transparent);
}

.qui.is-horizontal .qui-panel-inner {
    max-width: none;
    margin: 0;
}

.qui.is-horizontal .qui-photo {
    flex: 0 0 70vw;

    height: 100%;

    margin: 0 -7vw;

    background: linear-gradient(90deg, var(--from), var(--to));
}

.qui.is-horizontal .qui-photo--last {
    flex-basis: 60vw;
    margin-right: 0;
}

.qui.is-horizontal .qui-photo-media {
    inset: 0 -8%;

    transform: translate3d(var(--parallax, 0px), 0, 0);

    -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}

.qui.is-horizontal .qui-progress {
    display: block;

    position: absolute;
    left: 7vw;
    right: 7vw;
    bottom: 40px;
    z-index: 3;

    height: 3px;

    background: rgba(128, 128, 128, 0.25);
}

.qui-progress-bar {
    display: block;

    height: 100%;

    background: var(--yellow);

    transform: scaleX(0);
    transform-origin: left;
}

.qui.is-horizontal .qui-index {
    display: block;

    position: absolute;
    right: 7vw;
    bottom: 58px;
    z-index: 3;

    padding: 6px 12px;
    border-radius: 999px;

    background: rgba(17, 17, 17, 0.75);
    color: white;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
}


/* =========================================================
   PROJETS PHARES — TEXTE + COLONNES PHOTO DIAGONALES
========================================================= */

.feature {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
}

.feature--photos-left {
    grid-template-columns: 1.1fr 1fr;
}

.feature-text {
    position: relative;
    z-index: 2;
}

.photo-wall {
    position: relative;
    z-index: 1;

    height: min(85vh, 760px);

    overflow: hidden;

    /* fondu haut/bas + fondu côté texte (le mur passe sous le paragraphe) */
    -webkit-mask-image:
        linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent),
        linear-gradient(90deg, transparent, #000 25%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent),
        linear-gradient(90deg, transparent, #000 25%);
    mask-composite: intersect;
}

.feature--photos-right .photo-wall {
    margin-left: -10%;
}

.feature--photos-left .photo-wall {
    margin-right: -10%;

    -webkit-mask-image:
        linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent),
        linear-gradient(270deg, transparent, #000 25%);
    mask-image:
        linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent),
        linear-gradient(270deg, transparent, #000 25%);
}

.photo-wall-inner {
    position: absolute;
    inset: -20% -10%;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: start;

    transform: rotate(var(--tilt, -6deg));
}

/* marge (et pas gap) : la hauteur dupliquée reste exactement 2× → boucle sans saut */
.photo-col > * {
    display: block;

    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    min-height: 0;

    margin-bottom: 16px;

    border-radius: 8px;

    object-fit: cover;
}

.photo-wall.is-looping .photo-col {
    animation: wall-down var(--duration, 75s) linear infinite;
    animation-delay: var(--delay, 0s);
}

.photo-wall:hover .photo-col {
    animation-play-state: paused;
}

@keyframes wall-down {
    from {
        transform: translateY(-50%);
    }
    to {
        transform: translateY(0);
    }
}

@media (max-width: 900px) {

    .feature,
    .feature--photos-left {
        grid-template-columns: 1fr;
    }

    .feature--photos-left .photo-wall {
        order: 1;
    }

    .feature--photos-right .photo-wall,
    .feature--photos-left .photo-wall {
        height: 60vh;
        margin: -30px 0 0;

        -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
        mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
    }
}


/* =========================================================
   FORMATIONS / JEUNES — compléments
========================================================= */

.split + .split {
    margin-top: 110px;
}

.actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;

    margin-top: 80px;
}

.action {
    padding: 32px;

    border: 1px solid var(--line);
    border-radius: 16px;

    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}

.action:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.action svg {
    width: 36px;
    height: 36px;

    color: var(--accent);

    margin-bottom: 18px;
}

.action .subtitle {
    font-size: 28px;
    margin-bottom: 10px;
}

.action p {
    color: var(--fg-muted);
    line-height: 1.6;
}

@media (max-width: 900px) {

    .split + .split {
        margin-top: 70px;
    }

    .actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   CONTACT
========================================================= */

.contact-section {
    position: relative;
    background-image: 
        linear-gradient(135deg, rgba(1, 90, 158, 0.92), rgba(1, 60, 120, 0.95)), 
        url("assets/images/contact.webp");
    background-size: cover;
    background-position: center;
}

.contacts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 28px;

    padding: 32px;

    border: 1px solid var(--line);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.contact-role {
    color: var(--fg-muted);
    margin-bottom: 12px;
}

.contact-phone {
    color: var(--accent);

    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.contact-phone:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {

    .contacts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {

    .contact-card {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =========================================================
   PRINTECH
========================================================= */

.brand-int {
    color: var(--blue);
}

.brand-ech {
    color: var(--gray);
}

.person-card {
    display: flex;
    align-items: center;
    gap: 20px;

    margin-top: 32px;
}

.person-label {
    color: var(--accent);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    margin-bottom: 6px;
}

.soon {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    margin-top: 32px;
    padding: 12px 20px;

    border: 1px dashed var(--chip-border);
    border-radius: 999px;

    color: var(--fg-muted);

    font-size: 14px;
    font-weight: 600;
}

.soon-dot {
    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: var(--yellow);

    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(251, 205, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(251, 205, 0, 0);
    }
}


/* =========================================================
   AUTRES LIENS UTILES
========================================================= */

.link-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.link-tile {
    display: flex;
    align-items: center;
    gap: 18px;

    padding: 26px 30px;

    border: 1px solid var(--line);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.08);

    font-size: 20px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.link-tile:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-3px);
}

.link-tile svg {
    flex-shrink: 0;

    width: 32px;
    height: 32px;

    color: var(--yellow);
}

.link-tile-arrow {
    margin-left: auto;
    color: var(--yellow);
}

@media (max-width: 600px) {

    .link-tiles {
        grid-template-columns: 1fr;
    }
}
