/* =====================================================================
   LANDING — EDITORIAL MAGAZINE PREMIUM DYNAMIQUE
   Style Atlas Studio / Wallpaper Mag — charcoal + ivoire + or
   + custom cursor + magnetic + glitch + marquee
   ===================================================================== */

:root {
    --ink:       #0a0907;
    --char:      #14110d;
    --char-2:    #1f1c17;
    --ivory:     #ede5d6;
    --ivory-2:   #d6cdb9;
    --ivory-3:   #968d83;
    --mute:      #837d73;
    --gold:      #c8a25c;
    --gold-2:    #e4c486;
    --rose:      #c4717f;
    --green:     #6b8a5e;
    --serif:     'Times New Roman', serif;
    --sans:      'Inter', system-ui, sans-serif;
    --mono:      'JetBrains Mono', ui-monospace, monospace;
    --ease:      cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.45, 0.64, 1);
}

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

html, body {
    width: 100%;
    /* min-height au lieu de height: 100% pour permettre aux pages longues
       (tarifs, design-system, légal) de croître au-delà du viewport.
       Le height: 100% bloquait le scroll natif et coinçait body à 900px. */
    min-height: 100%;
    background: var(--ink);
    color: var(--ivory);
    font-family: var(--sans);
    line-height: 1.5;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
@media (hover: hover) {
    html.has-custom-cursor,
    html.has-custom-cursor * { cursor: none !important; }
}

body {
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(196, 113, 127, 0.06), transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(200, 162, 92, 0.06), transparent 50%),
        var(--ink);
}

/* =====================================================================
   CUSTOM CURSOR
   ===================================================================== */
.cursor-ring,
.cursor-dot {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    display: none;
}
@media (hover: hover) {
    .cursor-ring, .cursor-dot { display: block; }
}
.cursor-ring {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(200, 162, 92, 0.55);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s ease, background 0.3s ease;
}
.cursor-dot {
    width: 5px;
    height: 5px;
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px var(--gold);
}
.cursor-ring.is-hover {
    width: 64px;
    height: 64px;
    border-color: var(--ivory);
    background: rgba(200, 162, 92, 0.08);
}
.cursor-ring.is-click {
    width: 22px;
    height: 22px;
}

/* =====================================================================
   HERO WEBGL — nébuleuse vivante en fond (sous le grain, sous le contenu)
   ===================================================================== */
#hero-webgl {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;                 /* au-dessus du fond body, sous .grain (5) */
    pointer-events: none;
    display: block;
    opacity: 0;                 /* révélé quand le shader a peint sa 1re frame */
    transition: opacity 1.2s ease;
}
#hero-webgl.is-ready  { opacity: 1; }
#hero-webgl.is-hidden { opacity: 0; }   /* pausé quand le hero quitte l'écran */

@media (prefers-reduced-motion: reduce) {
    #hero-webgl { transition: none; }
}

/* =====================================================================
   GRAIN OVERLAY
   ===================================================================== */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    opacity: 0.55;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.15 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =====================================================================
   FLOATING DECORATIVE SHAPES (background)
   ===================================================================== */
/* Floating shapes — désactivés en mode pro pour clean studio look */
.floating-shapes {
    display: none;
}

/* =====================================================================
   SIDE DECORATIVE VERTICAL BARS
   ===================================================================== */
.side-bar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 38px;
    z-index: 8;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    animation: fade-in 1s var(--ease) 1.4s forwards;
}
.side-bar-l { left: 0; }
.side-bar-r { right: 0; }
.side-line {
    width: 1px;
    flex: 1;
    background: linear-gradient(180deg, transparent, rgba(200, 162, 92, 0.25), transparent);
}
.side-text {
    flex-shrink: 0;
    writing-mode: vertical-rl;
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ivory-3);
    padding: 1.5rem 0;
    white-space: nowrap;
}
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =====================================================================
   HEADER éditorial
   ===================================================================== */
