/* =========================================================
   PAGE HISTOIRES ILLUSTRÉES - PHOENIX STUDIO
   Important :
   - Ce CSS ne modifie pas directement .sticky-nav, .nav-links,
     .dropdown, etc.
   - La barre de menu reste gérée par style.css.
========================================================= */

.history-page {
    --history-bg: #07070b;
    --history-bg-soft: #101018;
    --history-card: rgba(255, 255, 255, 0.065);
    --history-card-strong: rgba(255, 255, 255, 0.1);
    --history-border: rgba(255, 255, 255, 0.13);
    --history-text: #f7f3e9;
    --history-muted: #b8b2a6;
    --history-gold: #f3b43f;
    --history-orange: #ff6b2c;
    --history-red: #d72f2f;
    --history-green: #47d18c;

    background:
        radial-gradient(circle at top left, rgba(243, 180, 63, 0.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(215, 47, 47, 0.12), transparent 35%),
        var(--history-bg);
    color: var(--history-text);
    font-family: "Poppins", sans-serif;
    overflow-x: hidden;
}

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

.history-hero {
    min-height: 100vh;
    position: relative;
    background:
        linear-gradient(90deg, rgba(5, 5, 9, 0.92), rgba(7, 7, 12, 0.74), rgba(7, 7, 12, 0.38)),
        url("pictures/histo1.jpg") center / cover no-repeat;
    overflow: hidden;
}

.history-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -25% -10%;
    height: 48%;
    background: linear-gradient(to top, var(--history-bg), transparent);
    pointer-events: none;
}

.history-hero-inner {
    width: min(1180px, 88%);
    margin: 0 auto;
    padding: clamp(130px, 16vw, 190px) 0 90px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.history-hero-text {
    max-width: 720px;
}

.history-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border: 1px solid rgba(243, 180, 63, 0.35);
    border-radius: 999px;
    background: rgba(243, 180, 63, 0.08);
    color: var(--history-gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.history-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--history-gold);
    box-shadow: 0 0 18px rgba(243, 180, 63, 0.9);
}

.history-hero h1 {
    margin: 24px 0 20px;
    font-size: clamp(2.5rem, 6vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: -0.08em;
    color: #fff;
}

.history-hero p {
    max-width: 640px;
    color: var(--history-muted);
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.85;
}

.history-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.history-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

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

.history-btn-primary {
    color: #160b03;
    background: linear-gradient(135deg, var(--history-gold), var(--history-orange));
    box-shadow: 0 18px 35px rgba(255, 107, 44, 0.25);
}

.history-btn-secondary {
    color: var(--history-text);
    border-color: var(--history-border);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.history-btn-secondary:hover {
    border-color: rgba(243, 180, 63, 0.5);
    background: rgba(243, 180, 63, 0.1);
}

/* Carte dans le hero */

.history-hero-card {
    border: 1px solid var(--history-border);
    border-radius: 34px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045));
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
    transform: rotate(1.2deg);
}

.hero-card-image {
    height: 410px;
    overflow: hidden;
}

.hero-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.04);
    transition: transform 0.6s ease;
}

.history-hero-card:hover .hero-card-image img {
    transform: scale(1.1);
}

.hero-card-content {
    padding: 24px;
}

