/* ==========================================================
   COLLÈGE LASALLE CASABLANCA
   Étape 2 : mise en page, couleurs, cartes, boutons, hover
   Étape 3 : responsive (à la fin du fichier, avec @media)
   Tout est en HTML + CSS, sans JavaScript.
   ========================================================== */

/* ---------- 1. Variables : palette de la maquette ---------- */
:root {
    --navy: #0D1B2A;
    --navy-2: #142739;          /* surface plus claire sur fond sombre */
    --navy-3: #08131F;          /* footer, plus profond */
    --red: #E31E24;
    --red-dark: #C4141A;
    --teal: #1F4E63;            /* bleu du logo */
    --paper: #F5F5F5;
    --grey: #6C757D;
    --white: #FFFFFF;

    --line-dark: rgb(13 27 42 / 0.1);       /* bordures sur fond clair */
    --line-light: rgb(255 255 255 / 0.12);  /* bordures sur fond sombre */

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    --radius: 24px;
}

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

html {
    overflow-x: hidden;
    overflow-x: clip;
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--navy);
    background: var(--white);
    overflow-x: hidden;
    overflow-x: clip;
}

img {
    display: block;
    max-width: 100%;
}

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

ul,
ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- 3. Typographie commune ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red);
}

.tag::before {
    content: "";
    width: 28px;
    height: 2px;
    background: currentColor;
}

.title {
    font-size: clamp(32px, 4.2vw, 54px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.title em,
.hero-title em {
    font-style: italic;
    color: var(--red);
}

.text {
    margin-bottom: 16px;
    color: var(--grey);
    line-height: 1.75;
}

.section {
    padding: 120px 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 56px;
}

.head-text {
    max-width: 380px;
    color: var(--grey);
}

/* ---------- 4. Boutons et liens ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 14px 28px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out),
                border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out),
                box-shadow 0.2s var(--ease-out);
}

.arrow {
    display: inline-block;
    transition: transform 0.2s var(--ease-out);
}

.btn:hover .arrow,
.link-more:hover .arrow {
    transform: translateX(4px);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0) scale(0.97);
    transition-duration: 0.1s;
}

.btn-red {
    background: var(--red);
    color: var(--white);
}

.btn-red:hover {
    background: var(--red-dark);
    box-shadow: 0 10px 24px rgb(227 30 36 / 0.35);
}

.btn-ghost {
    border-color: var(--line-light);
    color: var(--white);
}

.btn-ghost:hover {
    background: var(--white);
    color: var(--navy);
}

.btn-dark {
    background: var(--navy);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--red);
}

.btn-sm {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 13px;
}

.btn-full {
    width: 100%;
}

.link-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--red);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.link-more.light {
    color: var(--white);
}

/* ---------- 5. Header flottant ---------- */
.header {
    position: fixed;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 16px;
}

.header-bar {
    position: relative;
    isolation: isolate;
    max-width: 1240px;
    height: 68px;
    margin: 0 auto;
    padding: 0 12px 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-radius: 22px;
    color: var(--white);
}

/* Fond en verre dépoli (sur un pseudo-élément pour ne pas gêner le menu mobile) */
.header-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    border: 1px solid var(--line-light);
    background: rgb(13 27 42 / 0.72);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: 0 10px 30px rgb(0 0 0 / 0.18);
}

.logo {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-badge {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--white);
}

.logo-badge img {
    width: 34px;
    height: 34px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-text strong {
    font-size: 16px;
    font-weight: 800;
}

.logo-text small {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.6;
}

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-list {
    display: flex;
    gap: 2px;
}

.nav-list a {
    display: block;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: rgb(255 255 255 / 0.78);
    transition: background-color 0.15s var(--ease-out), color 0.15s var(--ease-out);
}

.nav-list a:hover {
    background: rgb(255 255 255 / 0.08);
    color: var(--white);
}

.menu-toggle,
.burger,
.nav-extra {
    display: none;
}

/* ---------- 6. Accueil (hero) ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 150px;
    overflow-x: clip;
    background: var(--navy);
    color: var(--white);
}

/* Quadrillage discret en fond */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, black 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, black 20%, transparent 75%);
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    top: 10%;
    right: 5%;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgb(227 30 36 / 0.35), transparent 65%);
    filter: blur(40px);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 64px;
    padding-bottom: 150px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    padding: 8px 16px;
    border: 1px solid var(--line-light);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.05);
    font-size: 13px;
    font-weight: 600;
}

.dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
}

.dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--red);
    animation: pulse 2s var(--ease-out) infinite;
}

@keyframes pulse {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(3); opacity: 0; }
}

.hero-title {
    margin-bottom: 28px;
    font-size: clamp(44px, 6.6vw, 96px);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-title .line {
    display: block;
}

/* "professionnel" : police serif italique pour le contraste */
.hero-title .serif {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1.04em;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.hero-lead {
    max-width: 480px;
    margin-bottom: 36px;
    font-size: 18px;
    color: rgb(255 255 255 / 0.72);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-mini {
    display: flex;
    gap: 36px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line-light);
    font-size: 13px;
    color: rgb(255 255 255 / 0.6);
}

.hero-mini strong {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--white);
}

/* Composition visuelle : rappelle le blason du logo */
.hero-visual {
    position: relative;
    height: clamp(440px, 62vh, 620px);
}

.shield-red {
    position: absolute;
    inset: 9% -3% -3% 12%;
    border-radius: 28px 28px 50% 50% / 28px 28px 18% 18%;
    background: var(--red);
}

.shield-teal {
    position: absolute;
    top: -22px;
    right: -22px;
    width: 110px;
    height: 110px;
    border-radius: 14px 40px 40px 40px;
    background: var(--teal);
    animation: floaty 6s var(--ease-in-out) infinite alternate;
}

@keyframes floaty {
    to { transform: translate(-8px, 10px) rotate(6deg); }
}

.hero-photo {
    position: absolute;
    inset: 0 9% 9% 0;
    overflow: hidden;
    border-radius: 28px 28px 50% 50% / 28px 28px 18% 18%;
    box-shadow: 0 30px 60px rgb(0 0 0 / 0.35);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: settle 1.6s var(--ease-out) both;
}

@keyframes settle {
    from { transform: scale(1.12); }
    to { transform: scale(1); }
}

.float-card {
    position: absolute;
    left: -40px;
    bottom: 16%;
    width: 220px;
    padding: 18px 20px;
    border-radius: 20px;
    background: var(--white);
    color: var(--navy);
    box-shadow: 0 20px 40px rgb(0 0 0 / 0.25);
    animation: popIn 0.7s var(--ease-out) 0.8s both;
}

.float-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--grey);
}

.float-number {
    display: block;
    margin: 2px 0 10px;
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
}

.bar {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: var(--paper);
    overflow: hidden;
}

.bar span {
    display: block;
    width: 90%;
    height: 100%;
    border-radius: inherit;
    background: var(--red);
    transform-origin: left;
    animation: grow 1s var(--ease-out) 1.3s both;
}

@keyframes grow {
    from { transform: scaleX(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(24px) scale(0.92); }
}

.round-badge {
    position: absolute;
    top: 7%;
    left: -56px;
    display: grid;
    place-items: center;
    width: 136px;
    height: 136px;
    border-radius: 50%;
    border: 1px solid var(--line-light);
    background: var(--navy);
    animation: popIn 0.7s var(--ease-out) 1s both;
}

.round-badge svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    fill: var(--white);
    animation: spin 18s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.round-arrow {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--red);
    font-size: 20px;
    font-weight: 700;
    transition: transform 0.2s var(--ease-out);
}

.round-badge:hover .round-arrow {
    transform: translateY(4px) scale(1.06);
}

/* Apparition du texte du hero (en cascade) */
.hero-text > *,
.hero-title .line {
    animation: rise 0.8s var(--ease-out) both;
}

.hero-title .line:nth-child(1) { animation-delay: 0.1s; }
.hero-title .line:nth-child(2) { animation-delay: 0.17s; }
.hero-title .line:nth-child(3) { animation-delay: 0.24s; }
.hero-lead { animation-delay: 0.32s; }
.hero-actions { animation-delay: 0.4s; }
.hero-mini { animation-delay: 0.48s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(36px); }
}