.ed-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(1.4rem, 2vw, 1.8rem) clamp(2.4rem, 4vw, 3.5rem);
    opacity: 0;
    animation: hdr-fade-in 0.8s var(--ease) 0.2s forwards;
    background: linear-gradient(180deg, rgba(10, 9, 7, 0.92), rgba(10, 9, 7, 0));
    border-bottom: 1px solid rgba(237, 229, 214, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.4s var(--ease), background 0.4s ease, opacity 0.4s ease;
    will-change: transform;
}
/* Anim d'entrée opacity only (n'interfère pas avec le transform scroll) */
@keyframes hdr-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
/* Auto-hide au scroll down, réapparait au scroll up */
.ed-header.is-hidden {
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
}
/* Solid background quand on a scrollé */
.ed-header.is-scrolled {
    background: rgba(10, 9, 7, 0.96);
    border-bottom-color: rgba(237, 229, 214, 0.12);
}
@keyframes fade-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ed-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    text-decoration: none;
    color: var(--ivory);
    transition: opacity 0.3s;
    position: relative;
}
.ed-brand:hover { opacity: 0.7; }
.brand-mark {
    font-family: var(--serif);
    font-weight: 500;
    font-style: italic;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}
.brand-meta {
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--ivory-3);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ed-nav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ivory-3);
}
.ed-issue .num {
    color: var(--gold);
    font-weight: 600;
}
.ed-sep { color: var(--mute); }

/* Navigation links (Tarifs, Portfolio, Réserver) */
.ed-nav-links {
    display: inline-flex;
    align-items: center;
    gap: 1.4rem;
}
.ed-nav-link {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ivory-3);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}
.ed-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 100%; height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease);
}
.ed-nav-link:hover {
    color: var(--ivory);
}
.ed-nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
.ed-nav-link.is-active {
    color: var(--gold);
}
.ed-nav-link.is-active::after {
    transform: scaleX(1);
}
.ed-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(200, 162, 92, 0.4);
    background: rgba(200, 162, 92, 0.08);
    color: var(--gold);
    text-decoration: none;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: all 0.3s var(--ease);
}
.ed-nav-cta:hover {
    background: var(--gold);
    color: var(--ink);
    border-color: var(--gold);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .ed-nav-link { display: none; }
    .ed-nav-cta {
        padding: 0.5rem 0.85rem;
        font-size: 0.6rem;
    }
}

/* =====================================================================
   HERO STAGE — split layout éditorial
   ===================================================================== */
.ed-stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(6rem, 10vh, 8rem) clamp(3rem, 6vw, 5rem) clamp(6rem, 10vh, 7rem);
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* === PHOTO COLUMN === */
.ed-photo-wrap {
    position: relative;
    aspect-ratio: 4 / 5;
    max-width: 540px;
    width: 100%;
    justify-self: center;
}
/* Decorative corner numbers */
.photo-corner {
    position: absolute;
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    color: var(--gold);
    z-index: 3;
    opacity: 0;
    animation: fade-in 0.8s var(--ease) 1.8s forwards;
}
.pc-tl { top: -1.6rem; left: 0; }
.pc-tr { top: -1.6rem; right: 0; color: var(--ivory-3); }
.pc-bl { bottom: -1.6rem; left: 0; color: var(--ivory-3); }
.pc-br { bottom: -1.6rem; right: 0; }

.ed-photo {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.ed-photo-frame {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: var(--char);
    clip-path: inset(0 100% 0 0);
    animation: photo-reveal 1.4s var(--ease) 0.6s forwards;
}
@keyframes photo-reveal {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}
.img-base {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: contrast(1.08) saturate(0.9) brightness(0.95);
    transform: scale(1.06);
    transition: transform 0.6s var(--ease), filter 0.6s ease;
}
.ed-photo:hover .img-base {
    transform: scale(1.12);
    filter: contrast(1.15) saturate(1) brightness(1);
}

/* RGB glitch layers (animated periodic) */
.img-glitch {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.06);
    pointer-events: none;
    opacity: 0;
}
/* Glitch désactivé — top trop gimmicky en mode pro. Les layers restent invisibles. */
.img-glitch-r,
.img-glitch-b {
    display: none;
}

/* Photo grain overlay (specific to photo) */
.photo-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.4;
    mix-blend-mode: overlay;
}
/* Scan line subtle */
.photo-scan {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
        transparent 0,
        rgba(0, 0, 0, 0.18) 50%,
        transparent 50.5%
    );
    background-size: 100% 4px;
    opacity: 0.2;
    mix-blend-mode: multiply;
}

