/* ============================================================
   PORTFOLIO — STYLE.CSS
   Refonte accueil intégrée + pages existantes
   ============================================================ */

/* ========== ROOT & GLOBAL ========== */

:root {
    /* Couleurs */
    --ink:        #0a192f;
    --ink-body:   #0b162c;
    --paper:      #f8fafc;
    --white:      #ffffff;
    --bordeaux:   #911026;
    --bordeaux-d: #7a0d20;

    --t-ink:      #0a192f;
    --t-body:     #334155;
    --t-body-2:   #475569;
    --t-muted:    #64748b;

    --t-on-dark:   #ffffff;
    --t-on-dark-2: rgba(255,255,255,0.72);
    --t-on-dark-3: rgba(255,255,255,0.45);

    --line-light: #e2e8f0;
    --line-paper: rgba(10,25,47,0.10);
    --line-dark:  rgba(255,255,255,0.12);

    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --wrap: 1200px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --nav-offset: 68px;
    --nav-offset-mobile: 66px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--t-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    text-align: center;
    padding-top: var(--nav-offset);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Primitives ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

.sec { padding: clamp(72px, 11vw, 132px) 0; position: relative; }
.sec--paper { background: var(--paper); color: var(--t-body); }
.sec--ink   { background: var(--ink);   color: var(--t-on-dark); }

.eyebrow {
    font-family: var(--sans);
    font-size: 0.74rem; font-weight: 600;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--bordeaux);
    display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--bordeaux); display: inline-block; }
.sec--ink .eyebrow { color: var(--t-on-dark-2); }
.sec--ink .eyebrow::before { background: var(--bordeaux); }

.sec-title {
    font-family: var(--sans);
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--t-ink);
}
.sec--ink .sec-title { color: var(--t-on-dark); }
.sec-title em { font-style: normal; color: var(--bordeaux); }
.sec--ink .sec-title em { color: var(--t-on-dark); }

.lead {
    font-size: clamp(1rem, 1.35vw, 1.14rem);
    line-height: 1.75; color: var(--t-body);
    max-width: 60ch; text-align: justify;
}
.sec--ink .lead { color: var(--t-on-dark-2); text-align: left; }

/* ========== NAVIGATION & BURGER MENU ========== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background: var(--ink);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    transition: background .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

nav.scrolled {
    background: var(--ink);
    border-bottom-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 34px rgba(2, 8, 20, 0.45);
}

.nav-wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 30px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    transition: padding .35s var(--ease);
}

nav.scrolled .nav-wrap { padding: 30px 32px; }

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.nav-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #ffffff;
    color: var(--ink);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.30);
}

.nav-name {
    color: #fff;
    font-weight: 600;
    font-size: 1.04rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

nav ul li a {
    font-family: var(--sans);
    text-decoration: none;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.8rem;
    padding: 9px 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
    background-color: transparent;
    transition: background-color 0.22s var(--ease), color 0.22s var(--ease);
}

nav ul li a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.10);
}

nav ul li a.active {
    color: var(--ink);
    background-color: #ffffff;
}

/* Burger menu (visible uniquement en mobile via media query) */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #ffffff;
}

.navbar-toggler-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: currentColor;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: currentColor;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    bottom: -8px;
}

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

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--ink);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 128px 0 84px;
    margin-top: calc(var(--nav-offset) * -1);
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(10,25,47,0.55), rgba(10,25,47,0.78)),
        radial-gradient(ellipse 90% 70% at 30% 40%, rgba(10,25,47,0.35), rgba(10,25,47,0.85));
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1.3fr 0.8fr;
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
}

.hero-text {
    text-align: left;
}

.hero-title {
    font-family: var(--sans);
    font-weight: 600;
    font-size: clamp(2.8rem, 7.5vw, 5.4rem);
    line-height: 1.0;
    letter-spacing: -0.035em;
    color: #fff;
    margin-bottom: 28px;
}

.hero-role {
    font-size: clamp(1.05rem, 1.6vw, 1.28rem);
    line-height: 1.6;
    color: var(--t-on-dark-2);
    max-width: 46ch;
    margin-bottom: 40px;
}