/* Bandeau défilant rouge */
.marquee {
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: -34px;
    z-index: 5;
    padding: 18px 0;
    overflow: hidden;
    background: var(--red);
    transform: rotate(-2deg);
    box-shadow: 0 14px 30px rgb(227 30 36 / 0.25);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 28px;
    width: max-content;
    animation: marquee 32s linear infinite;
}

.marquee-track span {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    white-space: nowrap;
}

.marquee-track i {
    font-style: normal;
    color: var(--navy);
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee {
    to { transform: translateX(calc(-50% - 14px)); }
}

/* ---------- 7. Présentation de l'école ---------- */
.about {
    padding-top: 170px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
}

.about-collage {
    position: relative;
    aspect-ratio: 1 / 1.05;
}

.collage-main {
    width: 82%;
    height: 84%;
    object-fit: cover;
    border-radius: 28px 28px 28px 120px;
}

.collage-small {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 48%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 8px solid var(--white);
    border-radius: 28px;
    box-shadow: 0 24px 48px rgb(13 27 42 / 0.18);
}

.years-badge {
    position: absolute;
    top: 8%;
    right: 4%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 16px 32px rgb(227 30 36 / 0.3);
}

.years-badge strong {
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
}

.years-badge span {
    font-size: 12px;
    font-weight: 600;
}

.about-content .title {
    margin-bottom: 24px;
}

.pillars {
    margin: 32px 0 40px;
}

.pillars li {
    display: grid;
    grid-template-columns: 56px 1fr;
    padding: 16px 0;
    border-top: 1px solid var(--line-dark);
    transition: transform 0.25s var(--ease-out);
}

.pillars li:last-child {
    border-bottom: 1px solid var(--line-dark);
}

.pillars li:hover {
    transform: translateX(8px);
}

.pillar-num {
    font-size: 14px;
    font-weight: 800;
    color: var(--red);
}

.pillars strong {
    display: block;
    font-size: 17px;
}

.pillars span span,
.pillars div span {
    font-size: 14px;
    color: var(--grey);
}

/* Chiffres clés */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 110px;
}

.stats li {
    padding: 34px 28px;
    border-radius: var(--radius);
    background: var(--paper);
    transition: transform 0.25s var(--ease-out);
}

.stats li:hover {
    transform: translateY(-6px);
}

.stats strong {
    display: block;
    margin-bottom: 8px;
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
}

.stats span {
    font-size: 14px;
    font-weight: 500;
    color: var(--grey);
}

.stats .stat-highlight {
    background: var(--red);
    color: var(--white);
}

.stats .stat-highlight span {
    color: rgb(255 255 255 / 0.85);
}

/* ---------- 8. Formations (liste interactive) ---------- */
.formations {
    background: var(--navy);
    color: var(--white);
}

.formations .head-text {
    color: rgb(255 255 255 / 0.65);
}

.programs {
    border-top: 1px solid var(--line-light);
}

.program a {
    position: relative;
    display: grid;
    grid-template-columns: 72px 1fr auto 56px;
    align-items: center;
    gap: 24px;
    padding: 30px 24px;
    border-bottom: 1px solid var(--line-light);
    isolation: isolate;
}

/* Fond rouge qui glisse depuis la gauche au survol */
.program a::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease-out);
}

.p-num {
    font-size: 14px;
    font-weight: 700;
    color: rgb(255 255 255 / 0.45);
    transition: color 0.2s;
}