/* Tags flottants sur la photo */
.ed-photo-tag {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(20, 17, 13, 0.88);
    border: 1px solid rgba(237, 229, 214, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ivory);
    z-index: 2;
    opacity: 0;
    animation: fade-up 0.9s var(--ease) forwards;
}
.tag-tl { top: 1rem; left: -1.5rem; animation-delay: 1.4s; }
.tag-br { bottom: 1rem; right: -1.5rem; animation-delay: 1.7s; }
.tag-dot {
    width: 7px; height: 7px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(200, 162, 92, 0.18);
}
.tag-br .tag-dot {
    background: var(--rose);
    box-shadow: 0 0 0 3px rgba(196, 113, 127, 0.18);
}

/* Caption sous photo */
.ed-photo-caption {
    position: absolute;
    bottom: -5rem;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    opacity: 0;
    animation: fade-up 1s var(--ease) 1.8s forwards;
}
.caption-label {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    color: var(--gold);
    text-transform: uppercase;
}
.caption-text {
    font-family: var(--serif);
    font-size: 1.05rem;
    color: var(--ivory);
}
.caption-text em {
    font-style: italic;
    color: var(--ivory-2);
}
.caption-data {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    color: var(--mute);
    margin-top: 0.15rem;
}

/* === CONTENT COLUMN === */
.ed-content {
    max-width: 540px;
}

.ed-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ivory-3);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fade-up 0.9s var(--ease) 0.8s forwards;
}
.eyebrow-line {
    width: 42px;
    height: 1px;
    background: var(--gold);
    display: inline-block;
    transform-origin: left;
    animation: line-grow 0.8s var(--ease) 1s forwards;
    transform: scaleX(0);
}
@keyframes line-grow {
    to { transform: scaleX(1); }
}

/* Big serif title with magnetic */
.ed-title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2.8rem, 7vw, 5.4rem);
    line-height: 1;
    letter-spacing: -0.045em;
    color: var(--ivory);
    margin-bottom: 1.4rem;
}
.t-line {
    display: block;
    overflow: hidden;
    padding: 0.1em 0;
}
.t-word {
    display: inline-block;
    transform: translateY(105%);
    animation: word-rise 1.1s var(--ease) forwards;
    will-change: transform;
}
.t-word em { font-style: normal; }
.t-line:nth-of-type(1) .t-word { animation-delay: 0.9s; }
.t-line:nth-of-type(2) .t-word { animation-delay: 1.1s; }
.t-line-italic .t-word em {
    font-style: italic;
    font-weight: 400;
    background: linear-gradient(115deg, var(--gold-2) 20%, var(--rose) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
/* Signature : Andrimalala avec ms-gradient-flow + ms-font-breathe + char-split.
   Neutralise le word-rise parent pour laisser les chars animer leur reveal. */
.t-line-italic .t-word:has(em.t-word-accent[data-split]) {
    transform: none;
    animation: none;
    will-change: auto;
}
.t-word-accent {
    font-style: italic;
    font-weight: 400;
    /* gradient + breathe sont apportés par .ms-gradient-flow + .ms-font-breathe */
    font-variation-settings: 'opsz' 144, 'wght' 360, 'SOFT' 100;
    display: inline-block;
}
.title-dot {
    color: var(--gold);
    -webkit-text-fill-color: var(--gold);
}
@keyframes word-rise {
    to { transform: translateY(0); }
}

/* === ROTATOR (mots qui morphent sous le titre) === */
.ed-rotator {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1rem, 1.4vw, 1.3rem);
    color: var(--ivory-2);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fade-up 1s var(--ease) 1.4s forwards;
}
.rot-prefix {
    color: var(--ivory-3);
    font-style: normal;
    font-family: var(--mono);
    font-size: 0.78em;
    letter-spacing: 0.06em;
}
.rot-stage {
    position: relative;
    display: inline-block;
    height: 1.4em;
    overflow: hidden;
    vertical-align: middle;
}
.rot-phantom {
    display: inline-block;
    visibility: hidden;
    white-space: nowrap;
    pointer-events: none;
}
.rot-word {
    position: absolute;
    top: 0; left: 0;
    display: inline-block;
    white-space: nowrap;
    color: var(--c, var(--gold));
    opacity: 0;
    transform: translateY(105%);
    transition: transform 0.7s var(--ease), opacity 0.7s var(--ease);
    will-change: transform, opacity;
}
.rot-word.is-active {
    opacity: 1;
    transform: translateY(0);
}
.rot-word.is-leaving {
    opacity: 0;
    transform: translateY(-105%);
}
.rot-suffix {
    color: var(--gold);
    font-style: normal;
    margin-left: -0.3rem;
}

.ed-bio {
    color: var(--ivory-2);
    font-size: clamp(1rem, 1.15vw, 1.1rem);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 460px;
}
.ed-bio-line {
    opacity: 0;
    animation: fade-up 1s var(--ease) 1.7s forwards;
}
.ed-bio em {
    font-family: var(--serif);
    font-style: italic;
    color: var(--ivory);
}
.ed-bio em strong {
    color: var(--gold);
    font-weight: 400;
}

.ed-rule {
    border: 0;
    border-top: 1px solid rgba(237, 229, 214, 0.1);
    margin-bottom: 2rem;
    opacity: 0;
    animation: rule-draw 1.2s var(--ease) 2s forwards;
    transform-origin: left center;
}
@keyframes rule-draw {
    from { opacity: 0; transform: scaleX(0); }
    to   { opacity: 1; transform: scaleX(1); }
}

/* === ACTIONS === */
.ed-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    align-items: center;
    margin-bottom: 2.2rem;
    opacity: 0;
    animation: fade-up 0.9s var(--ease) 2.2s forwards;
}

