/* ===========================================
   TONTON STUDIO V2 — Homepage Styles
   Ported from mockups/mockup_hero_cinema.html
   + Portfolio section styles
   =========================================== */

/* ===========================================
   FONT FACES — Alaska Beta
   =========================================== */
@font-face { font-family: 'Alaska'; src: url('../fonts/AlaskaBeta-Light.otf') format('opentype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alaska'; src: url('../fonts/AlaskaBeta-Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alaska'; src: url('../fonts/AlaskaBeta-Bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alaska'; src: url('../fonts/AlaskaBeta-ExtraBold.otf') format('opentype'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'AlaskaCondensed'; src: url('../fonts/AlaskaBeta-CondensedBold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'AlaskaCondensed'; src: url('../fonts/AlaskaBeta-CondensedExtraBold.otf') format('opentype'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'AlaskaExpanded'; src: url('../fonts/AlaskaBeta-ExpandedBold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }

/* ===========================================
   RESET & CUSTOM PROPERTIES
   =========================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --dark: #2B334F;
    --dark-deep: #1E2438;
    --yellow: #FCE861;
    --yellow-darker: #F9DA10;
    --white: #FFFFFF;
    --coral: #EF626C;
    --pink: #FFA5CC;
    --orange: #FF8847;
    --cyan: #5CCEFF;
    --purple: #7F76E5;
    --mint: #44EEAA;
    --font-main: 'Alaska', 'Helvetica Neue', Arial, sans-serif;
    --font-condensed: 'AlaskaCondensed', 'Alaska', 'Impact', sans-serif;
    --font-expanded: 'AlaskaExpanded', 'Alaska', 'Helvetica Neue', sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: var(--yellow);
    transition: background 0.8s ease;
    overflow-x: hidden;
}

html.loaded { background: var(--dark); }

body {
    font-family: var(--font-main);
    font-weight: 400;
    color: var(--white);
    background: transparent;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::selection { background: var(--yellow); color: var(--dark); }

/* ===========================================
   SPLASH SCREEN
   =========================================== */
#splash-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--yellow);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 1s ease, visibility 1s ease;
}

#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#splash-logo { max-height: 40vh; width: auto; }

/* ===========================================
   PAGE WRAPPER
   =========================================== */
.page-wrapper { visibility: hidden; position: relative; }
html.loaded .page-wrapper { visibility: visible; }

/* ===========================================
   CINEMATIC DNA — Grain + vignette site-wide
   Subtle atmospheric thread on all pages.
   Hero has its own stronger layers on top.
   =========================================== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 70% at 50% 48%, transparent 50%, rgba(0, 0, 0, 0.25) 100%);
    pointer-events: none;
    z-index: 90;
}

body::after {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background-image: repeating-conic-gradient(rgba(255, 255, 255, 0.04) 0% 0.00075%, transparent 0.00075% 0.00225%);
    animation: globalGrain 0.3s steps(4) infinite;
    pointer-events: none;
    z-index: 91;
    opacity: 0.56;
}

@keyframes globalGrain {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-2%, 1%); }
    50%  { transform: translate(1%, -2%); }
    75%  { transform: translate(-1%, 2%); }
    100% { transform: translate(2%, -1%); }
}

/* ===========================================
   NAVIGATION
   =========================================== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 0 40px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.5s ease, backdrop-filter 0.5s ease;
}

.nav.scrolled {
    background: rgba(43, 51, 79, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-brand img { height: 44px; width: auto; }

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

.nav-links a {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--yellow);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover { color: var(--yellow); }
.nav-links a:hover::after { width: 100%; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 28px; height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Le menu est toujours en display:flex pour permettre les animations GSAP,
   mais cache via opacity + visibility quand non ouvert. */
.mobile-menu {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(43, 51, 79, 0.98);
    flex-direction: column;
    align-items: center;
    /* safe center : en paysage telephone (hauteur ~375px) le contenu deborde,
       sans "safe" le debordement part des DEUX cotes et les premiers liens
       deviennent inatteignables. overflow-y permet de scroller le menu. */
    justify-content: center;
    justify-content: safe center;
    overflow-y: auto;
    gap: 18px;
    padding: 80px 24px 40px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.mobile-menu a {
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--white);
    transition: color 0.3s ease;
    will-change: transform, opacity;
}

.mobile-menu a:hover { color: var(--yellow); }

/* ===========================================
   LANG SWITCHER (FR / EN)
   =========================================== */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
}

.lang-switcher-current { color: var(--white); }

.lang-switcher-link {
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.3s ease;
    text-decoration: none;
}

.lang-switcher-link:hover { color: var(--yellow); }

.lang-switcher-sep {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 2px;
}

.nav-links .lang-switcher-link::after { display: none; }

.lang-switcher--mobile {
    margin: 12px 0 0;
    padding: 0;
    border: none;
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.08em;
}

.lang-switcher--mobile .lang-switcher-current { color: var(--yellow); }
.lang-switcher--mobile .lang-switcher-link { color: rgba(255, 255, 255, 0.55); }
.lang-switcher--mobile .lang-switcher-link:hover { color: var(--yellow); }
.lang-switcher--mobile .lang-switcher-sep { color: rgba(255, 255, 255, 0.4); margin: 0 6px; }

/* ===========================================
   HERO
   =========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--dark);
    /* Reserve la nav fixe (72px) en haut et la zone chevron en bas :
       le contenu centre ne peut plus glisser sous la nav sur ecrans peu hauts */
    padding: 96px 0 88px;
}

.hero-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(43, 51, 79, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(15, 20, 40, 0.7) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(30, 36, 56, 0.5) 0%, transparent 50%);
    background-size: 200% 200%;
    animation: meshMove 25s ease-in-out infinite;
    z-index: 0;
    will-change: transform;
}

@keyframes meshMove {
    0%, 100% { background-position: 0% 0%, 100% 0%, 50% 100%; }
    25%      { background-position: 100% 60%, 0% 100%, 80% 0%; }
    50%      { background-position: 40% 100%, 60% 0%, 0% 50%; }
    75%      { background-position: 0% 40%, 100% 60%, 100% 100%; }
}

.hero-lightleaks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    mix-blend-mode: screen;
}