.hero-role strong { color: #fff; font-weight: 600; }

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

/* Buttons */
.btn {
    font-family: var(--sans);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 15px 30px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
    border: 1px solid transparent;
}
.btn svg { width: 17px; height: 17px; transition: transform .25s var(--ease); }
.btn-primary { background: var(--bordeaux); color: #fff; box-shadow: 0 12px 30px rgba(145,16,38,0.30); }
.btn-primary:hover { background: var(--bordeaux-d); transform: translateY(-3px); box-shadow: 0 18px 40px rgba(145,16,38,0.40); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.06); transform: translateY(-3px); }

/* Hero photo / portrait */
.hero-photo { position: relative; justify-self: center; }
.hero-photo-frame {
    position: relative;
    width: clamp(240px, 26vw, 360px);
    aspect-ratio: 4/5;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 40px 80px rgba(0,0,0,0.45);
}
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hero-photo::before {
    content: ""; position: absolute; inset: -12px -12px auto auto;
    width: 58%; height: 58%; border-top: 2px solid var(--bordeaux); border-right: 2px solid var(--bordeaux);
    border-radius: 0 14px 0 0; z-index: -1;
}
.hero-photo::after {
    content: ""; position: absolute; inset: auto auto -12px -12px;
    width: 58%; height: 58%; border-bottom: 2px solid rgba(255,255,255,0.25); border-left: 2px solid rgba(255,255,255,0.25);
    border-radius: 0 0 0 14px; z-index: -1;
}
.hero-tag {
    position: absolute; bottom: 16px; left: 16px; right: 16px;
    background: rgba(10,25,47,0.80); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.16); border-radius: 10px;
    padding: 12px 14px; display: flex; flex-direction: column; gap: 3px;
}
.hero-tag .name { font-weight: 600; font-size: 1rem; color: #fff; white-space: nowrap; line-height: 1.1; }
.hero-tag .loc { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; color: var(--t-on-dark-2); text-transform: uppercase; }

/* Scroll cue */
.scroll-cue {
    position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3;
    font-size: 0.64rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--t-on-dark-3); display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-cue .line { width: 1px; height: 40px; background: linear-gradient(var(--t-on-dark-3), transparent); animation: scrollLine 2s var(--ease) infinite; }
@keyframes scrollLine { 0%{ transform: scaleY(0); transform-origin: top;} 50%{ transform: scaleY(1); transform-origin: top;} 51%{ transform-origin: bottom;} 100%{ transform: scaleY(0); transform-origin: bottom;} }

/* ========== INTRO ========== */
.intro-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 90px); align-items: start; }
.intro-statement {
    font-family: var(--sans); font-weight: 500;
    font-size: clamp(1.45rem, 2.6vw, 2.2rem); line-height: 1.3; color: var(--t-ink);
    letter-spacing: -0.02em; position: sticky; top: 120px;
}
.intro-statement .bar { display: block; width: 48px; height: 3px; background: var(--bordeaux); margin-bottom: 28px; }
.intro-body p { font-size: clamp(1rem, 1.3vw, 1.1rem); line-height: 1.85; color: var(--t-body); margin-bottom: 22px; text-align: justify; }
.intro-body p:last-child { margin-bottom: 0; }
.intro-body strong { color: var(--t-ink); font-weight: 600; }

/* ========== CHIFFRES ========== */
.chiffres-head { margin-bottom: 56px; }
.chiffres-head .eyebrow { margin-bottom: 20px; }
.chiffres-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.chiffre {
    border: 1px solid var(--line-dark); border-radius: 12px; padding: 36px 28px;
    background: rgba(255,255,255,0.04);
    transition: border-color .35s var(--ease), transform .35s var(--ease), background .35s var(--ease);
    text-align: center;
}
.chiffre:hover { border-color: rgba(145,16,38,0.55); transform: translateY(-6px); background: rgba(145,16,38,0.10); }
.chiffre .num { font-family: var(--sans); font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; color: #fff; letter-spacing: -0.03em; }
.chiffre .num em { color: var(--t-on-dark-2); font-style: normal; font-weight: 600; }
.chiffre .lab { font-size: 0.88rem; line-height: 1.5; color: var(--t-on-dark-2); margin-top: 16px; }

/* ========== EXPERTISE ========== */
.expertise-head { max-width: 740px; margin-bottom: 56px; text-align: left; }
.expertise-head .eyebrow { margin-bottom: 22px; }
.expertise-head .sec-title { margin-bottom: 24px; }
.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.xcard {
    background: var(--white); border: 1px solid var(--line-light); border-radius: 14px;
    padding: 36px 30px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
    text-align: left;
}
.xcard:hover { transform: translateY(-6px); box-shadow: 0 22px 48px rgba(10,25,47,0.10); border-color: rgba(145,16,38,0.25); }
.xcard .xnum { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.12em; color: var(--bordeaux); margin-bottom: 22px; }
.xcard h3 { font-family: var(--sans); font-weight: 700; font-size: 1.26rem; line-height: 1.25; letter-spacing: -0.01em; color: var(--t-ink); margin-bottom: 16px; }
.xcard h3::after { content: ""; display: block; width: 36px; height: 2px; background: var(--bordeaux); margin-top: 14px; }
.xcard p { font-size: 0.94rem; line-height: 1.75; color: var(--t-body-2); text-align: justify; }
.xcard .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.xcard .tags span { font-size: 0.72rem; font-weight: 600; color: var(--bordeaux); background: rgba(145,16,38,0.08); padding: 5px 11px; border-radius: 999px; }

/* ========== EXPLORER ========== */
.explore-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; text-align: left; }
.explore-head .eyebrow { margin-bottom: 20px; }
.explore-list { border-top: 1px solid var(--line-dark); }
.explore-item {
    display: grid; grid-template-columns: 72px 1fr 60px; align-items: center; gap: 28px;
    padding: 32px 24px; border-bottom: 1px solid var(--line-dark);
    transition: background .35s var(--ease), padding .35s var(--ease);
    text-align: left;
}
.explore-item:hover { background: rgba(255,255,255,0.04); padding-left: 36px; }
.explore-item .e-num { font-weight: 600; font-size: 0.85rem; color: var(--t-on-dark-3); letter-spacing: 0.08em; }
.explore-item:hover .e-num { color: var(--bordeaux); }
.explore-item .e-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.explore-item .e-title { display: block; font-family: var(--sans); font-weight: 600; font-size: clamp(1.4rem, 2.6vw, 2rem); color: #fff; letter-spacing: -0.02em; line-height: 1.1; }
.explore-item .e-desc { display: block; font-size: 0.94rem; line-height: 1.55; color: var(--t-on-dark-2); max-width: 56ch; }
.explore-item .e-arrow {
    width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-dark);
    display: flex; align-items: center; justify-content: center; justify-self: end;
    transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.explore-item .e-arrow svg { width: 20px; height: 20px; }
.explore-item:hover .e-arrow { background: var(--bordeaux); border-color: var(--bordeaux); transform: rotate(-45deg); }

/* ========== PROJETS EN AVANT (3 cartes) ========== */
.feat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 52px; flex-wrap: wrap; text-align: left; }
.feat-head .eyebrow { margin-bottom: 20px; }
.feat-link { font-size: 0.92rem; font-weight: 600; color: var(--bordeaux); display: inline-flex; align-items: center; gap: 8px; }
.feat-link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.feat-link:hover svg { transform: translateX(5px); }

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pcard {
    border-radius: 14px; overflow: hidden; background: var(--white);
    border: 1px solid var(--line-light); display: flex; flex-direction: column;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.pcard:hover { transform: translateY(-8px); box-shadow: 0 28px 56px rgba(10,25,47,0.16); border-color: rgba(145,16,38,0.25); }
.pcard-img { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--ink); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pcard:hover .pcard-img img { transform: scale(1.05); }
.pcard-cat {
    position: absolute; top: 14px; left: 14px;
    font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    background: rgba(10,25,47,0.82); color: #fff; padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(6px);
}
.pcard-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; text-align: left; }
.pcard-body h3 { font-family: var(--sans); font-weight: 700; font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.01em; color: var(--t-ink); margin-bottom: 12px; }
.pcard-body p { font-size: 0.92rem; line-height: 1.7; color: var(--t-body-2); margin-bottom: 22px; text-align: justify; }
.pcard-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bordeaux); }
.pcard-foot svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.pcard:hover .pcard-foot svg { transform: translateX(4px); }