.ed-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.1rem 1.8rem 1.1rem 1.5rem;
    background: var(--ivory);
    color: var(--ink);
    text-decoration: none;
    border-radius: 999px;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
    will-change: transform;
}
.ed-cta-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(115deg, var(--gold-2), var(--rose));
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    z-index: 0;
}
.ed-cta-primary > * { position: relative; z-index: 1; }
.ed-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px -12px rgba(228, 196, 134, 0.5);
}
.ed-cta-primary:hover::before { opacity: 1; }
.cta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}
.cta-label {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.cta-sub {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(10, 9, 7, 0.6);
    transition: color 0.4s ease;
}
.counter {
    color: var(--ink);
    font-weight: 600;
}
.ed-cta-primary:hover .cta-sub { color: rgba(10, 9, 7, 0.75); }
.cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--ivory);
    transition: transform 0.4s var(--ease);
}
.ed-cta-primary:hover .cta-arrow {
    transform: translateX(4px);
}

.ed-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 0;
    color: var(--ivory-2);
    text-decoration: none;
    font-family: var(--sans);
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}
.ed-cta-secondary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0.6);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}
.ed-cta-secondary:hover {
    color: var(--gold);
}
.ed-cta-secondary:hover::after { transform: scaleX(1); }
.ed-cta-secondary svg { transition: transform 0.4s var(--ease); }
.ed-cta-secondary:hover svg { transform: translate(2px, -2px); }

/* === META GRID === */
.ed-meta-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.8rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(237, 229, 214, 0.08);
    opacity: 0;
    animation: fade-up 1s var(--ease) 2.6s forwards;
}
.ed-meta-grid li {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.meta-k {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ivory-3);
}
.meta-v {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--ivory);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.meta-pulse {
    width: 7px; height: 7px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(107, 138, 94, 0.5);
    animation: meta-pulse 2s ease-in-out infinite;
}
@keyframes meta-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(107, 138, 94, 0.5); }
    50%      { box-shadow: 0 0 0 8px rgba(107, 138, 94, 0); }
}

/* =====================================================================
   MARQUEE bas avec citations/stats
   ===================================================================== */
.ed-marquee {
    position: fixed;
    left: 0; right: 0;
    bottom: 3.5rem;
    z-index: 20;
    overflow: hidden;
    padding: 0.55rem 0;
    border-top: 1px solid rgba(200, 162, 92, 0.18);
    border-bottom: 1px solid rgba(200, 162, 92, 0.18);
    background: rgba(20, 17, 13, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    animation: fade-up 1s var(--ease) 2.4s forwards;
    pointer-events: none;
    mask-image: linear-gradient(90deg, transparent 0, black 6%, black 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, black 6%, black 94%, transparent 100%);
}
.ed-marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 1.2rem;
    white-space: nowrap;
    animation: marquee-scroll 45s linear infinite;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ivory-2);
}
.m-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.m-num {
    color: var(--gold);
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.1rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}
.m-sep {
    color: var(--mute);
    flex-shrink: 0;
}
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* =====================================================================
   FOOTER éditorial discret
   ===================================================================== */