.hero-lightleaks .streak {
    position: absolute;
    width: 140%; left: -20%;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0;
    will-change: transform, opacity;
}

.hero-lightleaks .streak-1 {
    background: linear-gradient(90deg, transparent 0%, rgba(92, 206, 255, 0.4) 15%, rgba(92, 206, 255, 0.7) 40%, rgba(92, 206, 255, 0.4) 70%, transparent 100%);
}

.hero-lightleaks .streak-2 {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.2) 80%, transparent 100%);
}

.hero-lightleaks .streak-3 {
    background: linear-gradient(90deg, transparent 0%, rgba(180, 200, 255, 0.25) 30%, rgba(180, 200, 255, 0.5) 55%, transparent 100%);
}

.hero-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.hero-grain::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background-image: repeating-conic-gradient(rgba(255, 255, 255, 0.06) 0% 0.00075%, transparent 0.00075% 0.00225%);
    background-size: 220px 220px;
    opacity: 0.3;
    animation: grainDrift 0.4s steps(3) infinite;
}

@keyframes grainDrift {
    0%   { transform: translate(0, 0); }
    33%  { transform: translate(-3%, 2%); }
    66%  { transform: translate(2%, -2%); }
    100% { transform: translate(-1%, 3%); }
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 65% at 50% 48%, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
    z-index: 3;
}

.hero-bottom-fade {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 180px;
    background: linear-gradient(to bottom, transparent, var(--dark));
    pointer-events: none;
    z-index: 3;
}

/* --- Hero Content --- */
.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 0 24px;
    max-width: 880px;
    will-change: transform, opacity;
}

.hero-logo {
    margin-bottom: 20px;
    display: inline-block;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.hero-logo img {
    height: clamp(64px, 10vw, 110px);
    width: auto;
    margin: 0 auto;
    filter: drop-shadow(0 0 50px rgba(252, 232, 97, 0.1));
}

.hero-logo.glitching img {
    filter: drop-shadow(2px 0 0 rgba(0, 255, 255, 0.7)) drop-shadow(-2px 0 0 rgba(255, 0, 255, 0.7));
}

.hero-logo svg {
    filter: drop-shadow(0 0 50px rgba(252, 232, 97, 0.1));
}

.hero-logo.glitching svg {
    filter: drop-shadow(2px 0 0 rgba(0, 255, 255, 0.7)) drop-shadow(-2px 0 0 rgba(255, 0, 255, 0.7));
}

.hero-byline {
    font-family: var(--font-main);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 40px;
}

.hero-title {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: clamp(2rem, 5.5vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: var(--yellow);
    margin-bottom: 28px;
    text-shadow: 0 0 80px rgba(252, 232, 97, 0.15);
}

.hero-tagline {
    font-family: var(--font-main);
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 560px;
    margin: 0 auto 52px;
    line-height: 1.75;
}

.word-vit {
    display: inline-block;
    color: var(--yellow);
    animation: heartbeat 2.4s ease-in-out infinite;
    animation-delay: 4s;
}

@keyframes heartbeat {
    0%   { transform: scale(1); }
    7%   { transform: scale(1.12); }
    14%  { transform: scale(1); }
    21%  { transform: scale(1.08); }
    28%  { transform: scale(1); }
    100% { transform: scale(1); }
}

/* --- CTAs --- */
.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(252, 232, 97, 0.4), 0 0 60px rgba(252, 232, 97, 0.1);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: var(--white);
    border-color: var(--white);
    color: var(--dark);
    transform: translateY(-2px);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 4px;
}

.hero-chevron {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.35);
    will-change: opacity;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-chevron:hover { color: var(--yellow); }

/* Ecrans peu hauts (laptops 1366x768, fenetres reduites) : rythme vertical compresse
   pour que logo + titre + taglines + CTA tiennent entre la nav et le chevron */
@media (max-height: 800px) {
    .hero-logo { margin-bottom: 14px; }
    .hero-logo img { height: clamp(56px, 11vh, 100px); }
    .hero-byline { margin-bottom: 24px; }
    .hero-title { margin-bottom: 20px; }
    .hero-tagline { margin-bottom: 36px; }
}

/* ===========================================
   PORTFOLIO SECTION
   =========================================== */
.portfolio {
    background: linear-gradient(180deg, var(--dark) 0%, #2D3555 6%, #2D3555 94%, var(--dark) 100%);
    padding: 120px 40px 80px;
    position: relative;
}

.portfolio-separator {
    width: 60px;
    height: 2px;
    background: var(--yellow);
    opacity: 0.3;
    border-radius: 1px;
    margin: 0 auto 64px;
    transform-origin: center;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 80px;
}

.portfolio-label {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 16px;
}

.portfolio-title {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--white);
    line-height: 1.1;
}

/* --- Flagship card (A Blind Legend) --- */
.flagship {
    max-width: 1200px;
    margin: 0 auto 64px;
    position: relative;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    min-height: 420px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--dark-deep);
    transition: box-shadow 0.4s ease;
}