/* ========== COMPÉTENCES (marquee) ========== */
.skills-head { text-align: center; max-width: 700px; margin: 0 auto 52px; }
.skills-head .eyebrow { justify-content: center; margin-bottom: 18px; }
.marquee { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-row { display: flex; width: max-content; gap: 14px; }
.marquee-row.r1 { animation: marq 60s linear infinite; }
.marquee-row.r2 { animation: marq 95s linear infinite reverse; margin-top: 14px; }
.marquee:hover .marquee-row { animation-play-state: paused; }
.pill {
    flex: 0 0 auto; font-size: 0.84rem; font-weight: 500; letter-spacing: 0.01em;
    padding: 13px 22px; border-radius: 999px; white-space: nowrap;
    border: 1px solid var(--line-dark); color: var(--t-on-dark); background: rgba(255,255,255,0.04);
    transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.pill.hot { background: var(--bordeaux); border-color: var(--bordeaux); color: #fff; }
.pill:hover { background: #fff; color: var(--ink); border-color: #fff; }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ========== CTA FINAL ========== */
.cta { text-align: center; }
.cta .eyebrow { justify-content: center; margin-bottom: 26px; }
.cta-title { font-family: var(--sans); font-weight: 700; font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 1.05; letter-spacing: -0.035em; color: var(--t-ink); margin-bottom: 20px; }
.cta-title em { font-style: normal; color: var(--bordeaux); }
.cta p { font-size: 1.1rem; line-height: 1.65; color: var(--t-body); max-width: 50ch; margin: 0 auto 40px; }
.cta-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ========== FOOTER (INDEX) ========== */
.footer { background: var(--ink-body); color: var(--t-on-dark); padding: 72px 0 40px; border-top: 1px solid var(--line-dark); }
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 48px; border-bottom: 1px solid var(--line-dark); text-align: left; }
.footer-brand .name { font-family: var(--sans); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; color: #fff; margin-bottom: 12px; }
.footer-brand .tline { font-size: 0.92rem; color: var(--t-on-dark-2); max-width: 38ch; line-height: 1.6; }
.footer-cols { display: flex; gap: clamp(40px, 8vw, 90px); flex-wrap: wrap; }
.footer-col h4 { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--t-on-dark-3); margin-bottom: 18px; }
.footer-col a { display: block; font-size: 0.92rem; color: var(--t-on-dark-2); padding: 5px 0; transition: color .2s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 28px; }
.footer-bottom p { font-size: 0.82rem; color: var(--t-on-dark-3); }

/* Old footer (kept for other pages) */
.site-footer {
    background-color: #0a192f;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 40px 24px;
    text-align: center;
}

.footer-copy {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.footer-note {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

/* ========== REVEAL ANIMATION ========== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

/* Fade-in animation (kept for other pages) */
.fade-in {
    opacity: 0;
    transition: opacity 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
}

/* Legacy section styles (kept for other pages) */
.section-inner {
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--sans);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.3;
}

.section-title.serif {
    font-family: 'Source Serif 4', serif;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
    .fade-in {
        opacity: 1;
        transition: none;
    }
    .hero-video {
        display: none;
    }
}


/* ========== 6. CONTACT (REMASTERED) ========== */

.contact-header {
    background-color: #f8fafc;
    padding: clamp(80px, 10vw, 120px) 24px clamp(50px, 7vw, 80px);
    text-align: center;
}

.contact-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #0a192f;
    margin-bottom: 24px;
    line-height: 1.1;
}

.contact-hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: #475569;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.contact-section {
    background-color: #0b162c;
    padding: clamp(60px, 8vw, 100px) 24px;
}

.contact-container {
    display: flex;
    flex-direction: row;
    gap: 48px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Left Info Panel */
.contact-info {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

.contact-info-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.contact-info-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 40px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: left;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.method-icon {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
}

.method-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.method-link, .method-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.method-link:hover {
    color: #911026;
}

/* Right Form Panel */
.contact-form-wrapper {
    flex: 1.5;
    background: #ffffff;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: flex;
    gap: 24px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    text-align: left;
}

.form-group label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0a192f;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    font-family: 'Inter', sans-serif;
    width: 100%;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    color: #1e293b;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input::placeholder, 
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: #911026;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(145, 16, 38, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Error states */
.error-msg {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 4px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.was-validated .form-group:has(input:invalid) input,
.was-validated .form-group:has(select:invalid) select,
.was-validated .form-group:has(textarea:invalid) textarea,
.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea {
    border-color: #dc2626;
    background: #fef2f2;
}

.was-validated .form-group:has(input:invalid) .error-msg,
.was-validated .form-group:has(select:invalid) .error-msg,
.was-validated .form-group:has(textarea:invalid) .error-msg,
.form-group.invalid .error-msg {
    opacity: 1;
    height: auto;
}

/* Submit Button */
.submit-btn {
    background-color: #911026;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.submit-btn:hover {
    background-color: #7a0d20;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(145, 16, 38, 0.25);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Loading state */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    display: none;
}

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

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .loader {
    display: block;
}

/* Status messages */
.form-status {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    margin-top: 16px;
    padding: 16px;
    border-radius: 8px;
    display: none;
    text-align: center;
}

.form-status.success {
    display: block;
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.form-status.error {
    display: block;
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* ========== 7. CAROUSEL & GRID PROJETS ========== */

.carouselcontainer,
.gridcontainer,
.emptycontainer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gridcontainer.hidden,
.emptycontainer.hidden,
.carouselcontainer.hidden {
    display: none;
}

/* Grille spécifique 2e année */
.projects-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 50px auto 0;
    align-items: stretch;
}

@media (max-width: 768px) {
    .projects-grid-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 500px;
    }
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-top: 50px;
}

/* Compact grid mode for carousels with few items (2 or less) */
.carousel-container.compact-grid {
    height: auto;
    padding: 20px 10px 10px;
}

.carousel-container.compact-grid .carousel-track {
    position: static;
    display: flex;
    gap: 28px;
    justify-content: center;
    align-items: stretch;
    height: auto;
    margin-bottom: 0;
}

.carousel-container.compact-grid .carousel-slide {
    position: relative;
    width: 45%;
    opacity: 1;
    transform: none;
    top: auto;
    left: auto;
    right: auto;
    z-index: 1;
}

.carousel-container.compact-grid .carousel-slide .project-card {
    height: 100%;
}

.carousel-container.compact-grid .nav-button,
.carousel-container.compact-grid + .carousel-indicators,
.carousel-container.compact-grid .carousel-indicators {
    display: none !important;
}

@media (max-width: 768px) {
    .carousel-container.compact-grid .carousel-track {
        flex-direction: column;
        gap: 18px;
    }

    .carousel-container.compact-grid .carousel-slide {
        width: 100%;
    }

    /* En mode grille, le JS attribue quand même .prev/.next aux cartes :
       on annule le display:none du carrousel pour les rendre toutes visibles. */
    .carousel-container.compact-grid .carousel-slide.prev,
    .carousel-container.compact-grid .carousel-slide.next {
        display: block;
        width: 100%;
        opacity: 1;
        pointer-events: auto;
        top: auto;
        left: auto;
        right: auto;
    }
}

.carousel-track {
    position: relative;
    height: 100%;
    margin-bottom: 400px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    width: 60%;
    left: 20%;
    opacity: 0;
    transform: scale(0.9);
    z-index: 0;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.carousel-slide.prev,
.carousel-slide.next {
    width: 40%;
    top: 20px;
    opacity: 0.6;
    z-index: 1;
}

.carousel-slide.prev {
    left: 0;
}

.carousel-slide.next {
    right: 0;
    left: auto;
}

.project-card {
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: white;
    display: flex;
    flex-direction: column;
}

.project-image {
    width: 100%;
    height: 55%;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-counter {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 16px;
    border-bottom-right-radius: 10px;
}

.project-content {
    padding: 16px;
    height: 45%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #0b162c;
    line-height: 1.3;
}

.project-description {
    color: #475569;
    font-size: 0.9rem;
    font-weight: normal;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-more {
    align-self: flex-end;
    background-color: #911026;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-more:hover {
    background-color: #1d4ed8;
}

/* Boutons de navigation du carousel */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.nav-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.nav-prev {
    left: 20px;
}

.nav-next {
    right: 20px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 8px;
}

.carousel-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.carousel-empty-state.is-visible {
    opacity: 1;
    visibility: visible;
}

.carousel-track.is-hidden {
    visibility: hidden;
}

.empty-state-loader {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(15, 23, 42, 0.15);
    border-top-color: #911026;
    border-right-color: rgba(145, 16, 38, 0.45);
    animation: emptySpin 1.2s linear infinite;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.empty-state-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #0a192f;
}

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

.indicator {
    width: 12px;
    height: 12px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator:hover {
    background-color: #999;
}

.indicator.active {
    width: 24px;
    background-color: #2563eb;
    border-radius: 6px;
}

/* ========== 8. MODALE ========== */

.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.hidden {
    display: none !important;
}

.modal-content {
    background: white;
    color: black;
    padding: 40px;
    border-radius: 12px;
    width: 80%;
    max-width: 1000px;
    max-height: 80vh;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    overflow: auto;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #00274d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.close-button:hover {
    background-color: #003d73;
}

#modal-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #00274d;
}

#modal-description {
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 16px;
    text-align: justify;
}

#modal-download {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 25px;
    background-color: #00274d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

#modal-download:hover {
    background-color: #003d73;
}

/* ========== 9. PROJET FOOTER ========== */

.projet-footer {
    margin-top: 45px;
    margin-bottom: 25px;
    background-color: #cacaca;
    color: #0b162c;
    padding: 80px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: justify;
    line-height: 1.6;
    font-size: 1.25rem;
    border-radius: 8px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.projet-footer h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.projet-bouton {
    display: flex;
    justify-content: space-between;
    padding: 20px;
}

.download-file {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    font-style: italic;
    border-bottom: 1px solid white;
    font-size: 18px;
    padding: 10px 20px;
    background-color: #0b162c;
    border-radius: 5px;
    display: inline-block;
}

/* ========== 10. BILAN ========== */

.bilan-tabs {
    margin-bottom: 32px;
}

.bilan-panels {
    max-width: 960px;
    margin: 0 auto;
}

.bilan-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: clamp(28px, 4vw, 48px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    text-align: left;
    color: #0a192f;
}

.bilan-panel h3 {
    font-family: var(--sans);
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--t-ink);
}

.bilan-panel h3::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    background: var(--bordeaux);
    margin: 16px 0 26px;
}

.bilan-panel p {
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 18px;
    text-align: justify;
}

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

/* ========== 11. À PROPOS ========== */

.aboutme-content h1,
.aboutme-content h2 {
    font-family: var(--sans);
    font-weight: 700;
    font-size: clamp(1.7rem, 2.8vw, 2.4rem);
    line-height: 1.12;
    letter-spacing: -0.025em;
    margin: 0 0 22px;
    text-align: left;
    color: var(--t-ink);
}

.aboutme-content h1 {
    color: #ffffff;
}

/* Accent bar under headings — same language as bilan & expertise cards */
.aboutme-content h1::after,
.aboutme-content h2::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    background: var(--bordeaux);
    margin-top: 18px;
}

.aboutme-content p {
    font-family: var(--sans);
    line-height: 1.85;
    font-size: clamp(0.95rem, 1.15vw, 1.05rem);
    margin-bottom: 18px;
    text-align: justify;
}

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

.aboutme-content a {
    font-family: var(--sans);
    color: var(--bordeaux);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color .2s var(--ease);
}

.aboutme-content a.instagram-link,
.aboutme-content a.instagram-link:hover {
    color: var(--bordeaux);
}

.aboutme-content a:hover {
    color: var(--bordeaux-d);
}

/* ========== 12. SECTIONS (HEADERBILAN, SECTIONS, LECTURE) ========== */

/* Full-bleed alternating sections with a centered 1200px content column */
.headerbilan,
.section,
.lecture-section {
    display: flex;
    align-items: flex-start;
    gap: clamp(32px, 5vw, 72px);
    padding-block: clamp(56px, 8vw, 104px);
    padding-inline: max(22px, calc((100% - 1200px) / 2));
    text-align: left;
}

.headerbilan {
    background-color: #0b162c;
    color: rgba(255, 255, 255, 0.84);
}

.section {
    background-color: #ffffff;
    color: #0b162c;
}

.section-dark {
    background-color: #0b162c;
    color: #ffffff;
}

.section-dark .section-content h2 {
    color: #ffffff;
}

.lecture-section {
    background-color: #ffffff;
    color: #0b162c;
}

/* Text columns fill remaining space */
.headerbilan-content,
.section-content,
.lecture-title {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
}

/* Image columns — one harmonized treatment everywhere */
.headerbilan-image,
.section-image,
.lecture-image {
    flex: 0 0 clamp(260px, 36%, 400px);
    width: auto;
    max-width: 400px;
}

.headerbilan-image img,
.section-image img,
.lecture-image img {
    width: 100%;
    aspect-ratio: 4 / 5;
    height: auto;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(10, 25, 47, 0.30);
    display: block;
}

/* =============================================
   13. MEDIA QUERIES — RESPONSIVE DESIGN
   ============================================= */

/* ---------- Tablettes (max-width: 980px) ---------- */
@media (max-width: 980px) {

    /* Redesign: Hero */
    .hero-inner { grid-template-columns: 1fr; gap: 48px; }
    .hero-photo { order: -1; justify-self: start; }

    /* Redesign: Intro */
    .intro-grid { grid-template-columns: 1fr; gap: 36px; }
    .intro-statement { position: static; }

    /* Redesign: Chiffres */
    .chiffres-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Redesign: Expertise */
    .expertise-grid { grid-template-columns: 1fr; }

    /* Redesign: Feat grid */
    .feat-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }

    /* Contact */
    .contact-container {
        flex-direction: column;
    }

    .contact-info, .contact-form-wrapper {
        padding: 32px;
    }

    /* Carousel */
    .carouselcontainer {
        max-width: 900px;
        padding: 0 15px;
    }

    .carousel-container {
        height: 450px;
    }

    .carousel-slide {
        width: 70%;
        left: 15%;
    }

    .carousel-slide.prev,
    .carousel-slide.next {
        width: 45%;
    }

    /* Projet bouton */
    .projet-bouton {
        flex-direction: column;
        align-items: center;
    }

    /* About page — stacked, left-aligned, harmonized image sizes */
    .headerbilan,
    .section,
    .section-dark,
    .lecture-section {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        gap: 32px;
    }

    .headerbilan-content,
    .section-content,
    .lecture-title,
    .headerbilan-image,
    .section-image,
    .lecture-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
    }

    .headerbilan-image,
    .section-image,
    .lecture-image {
        align-self: center;
        max-width: 340px;
    }
}

/* ---------- Tablettes spécifiques (769px - 1024px) ---------- */
@media (min-width: 769px) and (max-width: 1024px) {
    .modal-content {
        width: 85%;
        padding: 30px;
    }

    .close-button {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    #modal-title {
        font-size: 22px;
    }

    #modal-description {
        font-size: 15px;
    }

    #modal-download {
        font-size: 15px;
    }

    .projet-footer {
        padding: 60px;
        font-size: 1.1rem;
    }

    .projet-footer h2 {
        font-size: 2.2rem;
    }

    .download-file {
        font-size: 17px;
    }
}