.ed-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.85rem, 1.5vw, 1.1rem) clamp(2.4rem, 4vw, 3.5rem);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ivory-3);
    background: linear-gradient(0deg, rgba(10, 9, 7, 0.95), rgba(10, 9, 7, 0.6));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
    opacity: 0;
    animation: fade-up 1s var(--ease) 2.8s forwards;
}
.ed-foot-mark, .ed-foot-scroll { pointer-events: auto; }
.muted { color: var(--mute); }
.ed-foot-scroll {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.foot-link {
    color: var(--ivory-2);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}
.foot-link::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 100%; height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease);
}
.foot-link:hover { color: var(--gold); }
.foot-link:hover::after { transform: scaleX(1); transform-origin: left; }
.foot-arrow {
    color: var(--gold);
    transition: transform 0.3s ease;
}
.ed-foot-scroll:hover .foot-arrow {
    transform: translateY(3px);
}

/* =====================================================================
   TRANSITION mask au clic
   ===================================================================== */
.ed-transition {
    position: fixed;
    inset: 0;
    background: #050811;  /* Match portfolio bg pour éviter flash de couleur */
    z-index: 200;
    clip-path: circle(0% at var(--cx, 50%) var(--cy, 50%));
    transition: clip-path 1.1s cubic-bezier(0.83, 0, 0.17, 1);
    pointer-events: none;
}
.ed-transition.is-active {
    clip-path: circle(160% at var(--cx, 50%) var(--cy, 50%));
    pointer-events: auto;
}

/* =====================================================================
   ANIMATIONS partagées
   ===================================================================== */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
    .ed-stage {
        grid-template-columns: 1fr;
        gap: 5rem;
        padding-top: 6.5rem;
        padding-bottom: 9rem;
    }
    .ed-photo-wrap { max-width: 340px; }
    .ed-photo-caption {
        position: static;
        margin-top: 5rem;
    }
    .photo-corner { display: none; }
    .ed-content {
        max-width: 600px;
        justify-self: center;
    }
    .side-bar { display: none; }
}

