@import url('assets/fonts.css');

/* ===================================================================
   WIDES Design System
   Shared styles extracted from v9-heritage, reusable across all pages
   =================================================================== */

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

:root {
    /* Brand Colors */
    --red: #B91C1C;
    --red-dark: #991B1B;
    --red-deeper: #7F1D1D;
    --red-light: #FEF2F2;
    --red-mist: rgba(185, 28, 28, 0.08);

    /* Neutrals */
    --bg: #FBF8F8;
    --white: #FFFFFF;
    --text: #1A0A0A;
    --muted: #6B5E5E;
    --border: #EDE8E8;

    /* Dark palette */
    --dark: #1A0505;
    --dark-mid: #2D0A0A;
    --dark-warm: #3B0A0A;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(26, 5, 5, 0.06);
    --shadow: 0 6px 24px rgba(26, 5, 5, 0.09);
    --shadow-lg: 0 16px 48px rgba(26, 5, 5, 0.14);

    /* Tokens */
    --radius: 20px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --max-w: 1400px;
    --max-w-narrow: 1120px;
}

/* ===================================================================
   REDUCED MOTION
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================================================================
   BASE
   =================================================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.1;
}

a {
    color: var(--red);
    text-decoration: none;
    transition: color 0.3s var(--ease);
}

a:hover {
    color: var(--red-dark);
}

button {
    cursor: pointer;
    border: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s var(--ease);
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 3px;
}

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

/* ===================================================================
   SKIP LINK (Accessibility)
   =================================================================== */
.skip-link {
    position: absolute;
    top: -60px;
    left: 0;
    background-color: var(--red);
    color: white;
    padding: 10px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 0 0 var(--radius-xs) var(--radius-xs);
    transition: top 0.2s var(--ease);
}

.skip-link:focus {
    top: 0;
}

/* ===================================================================
   BUTTONS
   =================================================================== */
.btn-primary {
    background: var(--red);
    color: white;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s var(--ease);
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--red-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(185, 28, 28, 0.30);
}

.btn-outline {
    background: transparent;
    color: var(--red);
    padding: 14px 32px;
    border: 2px solid var(--red);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s var(--ease);
    text-decoration: none;
}

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

.btn-white {
    background: white;
    color: var(--dark);
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s var(--ease);
    text-decoration: none;
}

.btn-white:hover {
    background: var(--red-light);
    transform: translateY(-1px);
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s var(--ease);
    text-decoration: none;
}

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

.btn-light {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 10px 22px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s var(--ease);
    text-decoration: none;
}

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

.btn-dark {
    background: white;
    color: var(--dark);
    padding: 10px 24px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s var(--ease);
    text-decoration: none;
}

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

/* ===================================================================
   BADGES
   =================================================================== */