.hero-card-content span {
    color: var(--history-gold);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.hero-card-content h2 {
    color: #fff;
    margin: 10px 0;
    font-size: 1.45rem;
}

.hero-card-content p {
    font-size: 0.94rem;
    line-height: 1.7;
}

/* ================= CONTENU GLOBAL ================= */

.history-main {
    position: relative;
    z-index: 3;
    width: min(1180px, 88%);
    margin: 0 auto;
    padding: 90px 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 36px;
}

.section-heading h2 {
    margin: 18px 0 14px;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.section-heading p {
    color: var(--history-muted);
    line-height: 1.8;
}

/* ================= INTRO ================= */

.history-intro {
    margin-bottom: 90px;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.intro-card {
    min-height: 250px;
    padding: 30px;
    border: 1px solid var(--history-border);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.intro-card:hover {
    transform: translateY(-8px);
    border-color: rgba(243, 180, 63, 0.42);
    background:
        linear-gradient(180deg, rgba(243, 180, 63, 0.11), rgba(255, 255, 255, 0.04));
}

.intro-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(243, 180, 63, 0.12);
    font-size: 1.7rem;
    margin-bottom: 22px;
}

.intro-card h3 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.intro-card p {
    color: var(--history-muted);
    line-height: 1.75;
}

/* ================= HISTOIRE VEDETTE ================= */

.featured-story {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 44px;
    align-items: center;
    margin-bottom: 100px;
    padding: 28px;
    border: 1px solid var(--history-border);
    border-radius: 38px;
    background:
        radial-gradient(circle at 12% 10%, rgba(243, 180, 63, 0.14), transparent 34%),
        rgba(255, 255, 255, 0.045);
}

.featured-visual {
    position: relative;
    min-height: 520px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.featured-visual img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
    display: block;
}

.featured-badge {
    position: absolute;
    left: 22px;
    bottom: 22px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(7, 7, 11, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--history-gold);
    font-weight: 700;
    backdrop-filter: blur(14px);
}

.featured-content {
    padding: 10px;
}

.featured-content h2 {
    margin: 18px 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.featured-content p {
    color: var(--history-muted);
    line-height: 1.85;
    margin-bottom: 16px;
}

.featured-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0;
}

.featured-meta span {
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid var(--history-border);
    color: #ddd4c7;
    background: rgba(255, 255, 255, 0.055);
    font-size: 0.82rem;
}

/* ================= FILTRES / CARTES ================= */

.story-library {
    margin-bottom: 100px;
}

.story-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.filter-btn {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--history-border);
    background: rgba(255, 255, 255, 0.045);
    color: var(--history-muted);
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
    color: #170b03;
    border-color: transparent;
    background: linear-gradient(135deg, var(--history-gold), var(--history-orange));
}

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

.story-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--history-border);
    background: var(--history-card);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
    transition: transform 0.28s ease, border-color 0.28s ease;
}

.story-card:hover {
    transform: translateY(-8px);
    border-color: rgba(243, 180, 63, 0.45);
}

.story-card-image {
    position: relative;
    height: 310px;
    overflow: hidden;
}

.story-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 7, 11, 0.96), transparent 62%);
}

.story-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.55s ease;
}

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

.story-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    padding: 8px 12px;
    border-radius: 999px;
    color: #160b03;
    background: linear-gradient(135deg, var(--history-gold), var(--history-orange));
    font-size: 0.75rem;
    font-weight: 800;
}

.story-card-content {
    padding: 24px;
}

.story-card-content h3 {
    color: #fff;
    font-size: 1.25rem;
    line-height: 1.25;
    margin-bottom: 12px;
}

.story-card-content p {
    color: var(--history-muted);
    line-height: 1.75;
    font-size: 0.94rem;
}

.story-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
}

.story-status {
    color: var(--history-green);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.read-story-btn {
    border: none;
    color: #fff;
    background: transparent;
    font-weight: 800;
    cursor: pointer;
    transition: color 0.25s ease;
}

.read-story-btn:hover {
    color: var(--history-gold);
}

/* ================= PROCESS ================= */

.creation-process {
    margin-bottom: 100px;
}

.process-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.process-item {
    display: flex;
    gap: 20px;
    padding: 26px;
    border-radius: 26px;
    border: 1px solid var(--history-border);
    background: rgba(255, 255, 255, 0.045);
}

.process-item > span {
    min-width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #170b03;
    background: linear-gradient(135deg, var(--history-gold), var(--history-orange));
    font-weight: 900;
}

.process-item h3 {
    color: #fff;
    margin-bottom: 8px;
}

.process-item p {
    color: var(--history-muted);
    line-height: 1.7;
}

/* ================= CTA ================= */

.history-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: clamp(28px, 5vw, 54px);
    border: 1px solid rgba(243, 180, 63, 0.28);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(243, 180, 63, 0.15), rgba(215, 47, 47, 0.08)),
        rgba(255, 255, 255, 0.045);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}

.history-cta h2 {
    color: #fff;
    margin: 18px 0 12px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.history-cta p {
    color: var(--history-muted);
    line-height: 1.8;
    max-width: 760px;
}

/* ================= MODAL ================= */

.story-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.story-modal.active {
    display: flex;
}

.story-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(12px);
}

.story-modal-box {
    position: relative;
    z-index: 2;
    width: min(980px, 96vw);
    max-height: 88vh;
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--history-border);
    background: #101018;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
}