@media (max-width: 768px) {
    .ed-header {
        padding: 1rem 1.25rem;
    }
    .brand-mark { font-size: 1.1rem; }
    .brand-meta { display: none; }
    .ed-nav { font-size: 0.6rem; gap: 6px; }
    .ed-stage {
        gap: 3rem;
        padding: 5rem 1.25rem 8rem;
    }
    .ed-photo-wrap { max-width: 300px; }
    .ed-photo-caption {
        margin-top: 3rem;
    }
    .tag-tl { left: -0.6rem; top: 0.6rem; }
    .tag-br { right: -0.6rem; bottom: 0.6rem; }
    .ed-photo-tag {
        font-size: 0.55rem;
        padding: 6px 10px;
    }
    .ed-title { font-size: clamp(2.4rem, 11vw, 3.6rem); }
    .ed-rotator { font-size: 1.05rem; }
    .ed-bio { font-size: 0.95rem; }
    .ed-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .ed-cta-primary {
        width: 100%;
        max-width: 360px;
        padding: 0.95rem 1.5rem 0.95rem 1.25rem;
        gap: 1rem;
    }
    .cta-label { font-size: 1rem; }
    .cta-arrow { width: 34px; height: 34px; }
    .ed-meta-grid { grid-template-columns: 1fr; gap: 0.85rem; }
    /* Marquee + footer : sortis du flux fixed sur mobile (sinon micro-barre
       8.8px qui chevauche le contenu). Même principe que le fix laptop court. */
    .ed-marquee {
        position: static;
        bottom: auto;
        margin-top: 2.5rem;
        padding: 0.5rem 0;
        opacity: 1;
        animation: none;
    }
    .ed-marquee-track {
        font-size: 0.62rem;
        gap: 0.8rem;
    }
    .ed-footer {
        position: static;
        bottom: auto;
        opacity: 1;
        animation: none;
        pointer-events: auto;
        font-size: 0.66rem;
        line-height: 1.5;
        /* padding bas large : dégage les liens du sticky-cta fixe (Demander un devis) */
        padding: 1.1rem 1.25rem calc(5rem + env(safe-area-inset-bottom));
        flex-direction: column;
        gap: 0.55rem;
        align-items: flex-start;
        background: #0a0907;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    /* les 6 liens passent à la ligne au lieu d'être coupés au bord droit */
    .ed-foot-scroll { align-self: flex-start; flex-wrap: wrap; gap: 0.55rem 0.9rem; }
    /* cible tactile : padding vertical sur les liens du footer */
    .ed-foot-scroll .foot-link { padding: 0.35rem 0; }
    .cursor-ring, .cursor-dot { display: none !important; }
}

@media (max-width: 480px) {
    .ed-photo-tag { display: none; }
    .ed-photo-caption { font-size: 0.82rem; }
    .ed-title { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .ed-photo-frame { clip-path: inset(0 0 0 0); }
    .t-word { transform: none; }
}

/* =====================================================================
   LIGHT MODE — éditorial inversé (opt-in via [data-theme="light"])
   Inverse les tokens charbon→ivoire en blanc/charbon léger
   ===================================================================== */
html[data-theme="light"] {
    --ink:       #fafaf8;          /* fond principal blanc cassé chaud */
    --char:      #ffffff;          /* surfaces secondaires */
    --char-2:    #f1ede4;          /* tertiaire (cards) */
    --ivory:     #14110d;          /* texte principal (était #ede5d6) */
    --ivory-2:   #1f1c17;          /* texte secondaire */
    --ivory-3:   #5e564c;          /* texte muet/meta */
    --mute:      #968d83;          /* meta encore plus subtil */
    --gold:      #b8924c;          /* accent or, plus sombre pour contraste */
    --gold-2:    #c9a26e;          /* accent or 2 */
    --rose:      #a85d6b;          /* accent rose, plus sombre */
    --green:     #4d7242;          /* accent vert, plus sombre */
}
html[data-theme="light"] body {
    background: var(--ink);
    color: var(--ivory);
}
html[data-theme="light"] .grain {
    opacity: 0.04;
}

/* Header éditorial en light : fond clair, texte sombre */
html.editorial-page[data-theme="light"] header#header {
    background: rgba(250, 250, 248, 0.88) !important;
    border-bottom: 1px solid rgba(20, 17, 13, 0.08) !important;
}
html.editorial-page[data-theme="light"] header#header .logo,
html.editorial-page[data-theme="light"] header#header .logo-name,
html.editorial-page[data-theme="light"] header#header .logo-letter,
html.editorial-page[data-theme="light"] header#header .nav-link {
    color: #14110d !important;
}
html.editorial-page[data-theme="light"] header#header .logo-brace,
html.editorial-page[data-theme="light"] header#header .theme-toggle,
html.editorial-page[data-theme="light"] header#header .theme-toggle svg {
    color: #b8924c !important;
}
html.editorial-page[data-theme="light"] header#header .hamburger-line {
    background: #14110d !important;
}
html.editorial-page[data-theme="light"] header#header .nav-cta {
    background: #14110d !important;
    color: #fafaf8 !important;
    border-color: #14110d !important;
}
html.editorial-page[data-theme="light"] header#header .nav-cta:hover {
    background: #b8924c !important;
    border-color: #b8924c !important;
}

/* Le toggle sun/moon doit refléter le bon état en light editorial */
html[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(40deg) scale(.6); }
html[data-theme="light"] .theme-toggle .icon-sun  { opacity: 1; transform: rotate(0) scale(1); }

/* Toggle visible en light : border + bg subtil pour le rendre clickable visuellement
   Spécificité haute pour battre html.editorial-page header#header .theme-toggle */
html[data-theme="light"] .theme-toggle,
html.editorial-page[data-theme="light"] header#header .theme-toggle {
    border: 1px solid rgba(20, 17, 13, 0.25) !important;
    background: rgba(255, 255, 255, 0.85) !important;
    color: #14110d !important;
}
html.editorial-page[data-theme="light"] header#header .theme-toggle svg {
    stroke: #b8924c !important;
    color: #b8924c !important;
}
html[data-theme="light"] .theme-toggle:hover,
html.editorial-page[data-theme="light"] header#header .theme-toggle:hover {
    border-color: rgba(184, 146, 76, 0.6) !important;
    background: rgba(255, 255, 255, 1) !important;
}