.flagship:hover {
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.flagship-visual {
    position: relative;
    overflow: hidden;
}

.flagship-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.flagship:hover .flagship-visual img {
    transform: scale(1.03);
}

/* Soundwave SVG overlay */
.flagship-soundwave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    pointer-events: none;
    opacity: 0.6;
}

.soundwave-path {
    stroke-dasharray: 2400;
    stroke-dashoffset: 2400;
    animation: soundwave-draw 6s linear infinite;
}

@keyframes soundwave-draw {
    to { stroke-dashoffset: 0; }
}

.flagship-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 50%, var(--dark-deep) 100%);
    pointer-events: none;
}

.flagship-content {
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.flagship-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dark);
    background: var(--yellow);
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 16px;
    align-self: flex-start;
}

.flagship-tag .sector {
    font-weight: 400;
    opacity: 0.7;
}

.flagship-name {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 16px;
}

.flagship-accroche {
    font-weight: 300;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 420px;
}

.flagship-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}

.flagship-stat-number {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--yellow);
    line-height: 1;
    display: inline-block;
}

.flagship-stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 4px;
}

.flagship-credit {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6); /* contraste AA */
    margin-bottom: 4px;
}

.flagship-role {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.flagship .btn-primary {
    align-self: flex-start;
    padding: 14px 32px;
    font-size: 0.8125rem;
}

/* --- Vitrines grid (5 cards) --- */
.vitrines-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 48px;
}

.vitrine-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    min-height: 340px;
    background: var(--dark-deep);
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.vitrine-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.vitrine-card__img {
    position: absolute;
    inset: 0;
}

.vitrine-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.vitrine-card:hover .vitrine-card__img img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Gradient placeholder for missing images */
.vitrine-card__img--placeholder {
    background: linear-gradient(135deg, var(--purple) 0%, var(--cyan) 100%);
    opacity: 0.4;
}

.vitrine-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 36, 56, 0.97) 0%, rgba(30, 36, 56, 0.75) 35%, rgba(30, 36, 56, 0.25) 70%, transparent 100%);
    z-index: 1;
    transition: background 0.4s ease;
}

.vitrine-card:hover .vitrine-card__overlay {
    background: linear-gradient(to top, rgba(30, 36, 56, 0.98) 0%, rgba(30, 36, 56, 0.5) 60%, rgba(30, 36, 56, 0.15) 100%);
}

.vitrine-card__content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 28px;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.vitrine-card:hover .vitrine-card__content {
    transform: translateY(-4px);
}

.vitrine-card__tag {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dark);
    background: var(--yellow);
    padding: 3px 8px;
    border-radius: 2px;
    margin-bottom: 10px;
}

.vitrine-card__name {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.vitrine-card__accroche {
    font-size: 0.8125rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 12px;
    max-width: 380px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.vitrine-card__badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.vitrine-card__badge {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--yellow);
    padding: 2px 8px;
    border: 1px solid rgba(252, 232, 97, 0.25);
    border-radius: 3px;
}

.vitrine-card__meta {
    font-size: 0.6875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6); /* contraste AA */
    letter-spacing: 0.04em;
}

/* Credit line for DOWiNO projects */
.vitrine-card__credit {
    font-size: 0.625rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6); /* contraste AA */
    margin-top: 6px;
}

/* --- Depth line (et aussi...) --- */
.portfolio-depth {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.portfolio-depth p {
    font-size: 0.8125rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.35);
}

.portfolio-depth a {
    color: var(--yellow);
    font-weight: 700;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.portfolio-depth a:hover {
    opacity: 1;
}

/* --- CTA under portfolio --- */
.portfolio-cta {
    text-align: center;
    margin-top: 48px;
}

/* ===========================================
   SERVICES SECTION
   =========================================== */
.services {
    background: var(--dark);
    padding: 120px 40px 100px;
    position: relative;
}

.services-separator {
    width: 60px;
    height: 2px;
    background: var(--yellow);
    opacity: 0.3;
    border-radius: 1px;
    margin: 0 auto 64px;
    transform-origin: center;
}

.services-header {
    text-align: center;
    margin-bottom: 72px;
}

.services-label {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 16px;
}

.services-title {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--white);
    line-height: 1.1;
}