/* ---------- Mobile (max-width: 760px) ---------- */
@media (max-width: 760px) {
    body {
        padding-top: var(--nav-offset-mobile);
    }

    /* Redesign: wrap padding */
    .wrap { padding: 0 22px; }

    /* Redesign: explore */
    .explore-item { grid-template-columns: 40px 1fr; gap: 16px; padding: 26px 6px; }
    .explore-item:hover { padding-left: 6px; }
    .explore-item .e-arrow { display: none; }

    /* Redesign: footer */
    .footer { padding: 56px 0 32px; }
    .footer-top { flex-direction: column; gap: 32px; padding-bottom: 32px; }
    .footer-brand .tline { max-width: none; }
    .footer-cols { gap: 28px; width: 100%; }
    .footer-col { flex: 1 1 0; min-width: 0; }
    .footer-bottom { justify-content: center; text-align: center; gap: 6px; padding-top: 22px; }

    /* Burger menu mobile */
    .navbar-toggler {
        display: block;
    }

    .nav-wrap {
        padding: 13px 20px;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 25, 47, 0.96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255, 255, 255, 0.10);
        box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38);
        padding: 12px 14px;
        gap: 4px;
        z-index: 1000;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    nav ul.show {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    nav ul li {
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        display: block;
        padding: 14px 20px;
        border-radius: 10px;
        font-size: 0.82rem;
        font-weight: 600;
    }

    nav ul li a:hover {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.10);
    }

    nav ul li a.active {
        color: var(--ink);
        background-color: #ffffff;
    }

    .navbar-toggler.active .navbar-toggler-icon {
        background-color: transparent;
    }

    .navbar-toggler.active .navbar-toggler-icon::before {
        transform: rotate(45deg);
        top: 0;
    }

    .navbar-toggler.active .navbar-toggler-icon::after {
        transform: rotate(-45deg);
        bottom: 0;
    }

    /* Hero */
    .hero {
        min-height: 70vh;
        margin-top: calc(var(--nav-offset-mobile) * -1);
    }

    /* Chiffres */
    .chiffres-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Expertise */
    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Contact */
    .contact-form-wrapper {
        padding: 24px 16px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .contact-header {
        padding: 60px 20px 40px;
    }

    /* Carousel */
    .carouselcontainer {
        padding: 0 10px;
    }

    .carousel-container {
        height: 400px;
        margin-top: 30px;
    }

    .carousel-track {
        margin-bottom: 200px;
    }

    .carousel-slide {
        width: 90%;
        left: 5%;
    }

    .carousel-slide.active {
        opacity: 1;
        transform: scale(1);
        z-index: 2;
    }

    .carousel-slide.prev,
    .carousel-slide.next {
        display: none;
        opacity: 0;
        pointer-events: none;
        width: 0;
    }

    .nav-button {
        width: 45px;
        height: 45px;
        background-color: rgba(0, 0, 0, 0.8);
        font-size: 16px;
        border: 3px solid rgba(255, 255, 255, 0.5);
    }

    .nav-prev {
        left: 10px;
    }

    .nav-next {
        right: 10px;
    }

    .project-title {
        font-size: 16px;
    }

    .project-content {
        padding: 12px;
    }

    /* Texte dynamique */
    .dynamic-text h1 {
        font-size: 20px;
    }

    .dynamic-text h2 {
        font-size: 16px;
    }

    /* Modal */
    .modal-content {
        width: 90%;
        padding: 20px;
        font-size: 14px;
    }

    .close-button {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    #modal-title {
        font-size: 20px;
    }

    #modal-description {
        font-size: 14px;
    }

    #modal-download {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Projet footer */
    .projet-footer {
        padding: 40px 20px;
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .projet-footer h2 {
        font-size: 1.75rem;
    }

    .projet-bouton {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .download-file {
        font-size: 16px;
        padding: 10px 15px;
    }

    /* Bilan */
    .bilan-panel {
        padding: 24px;
    }
}

/* ---------- Petit mobile (max-width: 480px) ---------- */
@media (max-width: 480px) {

    /* Redesign: Chiffres */
    .chiffres-grid { grid-template-columns: 1fr 1fr; }

    /* Hero */
    .hero {
        min-height: 60vh;
    }

    /* Contact */
    .contact-hero-title {
        font-size: 2rem;
    }
    
    .contact-info {
        padding: 24px;
    }

    /* Carousel */
    .carouselcontainer {
        padding: 0 5px;
    }

    .carousel-container {
        height: 350px;
        margin-top: 20px;
    }

    .carousel-track {
        margin-bottom: 150px;
    }

    .carousel-slide {
        width: 90%;
        left: 5%;
    }

    .nav-button {
        width: 40px;
        height: 40px;
        background-color: #cacaca;
        font-size: 14px;
        border: 2px solid white;
    }

    .nav-button:hover {
        background-color: rgba(255, 107, 107, 1);
    }

    .nav-prev {
        left: 5px;
    }

    .nav-next {
        right: 5px;
    }

    .project-title {
        font-size: 16px;
    }

    .project-description {
        font-size: 14px;
    }

    .btn-more {
        padding: 6px 12px;
        font-size: 14px;
    }

    .indicator {
        width: 14px;
        height: 14px;
    }

    .indicator.active {
        width: 28px;
    }

    .carousel-indicators {
        gap: 10px;
        margin-top: 15px;
    }

    /* Modal */
    .modal-content {
        padding: 20px;
    }

    .close-button {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
}

/* ========== PROJETS PAGE REVISION ========== */
.projets-hero {
    background: linear-gradient(135deg, #0b162c 0%, #0a192f 100%);
    padding: clamp(80px, 10vw, 120px) 24px clamp(40px, 6vw, 60px);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.projets-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.projets-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #ffffff;
    margin-bottom: 20px;
}

.projets-hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 40px;
}

.projets-hero-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-nav-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-nav-btn:hover {
    background: #911026;
    border-color: #911026;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(145, 16, 38, 0.3);
}

.projets-main {
    background-color: #f8fafc;
    padding-bottom: 60px;
}

/* ============================================================
   ASSISTANT IA — WIDGET DE CHAT
   ============================================================ */

#ai-chat {
    --ai-accent: var(--bordeaux);
    --ai-accent-d: var(--bordeaux-d);
    --ai-ink: var(--ink);
    font-family: var(--sans);
    text-align: left;
}

/* ---- Bouton flottant ---- */
#ai-chat-toggle {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 90;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: linear-gradient(135deg, var(--ai-accent), var(--ai-accent-d));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(145, 16, 38, 0.40);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
#ai-chat-toggle:hover { transform: translateY(-3px) scale(1.05); }
#ai-chat-toggle.is-active { transform: scale(0.92); }
#ai-chat-toggle svg { width: 28px; height: 28px; position: relative; z-index: 2; }
.ai-toggle-icon { display: flex; transition: transform .4s var(--ease); }
#ai-chat-toggle.is-active .ai-toggle-icon { transform: rotate(90deg); }

.ai-toggle-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--ai-accent);
    opacity: 0.55;
    z-index: 1;
    animation: aiPulse 2.4s var(--ease) infinite;
}
#ai-chat-toggle.is-active .ai-toggle-pulse { display: none; }
@keyframes aiPulse {
    0%   { transform: scale(1);   opacity: 0.5; }
    70%  { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ---- Panneau de chat ---- */
#ai-chat-panel {
    position: fixed;
    bottom: 100px;
    right: 26px;
    z-index: 91;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 140px);
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(2, 8, 20, 0.30);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
#ai-chat-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ---- En-tête ---- */
.ai-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: var(--ai-ink);
    color: #fff;
    flex-shrink: 0;
}
.ai-head-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ai-accent), var(--ai-accent-d));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ai-head-avatar svg { width: 20px; height: 20px; }
.ai-head-info { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.ai-head-name { font-weight: 600; font-size: 0.95rem; }
.ai-head-status {
    font-size: 0.74rem;
    color: rgba(255,255,255,0.65);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ai-head-status i {
    width: 7px; height: 7px; border-radius: 50%;
    background: #34d399; display: inline-block;
    box-shadow: 0 0 0 0 rgba(52,211,153,0.6);
    animation: aiLive 1.8s infinite;
}
@keyframes aiLive {
    0%   { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
    70%  { box-shadow: 0 0 0 6px rgba(52,211,153,0); }
    100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
#ai-chat-close {
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s var(--ease);
}
#ai-chat-close:hover { background: rgba(255,255,255,0.18); }
#ai-chat-close svg { width: 16px; height: 16px; }

/* ---- Zone de messages ---- */
#ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}
#ai-chat-messages::-webkit-scrollbar { width: 6px; }
#ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(10,25,47,0.18); border-radius: 3px;
}

.ai-msg { display: flex; max-width: 85%; }
.ai-msg--bot { align-self: flex-start; }
.ai-msg--user { align-self: flex-end; }

.ai-bubble {
    padding: 11px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.55;
    animation: aiIn .3s var(--ease);
}
.ai-msg--bot .ai-bubble {
    background: #fff;
    color: var(--t-body);
    border: 1px solid var(--line-light);
    border-bottom-left-radius: 5px;
}
.ai-msg--user .ai-bubble {
    background: linear-gradient(135deg, var(--ai-accent), var(--ai-accent-d));
    color: #fff;
    border-bottom-right-radius: 5px;
}
.ai-bubble a {
    color: var(--ai-accent);
    text-decoration: underline;
    font-weight: 500;
}
.ai-msg--user .ai-bubble a { color: #fff; }
.ai-bubble strong { font-weight: 600; }
@keyframes aiIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Indicateur de saisie ---- */
.ai-typing .ai-bubble { display: flex; gap: 4px; padding: 14px; }
.ai-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--t-muted);
    animation: aiBlink 1.3s infinite;
}
.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiBlink {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

/* ---- Suggestions ---- */
#ai-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 18px 12px;
    background: #f8fafc;
}
.ai-suggestion {
    border: 1px solid var(--ai-accent);
    background: rgba(145, 16, 38, 0.06);
    color: var(--ai-accent);
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: background .2s var(--ease), color .2s var(--ease);
}
.ai-suggestion:hover { background: var(--ai-accent); color: #fff; }

/* ---- Réponses rapides intégrées (Académique / Professionnel) ---- */
.ai-quickreplies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.ai-qr {
    border: 1px solid var(--ai-accent);
    background: #fff;
    color: var(--ai-accent);
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: background .2s var(--ease), color .2s var(--ease);
}
.ai-qr:hover { background: var(--ai-accent); color: #fff; }

/* ---- Formulaire de saisie ---- */
#ai-chat-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--line-light);
    background: #fff;
    flex-shrink: 0;
}
#ai-chat-input {
    flex: 1;
    border: 1px solid var(--line-light);
    border-radius: 22px;
    padding: 11px 16px;
    font-family: var(--sans);
    font-size: 0.9rem;
    color: var(--t-ink);
    outline: none;
    transition: border-color .2s var(--ease);
}
#ai-chat-input:focus { border-color: var(--ai-accent); }
#ai-chat-form button {
    width: 42px; height: 42px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ai-accent), var(--ai-accent-d));
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .2s var(--ease);
}
#ai-chat-form button:hover { transform: scale(1.08); }
#ai-chat-form button svg { width: 18px; height: 18px; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
    #ai-chat-panel {
        right: 16px;
        left: 16px;
        width: auto;
        bottom: 90px;
        height: calc(100vh - 130px);
    }
    #ai-chat-toggle { bottom: 18px; right: 18px; }
}