/* =====================================================================
   LIGHT MODE — Tarifs pages cards (pkg-card)
   En dark : bg charbon-rose-vert gradient. En light : fond ivoire clair
   avec border visible + texte sombre lisible.
   ===================================================================== */
html[data-theme="light"] .pkg-card {
    background: linear-gradient(170deg, #ffffff 0%, #faf6ee 100%) !important;
    border: 1px solid rgba(20, 17, 13, 0.10) !important;
    box-shadow: 0 12px 30px -12px rgba(20, 17, 13, 0.12) !important;
    color: var(--ivory) !important;
}
html[data-theme="light"] .pkg-card.is-featured {
    background: linear-gradient(170deg, #fff5f7 0%, #faf6ee 100%) !important;
    border: 1px solid rgba(168, 93, 107, 0.25) !important;
    box-shadow: 0 14px 36px -10px rgba(168, 93, 107, 0.2) !important;
}
html[data-theme="light"] .pkg-card .pkg-name,
html[data-theme="light"] .pkg-card .pkg-price {
    color: #14110d !important;
}
html[data-theme="light"] .pkg-card .pkg-tagline,
html[data-theme="light"] .pkg-card .pkg-duration,
html[data-theme="light"] .pkg-card .pkg-features li {
    color: rgba(20, 17, 13, 0.75) !important;
}
html[data-theme="light"] .pkg-card .pkg-features li::before {
    color: #b8924c !important;
}

/* Booking section en light */
html[data-theme="light"] .booking-card {
    background: #ffffff !important;
    border: 1px solid rgba(20, 17, 13, 0.08) !important;
    color: #14110d !important;
}

/* Process steps en light : pas de carré, juste divider bottom subtil
   pour reproduire la sensation de liste/séparation comme en dark */
html[data-theme="light"] .process-step {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(20, 17, 13, 0.08) !important;
    color: #14110d !important;
}
html[data-theme="light"] .process-step:last-child {
    border-bottom: none !important;
}
html[data-theme="light"] .step-num {
    color: #b8924c !important;
}
html[data-theme="light"] .step-title {
    color: #14110d !important;
}
html[data-theme="light"] .step-duration {
    color: rgba(20, 17, 13, 0.55) !important;
}
html[data-theme="light"] .step-desc {
    color: rgba(20, 17, 13, 0.72) !important;
}

/* Case-mini en light : carte projet projets récents avec texte lisible
   (avant : bg charbon 40% sur fond ivoire = gris foncé illisible) */
html[data-theme="light"] .case-mini {
    background: #ffffff !important;
    border: 1px solid rgba(20, 17, 13, 0.08) !important;
    box-shadow: 0 4px 16px -8px rgba(20, 17, 13, 0.1) !important;
    color: #14110d !important;
}
html[data-theme="light"] .case-mini:hover {
    background: #faf6ee !important;
    border-color: rgba(184, 146, 76, 0.4) !important;
    box-shadow: 0 8px 24px -8px rgba(20, 17, 13, 0.15) !important;
}
html[data-theme="light"] .case-mini .case-num {
    color: #b8924c !important;
}
html[data-theme="light"] .case-mini .case-client {
    color: #14110d !important;
}
html[data-theme="light"] .case-mini .case-type,
html[data-theme="light"] .case-mini .case-result,
html[data-theme="light"] .case-mini .case-duration {
    color: rgba(20, 17, 13, 0.7) !important;
}
html[data-theme="light"] .case-mini-arrow {
    color: #b8924c !important;
}

/* CTA buttons en light editorial : bg sombre + texte clair */
html.editorial-page[data-theme="light"] .pkg-cta,
html.editorial-page[data-theme="light"] .booking-cta {
    background: #14110d !important;
    color: #fafaf8 !important;
    border: 1px solid #14110d !important;
}
html.editorial-page[data-theme="light"] .pkg-card.is-featured .pkg-cta {
    background: #a85d6b !important;
    border-color: #a85d6b !important;
}

/* Pullquote + zone de silence en light */
html[data-theme="light"] .pullquote {
    color: #14110d !important;
}
html[data-theme="light"] .pullquote::before,
html[data-theme="light"] .pullquote::after {
    color: #b8924c !important;
}
html[data-theme="light"] .tarifs-silence::before,
html[data-theme="light"] .tarifs-silence::after {
    background: #b8924c !important;
}
html[data-theme="light"] .tarifs-silence-text {
    color: #5e564c !important;
}

/* =====================================================================
   FIX VIEWPORT LAPTOP PC 1280×720 — éviter overlap photo/marquee/footer
   ===================================================================== */
@media (max-height: 820px) and (min-width: 1024px) {
    .ed-stage {
        min-height: 100vh !important;
        min-height: 100dvh !important;
        max-height: 100vh !important;
        padding: clamp(4rem, 6.5vh, 5rem) clamp(2rem, 4vw, 4rem) clamp(2.5rem, 4vh, 3.5rem) !important;
        overflow: hidden !important;
        align-items: start !important;
    }
    /* Photo limitée en hauteur, alignée en haut, jamais coupée */
    .ed-photo-wrap {
        max-width: 340px !important;
        max-height: calc(100vh - 9rem) !important;
        aspect-ratio: 4 / 5 !important;
        align-self: start !important;
        margin-top: 0 !important;
    }
    .ed-photo-frame img,
    .img-base {
        object-position: center 20% !important;
    }
    /* Right column aussi alignée en haut */
    .ed-content {
        align-self: start !important;
        padding-top: 0.5rem !important;
    }
    /* Hierarchy compactée pour tenir en 720px viewport */
    .ed-eyebrow { margin-bottom: 0.4rem !important; }
    .ed-title { font-size: clamp(2.4rem, 5vw, 3.6rem) !important; margin: 0.2rem 0 0.35rem !important; line-height: 1.02 !important; }
    .ed-rotator { font-size: clamp(1.45rem, 2.6vw, 1.95rem) !important; margin: 0.15rem 0 0.85rem !important; }
    .ed-bio { font-size: 0.92rem !important; line-height: 1.5 !important; margin-bottom: 1rem !important; }
    .ed-bio-line { margin: 0 !important; }
    .ed-rule { margin: 0.8rem 0 !important; }
    .ed-actions { gap: 0.5rem !important; margin-bottom: 1rem !important; }
    .ed-cta-primary { padding: 0.75rem 1.1rem !important; }
    .ed-cta-secondary { padding: 0.55rem 0.95rem !important; }
    .ed-meta-grid { gap: 0.3rem 1rem !important; font-size: 0.75rem !important; }
}

/* =====================================================================
   FIX LAPTOP 1280×720 v2 — Marquee + Footer en flow, plus en fixed
   À 720px height, le fixed marquee+footer chevauche le hero (CTA, meta).
   On les retire du flow fixed pour les pousser en fin de page.
   ===================================================================== */
@media (max-height: 820px) and (min-width: 1024px) {
    .ed-marquee,
    .ed-footer {
        position: static !important;
        bottom: auto !important;
        margin: 0 !important;
    }
    .ed-marquee {
        margin-top: 2rem !important;
        opacity: 1 !important;
        animation: none !important;
    }
    .ed-footer {
        opacity: 1 !important;
        animation: none !important;
        padding: 1rem clamp(2rem, 4vw, 3rem) !important;
        background: rgba(10, 9, 7, 0.95) !important;
        backdrop-filter: none !important;
        pointer-events: auto !important;
    }
    /* Side bars verticales gauche/droite trop encombrantes sur laptop court */
    .ed-side-bar,
    .ed-side-left,
    .ed-side-right {
        display: none !important;
    }
}

/* Voile de départ accueil → portfolio : fond vers le navy du portfolio
   (#050811, identique au .arrival-veil) pour un switch sans flash blanc. */
.depart-veil {
    position: fixed;
    inset: 0;
    z-index: 9995;
    background: #050811;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.depart-veil.is-on { opacity: 1; }
html[data-theme="light"] .depart-veil { background: #faf6ec; }
@media (prefers-reduced-motion: reduce) {
    .depart-veil { display: none !important; }
}