.p-title {
    display: block;
    font-size: clamp(22px, 2.6vw, 34px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    transition: transform 0.35s var(--ease-out);
}

.p-desc {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: rgb(255 255 255 / 0.6);
    transition: color 0.2s;
}

.p-tags {
    display: flex;
    gap: 8px;
}

.p-tags span {
    padding: 6px 12px;
    border: 1px solid var(--line-light);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.p-arrow {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid var(--line-light);
    border-radius: 50%;
    font-size: 20px;
    transition: transform 0.35s var(--ease-out), background-color 0.2s, color 0.2s;
}

/* Miniature qui apparaît au survol */
.p-thumb {
    position: absolute;
    top: 50%;
    right: 270px;
    z-index: 3;
    width: 200px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgb(0 0 0 / 0.35);
    opacity: 0;
    transform: translateY(-50%) rotate(-12deg) scale(0.7);
    transition: opacity 0.25s var(--ease-out), transform 0.5s var(--ease-out);
    pointer-events: none;
}

.program a:hover::before,
.program a:focus-visible::before {
    transform: scaleX(1);
}

.program a:hover .p-num,
.program a:hover .p-desc {
    color: var(--white);
}

.program a:hover .p-title {
    transform: translateX(10px);
}

.program a:hover .p-arrow {
    background: var(--white);
    color: var(--red);
    transform: rotate(-45deg);
}

.program a:hover .p-thumb {
    opacity: 1;
    transform: translateY(-50%) rotate(-4deg) scale(1);
}

/* ---------- 9. Campus (grille "bento") ---------- */
.campus {
    background: var(--paper);
}

.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 270px;
    gap: 16px;
}

.tile {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.tile-big {
    grid-column: span 2;
    grid-row: span 2;
}

.tile-wide {
    grid-column: span 2;
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-out);
}

.tile figcaption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 22px;
    background: linear-gradient(180deg, transparent 45%, rgb(13 27 42 / 0.85));
    color: var(--white);
}

.chip {
    padding: 8px 16px;
    border: 1px solid rgb(255 255 255 / 0.25);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
    transition: background-color 0.2s var(--ease-out), border-color 0.2s;
}

.tile p {
    max-width: 340px;
    margin-top: 12px;
    font-size: 14px;
    color: rgb(255 255 255 / 0.85);
}

.tile:hover img {
    transform: scale(1.06);
}

.tile:hover .chip {
    background: var(--red);
    border-color: var(--red);
}

/* ---------- 10. Actualités ---------- */
.news-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 24px;
}

.news-featured {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    border-radius: 28px;
}

.news-featured img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-out);
}

.news-featured:hover img {
    transform: scale(1.05);
}

.news-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 40px;
    background: linear-gradient(180deg, rgb(13 27 42 / 0) 10%, rgb(13 27 42 / 0.6) 45%, rgb(13 27 42 / 0.95));
    color: var(--white);
}

.news-overlay h3 {
    margin: 14px 0 12px;
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.news-overlay p {
    max-width: 460px;
    margin-bottom: 22px;
    color: rgb(255 255 255 / 0.8);
}

.news-cat {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.news time {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.7;
}

.news-side {
    display: grid;
    gap: 24px;
}

.news-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgb(13 27 42 / 0.1);
}

.news-img {
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-out);
}

.news-card:hover .news-img img {
    transform: scale(1.08);
}

.news-body {
    padding: 26px;
}

.news-body h3 {
    margin: 14px 0 18px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

/* ---------- 11. Galerie (défilement horizontal) ---------- */
.gallery-section {
    background: var(--paper);
}

.scroll-hint {
    font-weight: 700;
    color: var(--navy);
}

.gallery {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px max(24px, calc((100vw - 1192px) / 2)) 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: max(24px, calc((100vw - 1192px) / 2));
    scrollbar-width: thin;
    scrollbar-color: var(--red) transparent;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
}

.g-item {
    position: relative;
    flex: 0 0 auto;
    width: 320px;
    height: 360px;
    overflow: hidden;
    border-radius: var(--radius);
    scroll-snap-align: start;
}

.g-tall {
    width: 300px;
    height: 450px;
}

.g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.g-item figcaption {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--white);
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s var(--ease-out), transform 0.35s var(--ease-out);
}

.g-item:hover img {
    transform: scale(1.06);
}

.g-item:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}

/* Défilement horizontal piloté par le défilement vertical (CSS uniquement).
   Les navigateurs qui ne le gèrent pas gardent la galerie défilante classique. */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .gallery-section {
            padding: 0;
        }

        .gallery-pin {
            height: 280vh;
            view-timeline-name: --galerie;
        }

        .gallery-sticky {
            position: sticky;
            top: 0;
            height: 100vh;
            height: 100dvh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding-top: 70px;
            overflow: hidden;
        }

        .gallery-sticky .section-head {
            margin-bottom: 40px;
        }

        .gallery {
            width: max-content;
            overflow: visible;
            scroll-snap-type: none;
            padding-right: 24px;
            -webkit-mask-image: none;
            mask-image: none;
            animation: galerie-glisse linear both;
            animation-timeline: --galerie;
            animation-range: contain 8% contain 92%;
        }

        .g-item {
            max-height: 52vh;
        }
    }
}