.projets-section {
    padding: clamp(60px, 8vw, 80px) 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.projets-section:nth-child(even) {
    background-color: #ffffff;
    max-width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: var(--sans);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: #0a192f;
    margin-bottom: 16px;
}

.section-divider {
    width: 60px;
    height: 3px;
    background-color: #911026;
    margin: 0 auto 24px;
}

.section-intro {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    color: #475569;
    max-width: 600px;
    margin: 0 auto;
}

.univ-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.univ-tab-btn {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 10px 24px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.univ-tab-btn:hover {
    color: #0a192f;
    border-color: #94a3b8;
    background: #f1f5f9;
}

.univ-tab-btn.active {
    color: #ffffff;
    background: #911026;
    border-color: #911026;
    box-shadow: 0 4px 12px rgba(145, 16, 38, 0.25);
}

/* Modale additions */
.modal-body-content {
    text-align: left;
    color: #333;
}

.modal-body-content h2 {
    color: #0a192f;
    margin-bottom: 12px;
}

.modal-divider {
    width: 40px;
    height: 2px;
    background-color: #911026;
    margin-bottom: 20px;
}

.modal-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-start;
}

.modal-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #911026;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: background 0.3s;
}

.modal-btn-download:hover {
    background: #7a0d20;
    color: #fff;
}