.modal-image {
    min-height: 520px;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-content {
    padding: clamp(28px, 4vw, 46px);
    overflow-y: auto;
}

.modal-content span {
    color: var(--history-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
    font-weight: 800;
}

.modal-content h2 {
    color: #fff;
    margin: 14px 0 18px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.1;
}

.modal-content p {
    color: var(--history-muted);
    line-height: 1.9;
}

.modal-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.modal-details span {
    padding: 9px 12px;
    border-radius: 999px;
    color: #ddd4c7;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--history-border);
    letter-spacing: 0;
    text-transform: none;
}


/* ================= ANIMATIONS SÉCURISÉES ================= */

/* Par défaut, le contenu reste visible même si le JS ne charge pas */
.animate-fade {
    opacity: 1;
    transform: none;
}

/* L'animation ne s'active que si le JS fonctionne */
body.animations-ready .animate-fade {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

body.animations-ready .animate-fade.active {
    opacity: 1;
    transform: translateY(0);
}
/* ================= RESPONSIVE ================= */

@media (max-width: 1100px) {
    .history-hero-inner,
    .featured-story {
        grid-template-columns: 1fr;
    }

    .history-hero-card {
        max-width: 620px;
        transform: none;
    }

    .intro-grid,
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .history-main {
        width: min(92%, 1180px);
        padding: 70px 0;
    }

    .history-hero-inner {
        width: min(92%, 1180px);
        padding-top: 125px;
        gap: 34px;
    }

    .history-hero h1 {
        letter-spacing: -0.055em;
    }

    .history-hero-actions,
    .history-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .history-btn {
        width: 100%;
    }

    .intro-grid,
    .stories-grid,
    .process-list {
        grid-template-columns: 1fr;
    }

    .featured-story {
        padding: 18px;
        border-radius: 28px;
    }

    .featured-visual,
    .featured-visual img {
        min-height: 360px;
    }

    .story-modal-box {
        grid-template-columns: 1fr;
        max-height: 92vh;
    }

    .modal-image {
        min-height: 280px;
        max-height: 320px;
    }

    .modal-content {
        max-height: 52vh;
    }
}

@media (max-width: 480px) {
    .history-hero-inner {
        padding-top: 115px;
    }

    .history-kicker {
        font-size: 0.68rem;
    }

    .hero-card-image,
    .story-card-image {
        height: 260px;
    }

    .intro-card,
    .process-item {
        padding: 22px;
    }
}

/* ========================================================================== 
   HISTOIRE — CORRECTION STRUCTURELLE V9
   Objectif : une seule scrollbar native (BODY), séparée de la navbar.
   ========================================================================== */

:root {
  --history-nav-height: 82px;
  --history-nav-z: 1000;
  --history-backdrop-z: 990;
  --history-modal-z: 1200;
  --history-scrollbar-width: 0px;
}

/* Une seule zone de défilement : BODY. */
html {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.history-page {
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--history-nav-height) + 20px);
  background: #07070b;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* La seule barre visible appartient au BODY. */
body.history-page::-webkit-scrollbar { width: 11px; }
body.history-page::-webkit-scrollbar-track { background: #090a10; }
body.history-page::-webkit-scrollbar-thumb {
  background: #8f816a;
  border: 2px solid #090a10;
  border-radius: 999px;
}
body.history-page::-webkit-scrollbar-thumb:hover { background: #d7a044; }
body.history-page { scrollbar-width: thin; scrollbar-color: #8f816a #090a10; }

/* Supprime tout ancien composant de scrollbar artificielle. */
.history-scrollbar,
.history-scrollbar-thumb,
#historyScrollbar,
#historyScrollbarThumb,
[data-history-scrollbar] { display: none !important; }

/* Aucun contenu normal ne doit monter dans la couche de la navigation. */
body.history-page > * { min-width: 0; }
body.history-page .history-hero,
body.history-page .history-main,
body.history-page .main-footer {
  position: relative;
  z-index: 0 !important;
}

/* Conflit global Portfolio.css : marge appliquée à tous les paragraphes. */
body.history-page .history-hero p,
body.history-page .history-main p,
body.history-page .main-footer p,
body.history-page .story-modal p { margin-left: 0 !important; }

body.history-page #creation,
body.history-page #histoires { scroll-margin-top: calc(var(--history-nav-height) + 20px); }

/* Navbar : le right est calculé selon la vraie largeur de la scrollbar BODY. */
body.history-page .sticky-nav {
  position: fixed !important;
  inset: 0 var(--history-scrollbar-width) auto 0 !important;
  width: auto !important;
  height: var(--history-nav-height);
  min-height: var(--history-nav-height);
  margin: 0 !important;
  padding: 10px clamp(24px, 3vw, 48px) !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow: visible !important;
  background: linear-gradient(105deg, #090b13 0%, #111521 64%, #321b1b 100%);
  border-bottom: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 7px 24px rgba(0,0,0,.32);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: var(--history-nav-z) !important;
}
body.history-page .sticky-nav::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243,180,63,.82), rgba(255,107,44,.78), transparent);
  pointer-events: none;
}
body.history-page .sticky-nav .nav-brand { display: inline-flex; flex: 0 0 auto; align-items: center; min-width: 0; }
body.history-page .sticky-nav .nav-brand img { display: block; width: clamp(118px, 9vw, 145px); max-width: 100%; height: auto; }
body.history-page .sticky-nav .nav-links ul { margin: 0; padding: 0; list-style: none; }
body.history-page .sticky-nav .nav-links li::after { display: none !important; }
body.history-page .sticky-nav .nav-links a { text-decoration: none; }
body.history-page .mobile-menu-toggle,
body.history-page .mobile-menu-close,
body.history-page .mobile-menu-header,
body.history-page .nav-backdrop { display: none; }

/* ---------------------------- Desktop ---------------------------- */
@media (min-width: 1281px) {
  body.history-page .sticky-nav .nav-links { flex: 1 1 auto; display: flex; justify-content: flex-end; min-width: 0; }
  body.history-page .sticky-nav .nav-links > ul { display: flex; align-items: center; justify-content: flex-end; gap: clamp(2px, .55vw, 11px); width: auto; }
  body.history-page .sticky-nav .nav-links > ul > li { position: relative; flex: 0 0 auto; margin: 0; padding: 0; }
  body.history-page .sticky-nav .nav-links > ul > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 clamp(6px, .45vw, 10px);
    border-radius: 9px;
    color: rgba(255,255,255,.92) !important;
    font-size: clamp(.67rem, .72vw, .8rem);
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: color .2s ease, background .2s ease;
  }
  body.history-page .sticky-nav .nav-links > ul > li > a:hover,
  body.history-page .sticky-nav .nav-links > ul > li > a:focus-visible,
  body.history-page .sticky-nav .nav-links > ul > li.active-menu > a,
  body.history-page .sticky-nav .nav-links > ul > li.active-parent > a { color: #ffd36f !important; background: rgba(255,255,255,.075); }
  body.history-page .dropdown-arrow { font-size: .7em; transition: transform .2s ease; }
  body.history-page .dropdown:hover .dropdown-arrow,
  body.history-page .dropdown:focus-within .dropdown-arrow { transform: rotate(180deg); }
  body.history-page .sticky-nav .dropdown-content {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    display: none;
    width: min(372px, 90vw);
    margin: 0 !important;
    padding: 10px !important;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 16px;
    background: #131823;
    box-shadow: 0 22px 45px rgba(0,0,0,.48);
    z-index: calc(var(--history-nav-z) + 4) !important;
  }
  body.history-page .sticky-nav .dropdown:hover > .dropdown-content,
  body.history-page .sticky-nav .dropdown:focus-within > .dropdown-content { display: block; }
  body.history-page .sticky-nav .dropdown-content li { display: block; width: 100%; margin: 0; padding: 0; }
  body.history-page .sticky-nav .dropdown-content li a {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px;
    border-radius: 11px;
    color: #f6f3ee !important;
    white-space: normal;
  }
  body.history-page .sticky-nav .dropdown-content li a:hover,
  body.history-page .sticky-nav .dropdown-content li a:focus-visible { background: linear-gradient(135deg, rgba(243,180,63,.18), rgba(255,107,44,.14)); }
  body.history-page .service-icon,
  body.history-page .portfolio-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(243,180,63,.24); border-radius: 11px; background: rgba(243,180,63,.09); font-size: 1rem; }
  body.history-page .service-text,
  body.history-page .portfolio-text { display: block; min-width: 0; }
  body.history-page .service-text strong,
  body.history-page .portfolio-text strong { display: block; color: #fff; font-size: .8rem; }
  body.history-page .service-text small,
  body.history-page .portfolio-text small { display: block; margin-top: 3px; color: rgba(255,255,255,.67); font-size: .69rem; line-height: 1.35; }
}

/* ---------------- Laptop 13 / 14 pouces ---------------- */
@media (min-width: 1281px) and (max-width: 1440px) {
  :root { --history-nav-height: 76px; }
  body.history-page .sticky-nav { padding-inline: clamp(18px, 2.2vw, 30px) !important; gap: 12px; }
  body.history-page .sticky-nav .nav-brand img { width: 118px; }
  body.history-page .sticky-nav .nav-links > ul { gap: 0; }
  body.history-page .sticky-nav .nav-links > ul > li > a { padding-inline: 7px; font-size: .66rem; }
  body.history-page .history-hero-inner {
    width: min(1180px, 90%) !important;
    grid-template-columns: minmax(0, 1.04fr) minmax(350px, .82fr) !important;
    gap: clamp(26px, 3vw, 40px) !important;
    padding-top: clamp(112px, 10vw, 138px) !important;
    padding-bottom: 62px !important;
  }
  body.history-page .history-hero h1 { font-size: clamp(3.25rem, 5vw, 4.45rem) !important; }
  body.history-page .hero-card-image { height: 330px; }
  body.history-page .history-main { width: min(1180px, 90%) !important; }
}

/* ---------------- Menu burger tablette / mobile ---------------- */
@media (max-width: 1280px) {
  :root { --history-nav-height: 76px; }
  body.history-page .sticky-nav { padding-inline: clamp(16px, 4vw, 28px) !important; gap: 12px; }
  body.history-page .sticky-nav .nav-brand img { width: clamp(108px, 20vw, 126px); }
  body.history-page .mobile-menu-toggle {
    position: relative;
    z-index: 2;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.045));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 7px 18px rgba(0,0,0,.24);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  body.history-page .mobile-menu-toggle-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
  body.history-page .mobile-menu-toggle .fa { display: block !important; margin: 0 !important; color: currentColor !important; font-size: 1.25rem; }
  body.history-page .nav-backdrop {
    position: fixed;
    inset: var(--history-nav-height) 0 0 0;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(2,3,8,.62);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: var(--history-backdrop-z) !important;
    transition: opacity .18s ease, visibility .18s ease;
  }
  body.history-page .nav-backdrop.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
  body.history-page .sticky-nav .nav-links {
    position: fixed !important;
    top: calc(var(--history-nav-height) + 12px) !important;
    right: calc(12px + var(--history-scrollbar-width)) !important;
    left: auto !important;
    display: block !important;
    width: min(390px, calc(100vw - var(--history-scrollbar-width) - 24px)) !important;
    max-width: none !important;
    height: calc(100dvh - var(--history-nav-height) - 24px) !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 78px 14px 16px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 20px;
    background: linear-gradient(160deg, #151927, #11121b 65%, #261819);
    box-shadow: 0 26px 55px rgba(0,0,0,.56);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(calc(100% + 24px));
    transition: none;
    z-index: calc(var(--history-nav-z) + 2) !important;
    -webkit-overflow-scrolling: touch;
  }
  body.history-page .sticky-nav .nav-links.menu-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(0); }
  body.history-page .sticky-nav .nav-links.menu-opening.menu-open { animation: historyDrawerEnter .25s cubic-bezier(.22,.8,.24,1) both; }
  @keyframes historyDrawerEnter { from { opacity: 0; transform: translateX(calc(100% + 24px)); } to { opacity: 1; transform: translateX(0); } }
  body.history-page .mobile-menu-header { position: absolute; top: 20px; right: 76px; left: 20px; display: flex !important; flex-direction: column; gap: 3px; pointer-events: none; }
  body.history-page .mobile-menu-header span { color: #ffc24c; font-size: .69rem; font-weight: 800; letter-spacing: .08em; }
  body.history-page .mobile-menu-header strong { color: #fff; font-size: 1.05rem; line-height: 1.18; }
  body.history-page .mobile-menu-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    display: grid !important;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.045));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 7px 17px rgba(0,0,0,.25);
    cursor: pointer;
  }
  body.history-page .mobile-menu-close .fa { display: block !important; margin: 0 !important; font-size: 0 !important; }
  body.history-page .mobile-menu-close::before,
  body.history-page .mobile-menu-close::after { content: ""; position: absolute; width: 20px; height: 3px; border-radius: 99px; background: #fff; }
  body.history-page .mobile-menu-close::before { transform: rotate(45deg); }
  body.history-page .mobile-menu-close::after { transform: rotate(-45deg); }
  body.history-page .mobile-menu-close:hover,
  body.history-page .mobile-menu-close:focus-visible { border-color: rgba(255,190,71,.85); background: rgba(243,180,63,.18); }
  body.history-page .sticky-nav .nav-links > ul { display: block; width: 100%; }
  body.history-page .sticky-nav .nav-links > ul > li { display: block; width: 100%; margin: 0 0 8px; padding: 0; }
  body.history-page .sticky-nav .nav-links > ul > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    color: #fff !important;
    background: rgba(255,255,255,.035);
    font-size: .79rem;
    font-weight: 800;
    line-height: 1.2;
  }
  body.history-page .sticky-nav .nav-links > ul > li > a:hover,
  body.history-page .sticky-nav .nav-links > ul > li > a:focus-visible,
  body.history-page .sticky-nav .nav-links > ul > li.active-menu > a,
  body.history-page .sticky-nav .nav-links > ul > li.active-parent > a { background: rgba(243,180,63,.12); border-color: rgba(243,180,63,.3); }
  body.history-page .dropdown-arrow { font-size: .8rem; transition: transform .2s ease; }
  body.history-page .dropdown.open > .dropdown-link .dropdown-arrow { transform: rotate(180deg); }
  body.history-page .sticky-nav .dropdown-content {
    position: static !important;
    display: none !important;
    width: 100% !important;
    margin: 8px 0 10px !important;
    padding: 8px !important;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    background: rgba(0,0,0,.18);
    box-shadow: none;
  }
  body.history-page .sticky-nav .dropdown.open > .dropdown-content { display: block !important; }
  body.history-page .sticky-nav .dropdown-content li { display: block; margin: 0; padding: 0; }
  body.history-page .sticky-nav .dropdown-content li a { display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: start; gap: 10px; width: 100%; padding: 10px; border-radius: 10px; color: #fff !important; white-space: normal; }
  body.history-page .sticky-nav .dropdown-content li a:hover { background: rgba(255,255,255,.08); }
  body.history-page .service-icon,
  body.history-page .portfolio-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(243,180,63,.12); font-size: .92rem; }
  body.history-page .service-text,
  body.history-page .portfolio-text { min-width: 0; }
  body.history-page .service-text strong,
  body.history-page .portfolio-text strong { display: block; color: #fff; font-size: .78rem; line-height: 1.25; }
  body.history-page .service-text small,
  body.history-page .portfolio-text small { display: block; margin-top: 3px; color: rgba(255,255,255,.72); font-size: .66rem; line-height: 1.4; overflow-wrap: anywhere; }
}

/* ---------------- Page responsive ---------------- */
body.history-page .history-hero-inner { width: min(1320px, 88%); padding-top: clamp(142px, 12vw, 178px); }
body.history-page .history-main { width: min(1320px, 88%); }
body.history-page .history-hero h1 { max-width: 780px; }
body.history-page .history-hero-actions { align-items: center; }
body.history-page .process-item > span { flex: 0 0 56px; width: 56px; height: 56px; min-width: 56px; border-radius: 16px; font-size: 1rem; line-height: 1; }
body.history-page .process-item h3 { text-align: left; }
@media (min-width: 1600px) {
  body.history-page .history-hero-inner,
  body.history-page .history-main { width: min(1420px, 86%); }
  body.history-page .history-hero h1 { font-size: clamp(4.6rem, 5.2vw, 6rem); }
}
@media (max-width: 1100px) {
  body.history-page .history-hero-inner,
  body.history-page .featured-story { grid-template-columns: 1fr; }
  body.history-page .history-hero-card { max-width: 680px; }
  body.history-page .history-hero-inner { width: min(980px, 90%); padding-top: 132px; }
  body.history-page .history-main { width: min(980px, 90%); }
  body.history-page .intro-grid,
  body.history-page .stories-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  :root { --history-nav-height: 72px; }
  body.history-page .sticky-nav { padding-inline: 16px !important; }
  body.history-page .sticky-nav .nav-brand img { width: 112px; }
  body.history-page .mobile-menu-toggle { width: 46px; min-width: 46px; padding: 0; border-radius: 13px; }
  body.history-page .mobile-menu-toggle-label { display: none; }
  body.history-page .history-hero { min-height: auto; background-position: 58% center; }
  body.history-page .history-hero-inner { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; box-sizing: border-box; margin: 0; padding: calc(var(--history-nav-height) + 42px) 16px 34px; gap: 26px; }
  body.history-page .history-hero-text { width: 100%; max-width: none; }
  body.history-page .history-kicker { max-width: 100%; font-size: .67rem; letter-spacing: .085em; }
  body.history-page .history-hero h1 { width: 100%; max-width: none; margin: 20px 0 18px; font-size: clamp(2.08rem, 10vw, 3.15rem); line-height: .98; letter-spacing: -.065em; overflow-wrap: anywhere; }
  body.history-page .history-hero p { font-size: .96rem; line-height: 1.72; }
  body.history-page .history-hero-actions { display: grid; grid-template-columns: 1fr; gap: 12px; width: 100%; margin-top: 28px; }
  body.history-page .history-btn { width: 100%; min-height: 52px; padding: 0 18px; }
  body.history-page .history-hero-card { width: 100%; max-width: none; border-radius: 24px; transform: none; }
  body.history-page .hero-card-image { height: 260px; }
  body.history-page .history-main { width: 100%; box-sizing: border-box; padding: 60px 16px; }
  body.history-page .intro-grid,
  body.history-page .stories-grid,
  body.history-page .process-list { grid-template-columns: 1fr; }
  body.history-page .featured-story { gap: 22px; padding: 14px; border-radius: 24px; }
  body.history-page .featured-visual,
  body.history-page .featured-visual img { min-height: 300px; }
  body.history-page .section-heading h2 { font-size: clamp(1.9rem, 8vw, 2.7rem); }
  body.history-page .intro-card,
  body.history-page .process-item { padding: 22px; border-radius: 22px; }
  body.history-page .process-item { align-items: flex-start; gap: 16px; }
  body.history-page .process-item > span { flex-basis: 50px; width: 50px; height: 50px; min-width: 50px; border-radius: 14px; font-size: .92rem; }
  body.history-page .process-item h3 { margin: 2px 0 9px; font-size: 1.08rem; }
  body.history-page .process-item p { font-size: .94rem; line-height: 1.62; }
  body.history-page .story-card-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
  body.history-page .read-story-btn { min-height: 42px; }
  body.history-page .story-modal { padding: 12px; }
  body.history-page .story-modal-box { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); grid-template-columns: 1fr; border-radius: 22px; }
  body.history-page .modal-image { height: min(34vh, 290px); }
  body.history-page .story-modal .modal-content { padding: 26px 20px 24px; overflow-y: auto; }
}
@media (max-width: 360px) {
  body.history-page .history-hero-inner { padding-inline: 12px; }
  body.history-page .history-main { padding-inline: 12px; }
  body.history-page .history-hero h1 { font-size: 2rem; }
  body.history-page .history-kicker { padding: 7px 11px; font-size: .62rem; }
  body.history-page .sticky-nav .nav-links { right: calc(8px + var(--history-scrollbar-width)) !important; width: calc(100vw - var(--history-scrollbar-width) - 16px) !important; }
}

/* Modale : au-dessus du menu, sans créer une seconde barre de défilement. */
body.history-page .story-modal { z-index: var(--history-modal-z) !important; }
body.history-page .story-modal-overlay { z-index: 0; }
body.history-page .story-modal-box { position: relative; z-index: 1; }
body.history-page .story-modal .modal-content { width: auto !important; max-width: none !important; margin: 0 !important; }

/* Verrouillage temporaire de l'unique conteneur de défilement. */
body.history-page.history-scroll-lock { overflow: hidden !important; }

body.history-page .sticky-nav a:focus-visible,
body.history-page .sticky-nav button:focus-visible,
body.history-page .history-btn:focus-visible,
body.history-page .filter-btn:focus-visible,
body.history-page .read-story-btn:focus-visible,
body.history-page .modal-close:focus-visible { outline: 3px solid rgba(255,202,90,.9); outline-offset: 3px; }


/* ========================================================================== 
   V9.1 STABLE — correctif ciblé de superposition
   Aucun changement de scrollbar : le mécanisme V9 BODY reste intact.
   La seule correction est structurelle : la navigation est désormais un enfant
   direct du BODY, donc elle possède sa propre couche au-dessus du contenu.
   ========================================================================== */
body.history-page {
  isolation: isolate;
}

body.history-page > .sticky-nav {
  z-index: var(--history-nav-z) !important;
}

body.history-page > .nav-backdrop {
  z-index: var(--history-backdrop-z) !important;
}

body.history-page > .history-hero,
body.history-page > .history-main,
body.history-page > .main-footer {
  z-index: 0 !important;
}


/* ========================================================================== 
   V9.2 — CORRECTION CIBLÉE FIREFOX + LAPTOPS 13/14 POUCES
   - La racine du document est l'unique zone de scroll.
   - La navigation devient STICKY : elle reste dans le flux, donc ne couvre
     jamais la scrollbar Firefox et les sections ne peuvent pas passer dessus.
   - Aucun faux rail, aucune deuxième scrollbar, aucune marge artificielle.
   ========================================================================== */

/* Un seul scroll natif : celui du document. */
html {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--history-nav-height) + 18px);
  scrollbar-gutter: stable;
  background: #07070b;
}