/* --- Services grid — 2 blocs compacts --- */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

/* --- Service card --- */
.service-card {
    background: var(--dark-deep);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 40px 36px 36px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.4s ease;
}

.service-card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

/* Bloc Conseil — accent jaune */
.service-card--conseil {
    border-left-color: var(--yellow);
}

.service-card--conseil:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), 0 0 24px rgba(252, 232, 97, 0.06);
}

.service-card--conseil .service-name { color: var(--yellow); }
.service-card--conseil .service-svg { color: var(--yellow); }

/* Bloc Réalisation — accent vert */
.service-card--realisation {
    border-left-color: var(--mint);
}

.service-card--realisation:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), 0 0 24px rgba(68, 238, 170, 0.06);
}

.service-card--realisation .service-name { color: var(--mint); }
.service-card--realisation .service-svg { color: var(--mint); }

/* --- SVG filigrane --- */
.service-svg {
    position: absolute;
    bottom: 8px;
    right: 12px;
    height: 78%;
    width: auto;
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}

.service-name {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    line-height: 1.15;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.service-accroche {
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* --- CTA unique centré --- */
.services-cta {
    text-align: center;
    margin-top: 48px;
}

.btn-service {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--yellow);
    border: 1px solid rgba(252, 232, 97, 0.3);
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-service:hover {
    background: var(--yellow);
    color: var(--dark);
    border-color: var(--yellow);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(252, 232, 97, 0.2);
}

.btn-service:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 4px;
}

/* ===========================================
   TÉMOIGNAGES — Carrousel
   =========================================== */
.temoignages {
    background: linear-gradient(180deg, var(--dark) 0%, #252B44 6%, #252B44 94%, var(--dark) 100%);
    padding: 120px 40px 100px;
    position: relative;
}

.temoignages-separator {
    width: 60px;
    height: 2px;
    background: var(--yellow);
    opacity: 0.3;
    border-radius: 1px;
    margin: 0 auto 64px;
    transform-origin: center;
}

.temoignages-header {
    text-align: center;
    margin-bottom: 72px;
}

.temoignages-label {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 16px;
}

.temoignages-title {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--white);
    line-height: 1.1;
}

/* --- Carousel container --- */
.temoignages-carousel {
    max-width: 1040px;
    margin: 0 auto;
    position: relative;
    padding: 0 64px;
}

/* --- Viewport (click zones gauche/droite) --- */
.carousel-viewport {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    padding: 4px 40px;
}

.carousel-slide.is-active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

/* --- Quote text (font-size + max-width set dynamically by JS) --- */
.carousel-text {
    font-family: var(--font-main);
    font-weight: 300;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.85;
    font-style: italic;
    margin: 0 0 40px;
    max-width: 860px;
    width: 100%;
    border: none;
    padding: 0;
}

/* --- Author --- */
.carousel-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.carousel-name {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--white);
    letter-spacing: 0.02em;
}

.carousel-role {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6); /* contraste AA */
    letter-spacing: 0.02em;
}

/* --- Arrows (latérales, centrées verticalement) --- */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    padding: 0;
}

.carousel-arrow:hover {
    color: var(--yellow);
    border-color: rgba(252, 232, 97, 0.4);
    background: rgba(252, 232, 97, 0.06);
}

.carousel-arrow:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 4px;
}

.carousel-arrow--prev { left: 0; }
.carousel-arrow--next { right: 0; }

/* --- Dots --- */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 48px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.35);
}

.carousel-dot--active {
    background: var(--yellow);
    box-shadow: 0 0 8px rgba(252, 232, 97, 0.3);
    transform: scale(1.25);
}

.carousel-dot:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 4px;
}

/* ===========================================
   CLIENTS SECTION — Bandeau marquee continu
   =========================================== */
.clients {
    background: var(--dark);
    padding: 100px 0 90px;
    position: relative;
    overflow: hidden;
}

.clients-separator {
    width: 60px;
    height: 2px;
    background: var(--yellow);
    opacity: 0.3;
    border-radius: 1px;
    margin: 0 auto 56px;
    transform-origin: center;
}

.clients-header {
    text-align: center;
    margin-bottom: 56px;
    padding: 0 40px;
}

.clients-label {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 16px;
}

.clients-title {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--white);
    line-height: 1.1;
}