.badge-primary {
    background: var(--red);
    color: white;
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    width: fit-content;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.badge-dark {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.85);
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    width: fit-content;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.badge-pill {
    background: var(--red-light);
    color: var(--red);
    border-radius: 999px;
    padding: 4px 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

/* ===================================================================
   SECTION LAYOUT
   =================================================================== */
.section-header {
    max-width: var(--max-w);
    margin: 0 auto 3.5rem;
    text-align: center;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 36px;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 16px;
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===================================================================
   PLACEHOLDER BLOCK (for missing content)
   =================================================================== */
.placeholder-block {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 12px;
    padding: 2rem;
}

.placeholder-block .placeholder-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #92400E;
    margin-bottom: 0.75rem;
}

.placeholder-block p {
    font-size: 13px;
    color: #78350F;
    line-height: 1.6;
}

/* ===================================================================
   BREADCRUMB
   =================================================================== */
.breadcrumb {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

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

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: var(--border);
}

/* ===================================================================
   COMPACT HERO (sub-pages)
   =================================================================== */
.hero-compact {
    margin-top: 72px;
    padding: 4rem 2rem 3rem;
    background: var(--bg);
}

.hero-compact .hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}

.hero-compact h1 {
    font-size: 42px;
    margin-bottom: 1rem;
}

.hero-compact .hero-intro {
    font-size: 17px;
    color: var(--muted);
    max-width: 620px;
    line-height: 1.7;
}

@media (max-width: 640px) {
    .hero-compact {
        padding: 3rem 1.25rem 2rem;
    }

    .hero-compact h1 {
        font-size: 32px;
    }
}

/* ===================================================================
   PREV/NEXT NAVIGATION
   =================================================================== */
.prev-next {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
    border-top: 1px solid var(--border);
}

.prev-next a {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--red);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.prev-next a:hover {
    gap: 0.7rem;
    color: var(--red-dark);
}

.prev-next .prev::before {
    content: '\2190';
}

.prev-next .next::after {
    content: '\2192';
}

@media (max-width: 640px) {
    .prev-next {
        padding: 1.5rem 1.25rem 3rem;
    }
}

/* ===================================================================
   REVEAL ANIMATIONS (IntersectionObserver)
   =================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 0.7s var(--ease),
        transform 0.7s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }
.reveal-delay-7 { transition-delay: 0.56s; }
.reveal-delay-8 { transition-delay: 0.64s; }
.reveal-delay-9 { transition-delay: 0.72s; }
.reveal-delay-10 { transition-delay: 0.80s; }

/* ===================================================================
   UTILITY
   =================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}


/* ===================================================================
   NAVIGATION (moved from components/header.html)
   =================================================================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(26, 5, 5, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(185, 28, 28, 0.18);
    transition: box-shadow 0.3s var(--ease);
}

#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(26, 5, 5, 0.25);
}

.nav-logo {
    height: 38px;
    width: auto;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 1.6rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

#navbar .nav-links a {
    font-weight: 500;
    font-size: 13px;
    color: rgba(255,255,255,0.85) !important;
    transition: color 0.3s var(--ease);
    white-space: nowrap;
    letter-spacing: 0.01em;
    text-decoration: none;
}

#navbar .nav-links a:hover,
#navbar .nav-links a.active {
    color: var(--red) !important;
}

#navbar a.nav-cta {
    color: white !important;
}

#navbar a.nav-cta-outline {
    color: rgba(255,255,255,0.85) !important;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.nav-cta {
    background: var(--red);
    color: var(--white);
    padding: 0 18px;
    border-radius: var(--radius-sm);
    height: 40px;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-cta:hover {
    background: var(--red-dark);
    color: white;
}

.nav-cta-outline {
    background: transparent;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0 18px;
    border-radius: var(--radius-sm);
    height: 40px;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-cta-outline:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.5);
}

/* Mobile hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

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

/* Tablette : on resserre, mais aucune rubrique n'est retiree du menu */
@media (max-width: 1280px) {
    .nav-links {
        gap: 1.2rem;
    }
}

/* En dessous de 1024px le menu complet passe derriere le hamburger, pour
   qu'aucune rubrique ne devienne inaccessible a une largeur intermediaire. */
@media (max-width: 1024px) {
    #navbar {
        padding: 0 1.25rem;
    }

    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }
}

@media (max-width: 768px) {

    .nav-cta, .nav-cta-outline {
        font-size: 11px;
        padding: 0 14px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .nav-cta-outline {
        display: none;
    }
}


/* ===================================================================
   FOOTER (moved from components/footer.html)
   =================================================================== */
footer {
    background: var(--text);
    color: white;
    padding: 0 2.5rem 2rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--red);
}

.footer-wrapper {
    max-width: var(--max-w);
    margin: 0 auto;
    padding-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-col h3 {
    font-size: 16px;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-col p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.60);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.footer-logo {
    height: 38px;
    width: auto;
    margin-bottom: 1.25rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.9rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.60);
    font-size: 14px;
    transition: color 0.3s var(--ease);
}

.footer-col a:hover {
    color: var(--red);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.40);
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.40);
}

.footer-legal a:hover {
    color: rgba(255, 255, 255, 0.70);
}

@media (max-width: 768px) {
    footer {
        padding: 0 1.25rem 2rem;
    }

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

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

    .footer-legal {
        justify-content: center;
    }
}

/* ===================================================================
   MENU MOBILE OUVERT
   Pose par le script via la classe .is-open. Toutes les rubriques
   redeviennent accessibles, y compris celles masquees en tablette,
   et la liste defile si elle depasse la hauteur de l'ecran.
   =================================================================== */
.nav-links.is-open {
    display: flex !important;
    /* #navbar porte un backdrop-filter, ce qui en fait un bloc conteneur :
       un position:fixed serait enferme dans les 72px de la barre. On se
       positionne donc par rapport a la barre elle-meme. */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    padding: 2.5rem 1.5rem 3rem;
    margin: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Fond pleinement opaque : a 98% le contenu clair de la page
       transparaissait derriere les liens et nuisait a la lisibilite. */
    background: #1A0505;
    z-index: 998;
}

.nav-links.is-open .nav-hide-tablet {
    display: block;
}

.nav-links.is-open a {
    font-size: 16px;
    padding: 0.35rem 0;
}

.footer-pending {
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
    font-style: italic;
}

.legal-pending {
    color: var(--muted);
    font-style: italic;
}

.ct-pending {
    font-size: 15px;
    font-style: italic;
    color: var(--muted);
    padding: 1rem 1.25rem;
    border-left: 3px solid #FDE68A;
    background: #FFFBEB;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
}