html::-webkit-scrollbar { width: 11px; }
html::-webkit-scrollbar-track { background: #090a10; }
html::-webkit-scrollbar-thumb {
  background: #8f816a;
  border: 2px solid #090a10;
  border-radius: 999px;
}
html::-webkit-scrollbar-thumb:hover { background: #d7a044; }
html { scrollbar-width: thin; scrollbar-color: #8f816a #090a10; }

body.history-page {
  width: auto !important;
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
  scroll-padding-top: 0;
}

/* Le verrouillage du menu/popup s'applique à HTML, pas au BODY. */
body.history-page.menu-is-open { overflow: visible !important; }
html.history-scroll-lock { overflow: hidden !important; }

/* Supprime définitivement les traces des anciens essais de scrollbar. */
:root { --history-scrollbar-width: 0px; }
body.history-page .history-scrollbar,
body.history-page .history-scrollbar-thumb,
body.history-page #historyScrollbar,
body.history-page #historyScrollbarThumb,
body.history-page [data-history-scrollbar] { display: none !important; }

/*
   Le header reste toujours visible sans recouvrir la scrollbar.
   sticky le garde dans le flux du document et réserve sa hauteur.
*/
body.history-page > .sticky-nav {
  position: sticky !important;
  inset: auto !important;
  top: 0 !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  box-sizing: border-box;
  z-index: var(--history-nav-z) !important;
}

/* Aucun contenu ne peut entrer dans la couche de la navigation. */
body.history-page > .history-hero,
body.history-page > .history-main,
body.history-page > .main-footer {
  position: relative;
  z-index: 0 !important;
}

/* Le hero commence après la navbar sticky, sans double espace. */
body.history-page .history-hero {
  min-height: calc(100svh - var(--history-nav-height));
}
body.history-page .history-hero-inner {
  width: min(1320px, 88%) !important;
  min-height: calc(100svh - var(--history-nav-height));
  padding: clamp(54px, 5vw, 84px) 0 clamp(48px, 4.5vw, 76px) !important;
}

/* Le tiroir mobile n'a plus besoin de compenser une largeur de scrollbar. */
@media (max-width: 1280px) {
  body.history-page .sticky-nav .nav-links {
    right: 12px !important;
    width: min(390px, calc(100vw - 24px)) !important;
  }
}
@media (max-width: 360px) {
  body.history-page .sticky-nav .nav-links {
    right: 8px !important;
    width: calc(100vw - 16px) !important;
  }
}

/* 13/14 pouces : densité équilibrée, sans gros titre ni carte surdimensionnée. */
@media (min-width: 1281px) and (max-width: 1599px) {
  :root { --history-nav-height: 76px; }

  body.history-page .sticky-nav {
    padding-inline: clamp(18px, 2vw, 32px) !important;
    gap: 12px;
  }
  body.history-page .sticky-nav .nav-brand img { width: 118px; }
  body.history-page .sticky-nav .nav-links > ul { gap: 0; }
  body.history-page .sticky-nav .nav-links > ul > li > a {
    padding-inline: clamp(5px, .42vw, 8px);
    font-size: clamp(.64rem, .68vw, .72rem);
  }

  body.history-page .history-hero-inner {
    width: min(1180px, 90%) !important;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .82fr) !important;
    gap: clamp(26px, 2.8vw, 40px) !important;
    padding-top: clamp(46px, 4.5vw, 68px) !important;
    padding-bottom: clamp(44px, 4vw, 62px) !important;
  }
  body.history-page .history-hero h1 {
    max-width: 690px;
    font-size: clamp(3.25rem, 4.55vw, 4.55rem) !important;
    letter-spacing: -.07em;
  }
  body.history-page .history-hero p {
    max-width: 610px;
    font-size: clamp(.96rem, 1.18vw, 1.05rem);
    line-height: 1.72;
  }
  body.history-page .hero-card-image { height: clamp(310px, 25vw, 350px); }
  body.history-page .hero-card-content { padding: 20px; }
  body.history-page .hero-card-content h2 { font-size: 1.28rem; }
  body.history-page .history-main { width: min(1180px, 90%) !important; }
}

/* Laptops compacts / tablettes paysage : burger, mais hero à deux colonnes stable. */
@media (min-width: 1101px) and (max-width: 1280px) {
  body.history-page .history-hero-inner {
    width: min(1140px, 90%) !important;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .78fr) !important;
    gap: 26px !important;
    padding-top: 48px !important;
    padding-bottom: 54px !important;
  }
  body.history-page .history-hero h1 {
    font-size: clamp(3rem, 4.65vw, 3.85rem) !important;
    max-width: 620px;
  }
  body.history-page .hero-card-image { height: 310px; }
}

/* Mobile : la navbar sticky occupe déjà sa place, on retire l'ancien décalage fixe. */
@media (max-width: 760px) {
  body.history-page .history-hero {
    min-height: auto;
  }
  body.history-page .history-hero-inner {
    min-height: auto;
    padding: 38px 16px 34px !important;
  }
}