.clients-marquee {
    width: 100%;
    overflow-x: clip;
    overflow-y: visible;
    padding-block: 14px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.clients-track {
    display: flex;
    align-items: center;
    gap: 64px;
    width: max-content;
    animation: clientsScroll 90s linear infinite;
    will-change: transform;
}

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

.clients-logo {
    flex: 0 0 auto;
    width: 200px;
    height: 110px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    opacity: 0.92;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.clients-logo:hover {
    opacity: 1;
    transform: scale(1.08);
}

.clients-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    /* --logo-scale-tweak : facteur global pour ajuster tous les logos d'un coup sans toucher aux calibrations individuelles de _data/logo_scales.yml */
    --logo-scale-tweak: 0.92;
    transform: scale(calc(var(--logo-scale, 1.6) * var(--logo-scale-tweak)));
}

@keyframes clientsScroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

/* Perf tier minimal : pause animation pour eviter charge GPU */
html.perf-minimal .clients-track {
    animation: none;
}

/* Reduced motion : pause animation, scroll horizontal natif */
@media (prefers-reduced-motion: reduce) {
    .clients-track {
        animation: none;
    }
    .clients-marquee {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
}

/* ===========================================
   CONTACT SECTION
   =========================================== */
.contact {
    background: var(--dark);
    padding: 120px 40px 100px;
    position: relative;
    overflow: hidden;
}

.contact-separator {
    width: 60px;
    height: 2px;
    background: var(--yellow);
    opacity: 0.3;
    border-radius: 1px;
    margin: 0 auto 64px;
    transform-origin: center;
}

.contact-header {
    text-align: center;
    margin-bottom: 72px;
}

.contact-label {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 16px;
}

.contact-title {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--white);
    line-height: 1.1;
}

/* --- Grid 2 columns --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    max-width: 960px;
    margin: 0 auto;
    align-items: start;
}

/* --- Info column --- */
.contact-accroche {
    font-weight: 300;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact-coords {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 36px;
}

.contact-coord {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

a.contact-coord:hover {
    color: var(--yellow);
}

.contact-coord svg {
    flex-shrink: 0;
    opacity: 0.5;
}

a.contact-coord:hover svg {
    opacity: 1;
}

/* --- Location mini-cards with SVG landmark --- */
.contact-locations {
    display: flex;
    gap: 12px;
}

.contact-location {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: rgba(252, 232, 97, 0.06);
    border-left: 3px solid var(--yellow);
    border-radius: 0 6px 6px 0;
    flex: 1;
    transition: background 0.3s ease;
}

.contact-location:hover {
    background: rgba(252, 232, 97, 0.1);
}

.contact-location-city {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--yellow);
    opacity: 0.8;
}

.contact-location-addr {
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6); /* contraste AA */
    line-height: 1.45;
}

/* --- Form column --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.form-input {
    font-family: var(--font-main);
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 14px 16px;
    transition: border-color 0.3s ease, background 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.form-input:focus {
    border-color: var(--yellow);
    background: rgba(252, 232, 97, 0.03);
}

.form-input.is-error {
    border-color: var(--coral);
    background: rgba(239, 98, 108, 0.06);
}
.form-input.is-error:focus {
    border-color: var(--coral);
    background: rgba(239, 98, 108, 0.10);
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 98, 108, 0.18);
}

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

.btn-contact-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 16px 40px;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--yellow);
    color: var(--dark);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-contact-send:hover {
    box-shadow: 0 0 20px rgba(252, 232, 97, 0.4), 0 0 60px rgba(252, 232, 97, 0.1);
    transform: translateY(-2px);
}

.btn-contact-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-contact-send:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 4px;
}

/* --- Feedback --- */
.form-feedback {
    font-size: 0.8125rem;
    font-weight: 400;
    min-height: 1.5em;
}

.form-feedback--success {
    color: var(--mint);
}

.form-feedback--error {
    color: var(--coral);
}

/* ===========================================
   FOOTER V2 — Horizontal, minimal
   =========================================== */
.footer-v2 {
    background: var(--dark-deep);
    padding: 24px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-v2-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-v2-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6); /* contraste AA */
    transition: color 0.3s ease;
}

.footer-v2-linkedin svg {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.footer-v2-linkedin:hover {
    color: var(--yellow);
}

.footer-v2-linkedin:hover svg {
    opacity: 0.8;
}

.footer-v2-legal {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-v2-legal a,
.footer-v2-legal .tts-cookie-link {
    font-size: 0.6875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6); /* contraste AA */
    transition: color 0.3s ease;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.footer-v2-legal a:hover,
.footer-v2-legal .tts-cookie-link:hover {
    color: var(--yellow);
    opacity: 1;
}

.footer-v2-copy {
    font-size: 0.6875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55); /* contraste AA */
}

/* ===========================================
   LEGAL PAGE — Mentions legales, CGV
   =========================================== */
.legal-page {
    padding: 160px 40px 80px;
    min-height: 100vh;
}

.legal-inner {
    max-width: 760px;
    margin: 0 auto;
}

.legal-separator {
    width: 60px;
    height: 3px;
    background: var(--yellow);
    margin-bottom: 20px;
}

.legal-label {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 12px;
}

.legal-title {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin-bottom: 48px;
}

.legal-content {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.8;
}

.legal-content h2 {
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--white);
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(252, 232, 97, 0.15);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p {
    margin-bottom: 12px;
}

.legal-content a {
    color: var(--yellow);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.legal-content a:hover {
    color: var(--white);
}

.legal-back {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
}

.legal-back a:hover {
    color: var(--yellow);
}

/* ===========================================
   REFERENCE V2 — Fiche projet
   =========================================== */
.ref-hero {
    padding: 160px 40px 60px;
    max-width: 900px;
    margin: 0 auto;
}

.ref-separator {
    width: 60px;
    height: 3px;
    background: var(--yellow);
    margin-bottom: 20px;
}

.ref-label {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 12px;
}

.ref-title {
    font-family: var(--font-condensed);
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
    margin-bottom: 24px;
}

.ref-accroche {
    font-family: var(--font-main);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 28px;
    max-width: 700px;
}

.ref-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}

.ref-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.7);
}