@keyframes galerie-glisse {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% + 100vw)); }
}

/* ---------- 12. Contact ---------- */
.contact {
    background: var(--navy);
    color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 72px;
}

.title.big {
    margin-bottom: 20px;
    font-size: clamp(40px, 5.6vw, 76px);
}

.contact .text {
    max-width: 440px;
    color: rgb(255 255 255 / 0.7);
}

.contact-list {
    margin-top: 32px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line-light);
    font-size: 15px;
}

.contact-list small {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 0.5);
}

.contact-list a {
    transition: color 0.15s;
}

.contact-list a:hover {
    color: var(--red);
}

.c-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line-light);
    border-radius: 50%;
    background: var(--navy-2);
}

.c-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--red);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-form {
    padding: 40px;
    border: 1px solid var(--line-light);
    border-radius: 28px;
    background: var(--navy-2);
}

.contact-form h3 {
    margin-bottom: 24px;
    font-size: 22px;
    font-weight: 800;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field {
    position: relative;
    margin-bottom: 14px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 26px 16px 10px;
    border: 1px solid var(--line-light);
    border-radius: 14px;
    background: rgb(255 255 255 / 0.04);
    color: var(--white);
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.2s var(--ease-out), background-color 0.2s, box-shadow 0.2s;
}

.field textarea {
    resize: vertical;
}

.field select {
    padding-right: 44px;
    text-overflow: ellipsis;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.field option {
    background: var(--navy);
}

/* Labels flottants */
.field label {
    position: absolute;
    top: 18px;
    left: 17px;
    font-size: 15px;
    color: rgb(255 255 255 / 0.55);
    transform-origin: left top;
    pointer-events: none;
    transition: transform 0.2s var(--ease-out), color 0.2s;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field-select label {
    transform: translateY(-10px) scale(0.78);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--red);
    background-color: rgb(255 255 255 / 0.07);
    box-shadow: 0 0 0 4px rgb(227 30 36 / 0.18);
}

.field input:focus + label,
.field textarea:focus + label,
.field select:focus + label {
    color: #FF6B6F;
}

.contact-form .btn {
    margin-top: 8px;
}

/* ---------- 13. Footer ---------- */
.footer {
    background: var(--navy-3);
    color: rgb(255 255 255 / 0.65);
    font-size: 14px;
}

.footer-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 80px 0 56px;
    border-bottom: 1px solid var(--line-light);
}

.footer-cta h2 {
    max-width: 620px;
    font-size: clamp(28px, 3.8vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: 40px;
    padding: 56px 0;
}

.footer .logo {
    color: var(--white);
}

.footer-about p {
    max-width: 300px;
    margin: 20px 0;
}

.footer h4 {
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white);
}

.footer li {
    margin-bottom: 12px;
}

.footer-grid ul a {
    display: inline-block;
    transition: color 0.15s, transform 0.2s var(--ease-out);
}

.footer-grid ul a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.socials {
    display: flex;
    gap: 10px;
}

.socials a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-light);
    border-radius: 50%;
    transition: background-color 0.2s var(--ease-out), border-color 0.2s, transform 0.2s var(--ease-out);
}

.socials svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--white);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.socials a:hover {
    background: var(--red);
    border-color: var(--red);
    transform: translateY(-3px);
}

/* Grand mot "LaSalle" en fond */
.footer-word {
    font-size: clamp(80px, 20vw, 290px);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.06em;
    text-align: center;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.14), rgb(255 255 255 / 0));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    user-select: none;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0;
    border-top: 1px solid var(--line-light);
    font-size: 13px;
    color: rgb(255 255 255 / 0.5);
}

.footer-bottom p:last-child {
    display: flex;
    gap: 20px;
}

.footer-bottom a:hover {
    color: var(--white);
}

/* ---------- 14. Apparition au défilement (CSS uniquement) ---------- */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reveal {
            animation: reveal var(--ease-out) both;
            animation-timeline: view();
            animation-range: entry 0% entry 60%;
        }
    }
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(48px);
    }
}