/* Context Section (BUT SD) */
.context-section {
    background-color: #0b162c;
    padding: clamp(60px, 8vw, 80px) 24px;
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.context-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    text-align: center;
}

.context-section h2 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.context-section p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}

/* When projet-footer is used together with context-section (same element),
   reset the visual box styling so the section connects cleanly to the footer */
.projet-footer.context-section {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: clamp(60px, 8vw, 80px) 24px;
}

.context-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.context-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.context-btn:hover {
    background: #ffffff;
    color: #0b162c;
}

/* Custom background for Projets Pro */
.projets-section.section-professionnels {
    background-color: #0a192f;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.projets-section.section-professionnels .section-header h2,
.projets-section.section-professionnels .section-intro {
    color: #ffffff;
}
.download-report-actions {
    margin-top: 28px;
}


/* ========== MA MÉTHODE (TIMELINE) ========== */
.method-sec { background: var(--ink); }

.method-head {
    max-width: 760px;
    margin: 0 auto clamp(48px, 6vw, 76px);
    text-align: center;
}
.method-head .eyebrow { justify-content: center; margin-bottom: 22px; }
.method-head .sec-title { line-height: 1.12; }
.method-head .sec-title em { color: #fff; font-style: normal; }

.method-timeline {
    position: relative;
    list-style: none;
    max-width: 680px;
    margin: 0 auto;
    padding: 0;
    text-align: left;
}

/* Ligne verticale qui se "dessine" (hauteur/top calculés en JS) */
.method-timeline .tl-line {
    position: absolute;
    left: 27px;
    width: 2px;
    background: linear-gradient(180deg, var(--bordeaux), var(--bordeaux-d));
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 1.05s var(--ease);
    z-index: 0;
}
.method-timeline.in .tl-line { transform: scaleY(1); }

.method-step {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 56px 1fr;
    column-gap: 30px;
    align-items: start;
}
.method-step:not(:last-child) { margin-bottom: clamp(40px, 6vw, 60px); }

.step-marker { position: relative; }
.step-dot {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bordeaux);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 26px rgba(145, 16, 38, 0.42);
    transform: scale(0);
    transition: transform .55s var(--ease);
}
.method-timeline.in .step-dot { transform: scale(1); }
.method-timeline.in .method-step:nth-of-type(2) .step-dot { transition-delay: .16s; }
.method-timeline.in .method-step:nth-of-type(3) .step-dot { transition-delay: .32s; }

.step-body {
    padding-top: 4px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.method-timeline.in .step-body { opacity: 1; transform: none; }
.method-timeline.in .method-step:nth-of-type(2) .step-body { transition-delay: .22s; }
.method-timeline.in .method-step:nth-of-type(3) .step-body { transition-delay: .38s; }

.step-eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--t-on-dark-3);
    margin-bottom: 10px;
}
.step-title {
    font-family: var(--sans);
    font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 1.42rem);
    letter-spacing: -0.015em;
    color: #fff;
    margin-bottom: 12px;
}
.step-desc {
    font-size: clamp(0.95rem, 1.2vw, 1.02rem);
    line-height: 1.7;
    color: var(--t-on-dark-2);
    max-width: 52ch;
}

/* Bloc d'en-tête animé */
.reveal-m {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal-m.in { opacity: 1; transform: none; }

@media (max-width: 600px) {
    .method-step { column-gap: 20px; grid-template-columns: 48px 1fr; }
    .step-dot { width: 48px; height: 48px; font-size: 0.86rem; }
    .method-timeline .tl-line { left: 23px; }
}

@media (prefers-reduced-motion: reduce) {
    .method-timeline .tl-line { transform: scaleY(1); transition: none; }
    .step-dot { transform: scale(1); transition: none; }
    .step-body,
    .reveal-m { opacity: 1; transform: none; transition: none; }
}