.ref-badge--accent {
    border-color: var(--yellow);
    color: var(--yellow);
}

.ref-main-image {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 8px;
}

.ref-main-image img {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 220px);
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
}

/* Details / Meta */
.ref-details {
    padding: 60px 40px 40px;
}

.ref-details-inner {
    max-width: 760px;
    margin: 0 auto;
}

.ref-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    margin-bottom: 28px;
}

.ref-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ref-meta-key {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--yellow);
}

.ref-meta-value {
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Roles */
.ref-roles {
    margin-bottom: 32px;
}

.ref-roles-label {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: 12px;
}

.ref-roles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ref-role-tag {
    padding: 5px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-family: var(--font-main);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    transition: border-color 0.3s ease, color 0.3s ease;
}

.ref-role-tag:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
}

/* Content separator */
.ref-content-separator {
    width: 40px;
    height: 2px;
    background: var(--yellow);
    margin-bottom: 36px;
}

/* Content (markdown) */
.ref-content {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.8;
}

.ref-content p {
    margin-bottom: 1.2em;
}

.ref-content strong {
    color: var(--white);
    font-weight: 700;
}

.ref-content a {
    color: var(--yellow);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.ref-content a:hover {
    color: var(--white);
}

/* Gallery */
.ref-gallery {
    padding: 48px 40px 40px;
}

.ref-gallery-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ref-gallery-item {
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}

.ref-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(0.85);
}

.ref-gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(1);
}

/* Back navigation */
.ref-back {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 24px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Nav left group (logo + contextual back on reference pages) */
.nav-left {
    display: flex;
    align-items: center;
}
.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    transition: color 0.3s ease;
    white-space: nowrap;
}
.nav-back:hover { color: var(--yellow); }
.nav-back svg {
    opacity: 0.5;
    flex-shrink: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.nav-back:hover svg { opacity: 1; transform: translateX(-3px); }

.ref-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.3s ease;
}

.ref-back-link:hover {
    color: var(--yellow);
}

.ref-back-link svg {
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ref-back-link:hover svg {
    opacity: 1;
    transform: translateX(-3px);
}

.ref-back-top:hover svg {
    transform: translateY(-3px);
}

/* FancyBox dark theme override */
.fancybox__container {
    --fancybox-bg: rgba(10, 10, 12, 0.95);
}

/* ===========================================
   REFERENCES INDEX PAGE (.gallery-*)
   =========================================== */

/* Nav active link */
.nav-links a.active { color: var(--yellow); }
.nav-links a.active::after { width: 100%; background: var(--yellow); }

.mobile-link--active { color: var(--yellow) !important; }

/* Header */
.gallery-header {
    padding: 160px 40px 40px;
    max-width: 960px;
    margin: 0 auto;
}

.gallery-separator {
    width: 60px;
    height: 3px;
    background: var(--yellow);
    margin-bottom: 20px;
}

.gallery-label {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--yellow);
    margin-bottom: 12px;
}

.gallery-title {
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 12px;
}

.gallery-count {
    font-family: var(--font-main);
    font-weight: 300;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.45);
}

.gallery-count span {
    font-weight: 700;
    color: var(--yellow);
}

/* Filters bar (sticky) */
.gallery-filters {
    position: sticky;
    top: 56px;
    z-index: 50;
    padding: 16px 40px;
    background: rgba(43, 51, 79, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gallery-filters-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.gallery-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 7px 16px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: rgba(252, 232, 97, 0.4);
    color: var(--yellow);
}

.filter-pill.active {
    background: var(--yellow);
    color: var(--dark);
    border-color: var(--yellow);
}

.gallery-sort-toggle {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 7px 14px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.gallery-sort-toggle:hover {
    border-color: rgba(252, 232, 97, 0.4);
    color: var(--yellow);
}

.sort-icon {
    transition: transform 0.3s ease;
}

.sort-icon--asc {
    transform: rotate(180deg);
}

/* Grid wrapper */
.gallery-grid-wrapper {
    padding: 32px 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Gallery grid — 4 columns of squares */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* Gallery item */
.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: var(--white);
    cursor: pointer;
}

.gallery-item.hidden {
    display: none;
}

/* Image */
.gallery-item-img {
    position: absolute;
    inset: 0;
}

.gallery-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
}

/* Overlay — hover reveal */
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0.1) 75%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.gallery-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    transform: translateY(10px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item-name {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--white);
    line-height: 1.25;
}