/* Accessibilité : focus visible au clavier */
a:focus-visible,
button:focus-visible,
.burger:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 3px;
}

/* Accessibilité : moins d'animations si l'utilisateur le demande */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ==========================================================
   ÉTAPE 3 : RESPONSIVE
   ========================================================== */

/* ---------- Écrans tactiles : on montre ce qui était au survol ---------- */
@media (hover: none) {
    .p-thumb {
        display: none;
    }

    .g-item figcaption {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Tablette (1024px et moins) ---------- */
@media (max-width: 1024px) {

    /* Menu burger */
    .burger {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: rgb(255 255 255 / 0.1);
        cursor: pointer;
    }

    .burger span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: var(--white);
        transition: transform 0.3s var(--ease-out);
    }

    .menu-toggle:checked + .burger span:nth-child(1) {
        transform: translateY(4px) rotate(45deg);
    }

    .menu-toggle:checked + .burger span:nth-child(2) {
        transform: translateY(-4px) rotate(-45deg);
    }

    /* Menu plein écran */
    .nav {
        position: fixed;
        inset: 0;
        z-index: 1;
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 28px;
        padding: 112px 28px 32px;
        padding-bottom: max(32px, env(safe-area-inset-bottom));
        overflow-y: auto;
        background:
            radial-gradient(circle at 100% 0%, rgb(227 30 36 / 0.28), transparent 45%),
            var(--navy);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s var(--ease-out), visibility 0.3s;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        counter-reset: menu;
    }

    .nav-list li {
        counter-increment: menu;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-out);
    }

    .nav-list a {
        display: flex;
        align-items: center;
        gap: 18px;
        padding: 14px 0;
        border-bottom: 1px solid var(--line-light);
        border-radius: 0;
        font-size: clamp(24px, min(7vw, 4.6vh), 40px);
        font-weight: 800;
        letter-spacing: -0.02em;
        color: var(--white);
    }

    /* Numéro 01, 02... devant chaque lien */
    .nav-list a::before {
        content: "0" counter(menu);
        min-width: 24px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0;
        color: var(--red);
    }

    /* Flèche à droite */
    .nav-list a::after {
        content: "→";
        margin-left: auto;
        font-size: 20px;
        font-weight: 600;
        opacity: 0.35;
        transition: transform 0.2s var(--ease-out), opacity 0.2s;
    }

    .nav-list a:hover {
        background: none;
        color: var(--red);
    }

    .nav-list a:hover::after {
        opacity: 1;
        transform: translateX(4px);
    }

    .nav .btn {
        width: 100%;
        min-height: 56px;
        font-size: 15px;
        flex-shrink: 0;
    }

    .nav-extra {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-top: auto;
        padding-top: 8px;
        font-size: 14px;
        color: rgb(255 255 255 / 0.55);
    }

    .nav-extra a {
        font-weight: 600;
        color: var(--white);
        overflow-wrap: anywhere;
    }

    .nav .btn,
    .nav-extra {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.35s var(--ease-out) 0.3s, transform 0.45s var(--ease-out) 0.3s;
    }

    .menu-toggle:checked ~ .nav {
        opacity: 1;
        visibility: visible;
    }

    .menu-toggle:checked ~ .nav li,
    .menu-toggle:checked ~ .nav .btn,
    .menu-toggle:checked ~ .nav .nav-extra {
        opacity: 1;
        transform: none;
    }

    .menu-toggle:checked ~ .nav li:nth-child(2) { transition-delay: 0.04s; }
    .menu-toggle:checked ~ .nav li:nth-child(3) { transition-delay: 0.08s; }
    .menu-toggle:checked ~ .nav li:nth-child(4) { transition-delay: 0.12s; }
    .menu-toggle:checked ~ .nav li:nth-child(5) { transition-delay: 0.16s; }
    .menu-toggle:checked ~ .nav li:nth-child(6) { transition-delay: 0.2s; }
    .menu-toggle:checked ~ .nav li:nth-child(7) { transition-delay: 0.24s; }

    /* Menu ouvert : la barre du haut devient transparente et la page ne défile plus */
    .header-bar:has(.menu-toggle:checked)::before {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    body:has(.menu-toggle:checked) {
        overflow: hidden;
    }

    /* Hero */
    .hero {
        padding-top: 140px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 72px;
        padding-bottom: 130px;
    }

    .hero-visual {
        width: min(100%, 560px);
        height: 480px;
        margin-left: auto;
        margin-right: 22px;
    }

    .round-badge {
        left: -40px;
    }

    /* Sections */
    .section {
        padding: 96px 0;
    }

    .about {
        padding-top: 150px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .about-collage {
        width: min(100%, 560px);
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 80px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .program a {
        grid-template-columns: 56px 1fr 52px;
    }

    .p-tags {
        display: none;
    }

    .p-thumb {
        right: 100px;
    }

    .bento {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 230px;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

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

/* ---------- Mobile (600px et moins) ---------- */
@media (max-width: 600px) {

    .container {
        padding: 0 18px;
    }

    .header {
        top: 10px;
        padding: 0 10px;
    }

    .header-bar {
        height: 62px;
        padding: 0 8px 0 8px;
    }

    .logo-badge {
        width: 42px;
        height: 42px;
    }

    .logo-badge img {
        width: 30px;
        height: 30px;
    }

    .logo-text strong {
        font-size: 15px;
    }

    .nav {
        padding: 96px 22px 28px;
        padding-bottom: max(28px, env(safe-area-inset-bottom));
    }

    .hero {
        padding-top: 112px;
    }

    .hero-title {
        font-size: clamp(40px, 12vw, 56px);
    }

        .hero-lead {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-mini {
        justify-content: space-between;
        gap: 12px;
        margin-top: 36px;
    }

    .hero-mini strong {
        font-size: 20px;
    }

    .hero-grid {
        gap: 56px;
        padding-bottom: 110px;
    }

    .hero-visual {
        height: 380px;
        margin-right: 14px;
    }

    .shield-teal {
        width: 76px;
        height: 76px;
        top: -14px;
        right: -14px;
    }

    .float-card {
        left: -6px;
        bottom: 10%;
        width: 180px;
        padding: 14px 16px;
    }

    .float-number {
        font-size: 30px;
    }

    .round-badge {
        top: -36px;
        left: -6px;
        width: 108px;
        height: 108px;
    }

    .round-badge svg {
        font-size: 12px;
    }

    .round-arrow {
        width: 40px;
        height: 40px;
    }

    .marquee {
        bottom: -26px;
        padding: 14px 0;
    }

    .marquee-track span {
        font-size: 16px;
    }

    .section {
        padding: 80px 0;
    }

    .about {
        padding-top: 120px;
    }

    .years-badge {
        width: 110px;
        height: 110px;
        right: 0;
    }

    .years-badge strong {
        font-size: 32px;
    }

    .years-badge span {
        font-size: 11px;
    }

    .stats {
        gap: 10px;
        margin-top: 64px;
    }

    .stats li {
        padding: 24px 18px;
    }

    .stats strong {
        font-size: 36px;
    }

    .stats span {
        font-size: 13px;
    }

    .section-head {
        margin-bottom: 40px;
    }

    .program a {
        grid-template-columns: 1fr 44px;
        gap: 14px;
        padding: 24px 6px;
    }

    .p-num {
        display: none;
    }

    .p-title {
        font-size: 21px;
    }

    .p-arrow {
        width: 44px;
        height: 44px;
        font-size: 17px;
    }

    .bento {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }

    .tile-big,
    .tile-wide {
        grid-column: auto;
        grid-row: auto;
    }

    .tile-big {
        grid-row: span 1;
    }

    .news-featured {
        min-height: 460px;
    }

    .news-overlay {
        padding: 24px;
    }

    .news-card {
        grid-template-columns: 1fr;
    }

    .news-img img {
        aspect-ratio: 16 / 9;
    }

    .news-body {
        padding: 22px;
    }

    .g-item {
        width: 250px;
        height: 300px;
    }

    .g-tall {
        width: 230px;
        height: 360px;
    }

    .contact-form {
        padding: 26px 20px;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-list li {
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    .footer-cta {
        padding: 64px 0 44px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 44px 0;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