.gallery-item-cat {
    font-family: var(--font-main);
    font-weight: 400;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.3;
}

.gallery-item-year {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.65rem;
    color: var(--yellow);
    opacity: 0.8;
}

/* Hover states (pointer devices only) */
@media (hover: hover) {
    .gallery-item:hover .gallery-item-img img {
        transform: scale(1.06);
    }
    .gallery-item:hover .gallery-item-overlay {
        opacity: 1;
    }
    .gallery-item:hover .gallery-item-info {
        transform: translateY(0);
    }
}

/* Touch devices — always show name */
@media (hover: none) {
    .gallery-item-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 70%);
    }
    .gallery-item-info {
        transform: translateY(0);
    }
    .gallery-item-cat,
    .gallery-item-year {
        display: none;
    }
}

/* Empty state */
.gallery-empty {
    font-family: var(--font-main);
    font-weight: 300;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 80px 20px;
}

/* ===========================================
   REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    body::after { animation: none; opacity: 0.3; }
    .hero-background { animation: none; }
    .hero-lightleaks { display: none; }
    .hero-grain::after { animation: none; opacity: 0.15; }
    .soundwave-path { animation: none; stroke-dashoffset: 0; }
    .hero-content * {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .nav { opacity: 1 !important; }
    .hero-chevron { opacity: 1 !important; }
}

/* ===========================================
   PERFORMANCE TIERS — Degradation gracieuse
   =========================================== */
html.perf-minimal .hero-grain::after {
    animation-play-state: paused;
}
html.perf-minimal body::after {
    animation-play-state: paused;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .nav { padding: 0 20px; height: 64px; }
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav-back span { display: none; }
    .nav-back { margin-left: 12px; padding-left: 12px; }

    .hero-title { font-size: clamp(1.8rem, 8vw, 3rem); }
    .hero-ctas { flex-direction: column; align-items: center; }
    .btn-primary, .btn-secondary { width: 100%; max-width: 300px; }
    .hero-chevron { bottom: 24px; }
    .hero-grain::after { opacity: 0.2; }
    .hero-lightleaks .streak { filter: blur(40px); }
    #splash-logo { max-height: 28vh; }

    /* Portfolio */
    .portfolio { padding: 80px 20px 60px; }
    .portfolio-header { margin-bottom: 48px; }

    .flagship {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .flagship-visual { min-height: 240px; }

    .flagship-visual-overlay {
        background: linear-gradient(to bottom, transparent 40%, var(--dark-deep) 100%);
    }

    .flagship-content { padding: 32px 24px; }
    .flagship-stats { gap: 24px; }

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

    /* Mobile : layout stacked (image en haut + contenu en bas, fond solid).
       Resout le bug d'overflow quand l'accroche depasse 2 lignes,
       et garantit lisibilite parfaite sur tous visuels. */
    .vitrine-card {
        min-height: auto;
        display: flex;
        flex-direction: column;
        background: var(--dark-deep);
    }
    .vitrine-card:hover { transform: none; }
    .vitrine-card:hover .vitrine-card__img img { transform: none; filter: none; }

    .vitrine-card__img {
        position: relative;
        height: 220px;
        flex-shrink: 0;
    }

    /* L'overlay gradient n'a plus de raison d'etre : le contenu est sur fond solid */
    .vitrine-card__overlay { display: none; }

    .vitrine-card__content {
        position: relative;
        bottom: auto; left: auto; right: auto;
        padding: 20px 18px 22px;
        transform: none !important;
    }

    /* Tag re-affiche sur mobile : white-space normal pour eviter qu'un long
       libelle (ex "Idée originale, conception et réalisation") ne deborde */
    .vitrine-card__tag {
        display: inline-block;
        white-space: normal;
        line-height: 1.4;
    }

    /* Sur fond solid, plus besoin de text-shadow ni d'opacite reduite */
    .vitrine-card__name { text-shadow: none; }
    .vitrine-card__accroche {
        color: rgba(255, 255, 255, 0.7);
        text-shadow: none;
    }

    /* Services */
    .services { padding: 80px 20px 60px; }
    .services-header { margin-bottom: 48px; }
    .services-grid { grid-template-columns: 1fr; gap: 20px; }
    .service-card { padding: 32px 24px 28px; }
    .service-svg { height: 60%; }

    /* Témoignages */
    .temoignages { padding: 80px 20px 60px; }
    .temoignages-header { margin-bottom: 48px; }
    .temoignages-carousel { padding: 0 8px; }
    .carousel-arrow { display: none; }
    .carousel-slide { padding: 4px 12px; } /* 4px verticaux : protege les descenders (viewport overflow:hidden a hauteur figee JS) */
    .carousel-text { font-size: 0.875rem !important; max-width: 100% !important; line-height: 1.75; margin-bottom: 28px; }
    .carousel-dots { margin-top: 32px; }

    /* Clients */
    .clients { padding: 70px 0 60px; }
    .clients-header { margin-bottom: 40px; padding: 0 20px; }
    .clients-track { gap: 40px; animation-duration: 70s; }
    .clients-logo { width: 150px; height: 86px; padding: 0; }
    .clients-logo img { transform: scale(calc(var(--logo-scale, 1.55) * var(--logo-scale-tweak))); }

    /* Contact */
    .contact { padding: 80px 20px 60px; }
    .contact-header { margin-bottom: 48px; }
    .contact-grid { grid-template-columns: 1fr; gap: 48px; text-align: center; }
    .contact-form { order: -1; }
    .contact-info { display: flex; flex-direction: column; align-items: center; }
    .contact-coords { align-items: center; }
    .contact-locations { flex-direction: column; gap: 10px; }
    .btn-contact-send { align-self: center; width: 100%; max-width: 300px; }

    /* Footer */
    .footer-v2 { padding: 20px; }
    .footer-v2-inner { flex-direction: column; gap: 12px; }
    .footer-v2-legal { gap: 16px; }

    /* Legal */
    .legal-page { padding: 100px 20px 60px; }
    .legal-title { margin-bottom: 36px; }
    .legal-content h2 { margin-top: 36px; }

    /* Reference V2 */
    .ref-hero { padding: 100px 20px 40px; }
    .ref-title { margin-bottom: 20px; }
    .ref-main-image img { max-height: 65vh; }
    .ref-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .ref-gallery-item img { height: 160px; }
    .ref-details { padding: 40px 20px 30px; }
    .ref-gallery { padding: 32px 20px 30px; }
    .ref-back { padding: 20px; margin-top: 40px; }
    .ref-back-link { font-size: 0.75rem; gap: 6px; }

    /* References Index — Gallery */
    .gallery-header { padding: 100px 20px 32px; }
    .gallery-filters { padding: 14px 20px; top: 50px; }
    .gallery-filter-pills { gap: 6px; }
    .filter-pill { font-size: 0.7rem; padding: 6px 12px; }
    .gallery-sort-toggle { font-size: 0.7rem; padding: 6px 12px; }
    .gallery-grid-wrapper { padding: 24px 20px 48px; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .gallery-item-name { font-size: 0.78rem; }
}

@media (max-width: 375px) {
    .nav { padding: 0 16px; }
    .hero-content { padding: 0 16px; }
    .hero-title { font-size: clamp(1.6rem, 8vw, 2.4rem); }
    .btn-primary, .btn-secondary { padding: 14px 28px; font-size: 0.8rem; }

    .portfolio { padding: 60px 16px 48px; }
    .vitrine-card { min-height: 240px; }
    .flagship-content { padding: 24px 16px; }

    /* Services */
    .services { padding: 60px 16px 48px; }
    .service-card { padding: 28px 20px 24px; }

    /* Témoignages */
    .temoignages { padding: 60px 16px 48px; }
    .temoignages-carousel { padding: 0; }
    .carousel-slide { padding: 4px 8px; }
    .carousel-text { font-size: 0.85rem !important; line-height: 1.7; margin-bottom: 24px; }
    .carousel-name { font-size: 0.8rem; }
    .carousel-role { font-size: 0.7rem; }

    /* Clients */
    .clients { padding: 56px 0 48px; }
    .clients-header { margin-bottom: 32px; padding: 0 16px; }
    .clients-track { gap: 32px; animation-duration: 60s; }
    .clients-logo { width: 130px; height: 74px; padding: 0; }
    .clients-logo img { transform: scale(calc(var(--logo-scale, 1.5) * var(--logo-scale-tweak))); }

    /* Contact */
    .contact { padding: 60px 16px 48px; }
    .contact-accroche { font-size: 1rem; }
    .form-input { padding: 12px 14px; font-size: 0.875rem; }

    /* Footer */
    .footer-v2 { padding: 20px 16px; }

    /* Legal */
    .legal-page { padding: 88px 16px 48px; }

    /* Reference V2 */
    .ref-hero { padding: 88px 16px 32px; }
    .ref-main-image img { max-height: 60vh; }
    .ref-gallery-grid { grid-template-columns: 1fr; }
    .ref-gallery-item img { height: auto; }
    .ref-details { padding: 32px 16px 24px; }
    .ref-gallery { padding: 24px 16px; }
    .ref-back { padding: 16px; margin-top: 32px; flex-wrap: wrap; gap: 12px; justify-content: center; }
    .ref-back-link { font-size: 0.7rem; }

    /* References Index — Gallery */
    .gallery-header { padding: 88px 16px 24px; }
    .gallery-filters { padding: 12px 16px; top: 52px; } /* 52 + 12 padding = 64px = hauteur nav mobile */
    .gallery-filters-inner { flex-direction: column; gap: 10px; }
    .gallery-filter-pills { justify-content: center; }
    .filter-pill { font-size: 0.65rem; padding: 5px 10px; }
    .gallery-sort-toggle { font-size: 0.65rem; padding: 5px 10px; align-self: center; }
    .gallery-grid-wrapper { padding: 20px 16px 40px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .gallery-item-overlay { padding: 10px; }
    .gallery-item-name { font-size: 0.7rem; }
}
