/* ═══════════════════════════════════════════════════════
   1. CSS VARIABLES — Éditoriale / Raistin
   ═══════════════════════════════════════════════════════ */
:root {
    /* Theme Colors — Editorial Palette */
    --ink-black: #1a1a1a;
    --chalk-white: #ffffff;
    --parchment: #f8f6f2;
    --warm-gray: #6b6560;
    --light-gray: #e8e4df;
    --accent-red: #c0392b;
    --accent-red-hover: #a93226;
    --soft-cream: #f0ece4;
    --rule-color: #d4cfc7;

    /* Backgrounds */
    --bg-body: var(--parchment);
    --bg-card: var(--chalk-white);
    --bg-header: var(--chalk-white);
    --bg-footer: var(--ink-black);

    /* Text */
    --text-primary: var(--ink-black);
    --text-secondary: var(--warm-gray);
    --text-muted: #9a9490;
    --text-on-dark: #e8e4df;
    --text-on-dark-muted: #9a9490;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;

    /* Shadows — Flat / Editorial */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);

    /* Header */
    --header-height: 70px;

    /* Fonts — Fraunces + Source Serif 4 */
    --font-heading: 'Fraunces', serif;
    --font-body: 'Source Serif 4', serif;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* ═══════════════════════════════════════════════════════
   2. RESET & BASE
   ═══════════════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

ul, ol {
    list-style: none;
}

/* ═══════════════════════════════════════════════════════
   3. TYPOGRAPHY
   ═══════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════
   4. CONTAINER
   ═══════════════════════════════════════════════════════ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ═══════════════════════════════════════════════════════
   5. HEADER
   ═══════════════════════════════════════════════════════ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-header);
    z-index: 1000;
    border-bottom: 1px solid var(--rule-color);
    transition: box-shadow var(--transition-normal);
}

.header.is-scrolled {
    box-shadow: var(--shadow-md);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--ink-black);
    letter-spacing: -0.03em;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo:hover {
    color: var(--accent-red);
}

/* ═══════════════════════════════════════════════════════
   6. NAVIGATION
   ═══════════════════════════════════════════════════════ */
.nav-desktop {
    display: flex;
    gap: var(--space-xl);
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    padding: var(--space-sm) 0;
    position: relative;
    color: var(--text-secondary);
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--ink-black);
}

.nav-link.is-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-red);
}

@media (max-width: 992px) {
    .nav-desktop {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════
   7. BURGER MENU
   ═══════════════════════════════════════════════════════ */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 1001;
}

.burger-menu span {
    width: 24px;
    height: 2px;
    background: var(--ink-black);
    transition: var(--transition-normal);
    display: block;
}

@media (max-width: 992px) {
    .burger-menu {
        display: flex;
    }
}

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

/* ═══════════════════════════════════════════════════════
   8. MOBILE NAVIGATION
   ═══════════════════════════════════════════════════════ */
.nav-mobile {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background: var(--bg-card);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    z-index: 999;
    transition: right var(--transition-normal);
    overflow-y: auto;
    border-left: 1px solid var(--rule-color);
}

.nav-mobile.is-open {
    right: 0;
}

.nav-mobile__link {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-primary);
    font-family: var(--font-body);
    border-bottom: 1px solid var(--light-gray);
}

.nav-mobile__link:hover {
    background: var(--soft-cream);
    color: var(--accent-red);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    z-index: 998;
    transition: var(--transition-normal);
}

.nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════
   9. MAIN CONTENT
   ═══════════════════════════════════════════════════════ */
.main {
    padding-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* ═══════════════════════════════════════════════════════
   10. HERO SECTION
   ═══════════════════════════════════════════════════════ */
.hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
    text-align: center;
    background: var(--chalk-white);
    border-bottom: 1px solid var(--rule-color);
    color: white;
}

.hero__title {
    margin-bottom: var(--space-md);
    color: var(--ink-black);
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero__buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.hero__rule {
    width: 60px;
    height: 3px;
    background: var(--accent-red);
    margin: 0 auto var(--space-xl);
    border: none;
}

/* ═══════════════════════════════════════════════════════
   11. SECTIONS
   ═══════════════════════════════════════════════════════ */
.section {
    padding: var(--space-3xl) 0;
}

.section--alt {
    background: var(--chalk-white);
}

.section__title {
    text-align: center;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.section__rule {
    width: 40px;
    height: 3px;
    background: var(--accent-red);
    margin: 0 auto var(--space-2xl);
    border: none;
}

.section__description {
    text-align: center;
    max-width: 650px;
    margin: 0 auto var(--space-2xl);
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ═══════════════════════════════════════════════════════
   12. BUTTONS
   ═══════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn--primary {
    background: var(--accent-red);
    color: var(--chalk-white);
}

.btn--primary:hover {
    background: var(--accent-red-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: transparent;
    border: 2px solid var(--ink-black);
    color: var(--ink-black);
}

.btn--secondary:hover {
    background: var(--ink-black);
    color: var(--chalk-white);
}

.btn--small {
    padding: 8px 20px;
    font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════════════
   13. CARDS
   ═══════════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    border: 1px solid var(--rule-color);
    position: relative;
    transition: var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--light-gray);
}

.card__icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    line-height: 1;
}

.card h3 {
    margin-bottom: var(--space-sm);
    font-size: 1.15rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 992px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════
   14. OFFER CARDS (opérateurs)
   ═══════════════════════════════════════════════════════ */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.offer-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-xl) var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
    border: 1px solid var(--rule-color);
    position: relative;
    transition: var(--transition-normal);
}

.offer-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--light-gray);
}

.offer-card__rank {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-red);
    min-width: 40px;
    text-align: center;
    line-height: 1;
}

.offer-card__logo-wrap {
    flex-shrink: 0;
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offer-card__logo {
    width: 100px;
    height: 70px;
    object-fit: contain;
}

.offer-card__info {
    flex: 1;
    min-width: 0;
}

.offer-card__info h3 {
    margin-bottom: var(--space-xs);
    font-size: 1.25rem;
}

.offer-card__rating {
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
}

.offer-card__bonus {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-red);
    margin-bottom: var(--space-sm);
}

.offer-card__features {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    align-items: center;
}

.offer-card__feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.offer-card__feature::before {
    content: '✓';
    color: var(--accent-red);
    font-weight: 700;
}

.offer-card__buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex-shrink: 0;
    width: 100%;
}

@media (max-width: 992px) {
    .offers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .offers-grid {
        grid-template-columns: 1fr;
    }

    .offer-card__buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════
   15. FAQ SECTION
   ═══════════════════════════════════════════════════════ */
.faq {
    max-width: 800px;
    margin: 0 auto;
}

.faq__item {
    border-bottom: 1px solid var(--rule-color);
}

.faq__question {
    width: 100%;
    padding: var(--space-lg) 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    line-height: 1.4;
}

.faq__question:hover {
    color: var(--accent-red);
}

.faq__question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    transition: var(--transition-fast);
    flex-shrink: 0;
    color: var(--accent-red);
}

.faq__item.is-open .faq__question::after {
    transform: rotate(45deg);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.faq__item.is-open .faq__answer {
    max-height: 500px;
}

.faq__answer p {
    padding-bottom: var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq__answer a {
    color: var(--accent-red);
    text-decoration: underline;
}

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

/* ═══════════════════════════════════════════════════════
   16. FOOTER
   ═══════════════════════════════════════════════════════ */
.footer {
    background: var(--bg-footer);
    padding: var(--space-3xl) 0 var(--space-xl);
    color: var(--text-on-dark);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

@media (max-width: 768px) {
    .footer__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer__section h4 {
    margin-bottom: var(--space-md);
    color: var(--chalk-white);
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.footer__section p {
    color: var(--text-on-dark-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer__section ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer__section a {
    color: var(--text-on-dark-muted);
    font-size: 0.95rem;
}

.footer__section a:hover {
    color: var(--chalk-white);
}

/* Compliance Logos */
.footer__compliance {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md) var(--space-lg);
    margin-top: var(--space-lg);
    align-items: center;
    justify-items: start;
    max-width: 320px;
}

@media (max-width: 768px) {
    .footer__compliance {
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        max-width: 100%;
    }
}

.footer__compliance-logo {
    height: 50px;
    width: auto;
    max-width: 90px;
    opacity: 0.85;
    transition: var(--transition-fast);
    object-fit: contain;
}

.footer__compliance-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.footer__compliance-logo--light-bg {
    background-color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
}

.footer__bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255,255,255,0.12);
    color: var(--text-on-dark-muted);
    font-size: 0.875rem;
}

.footer__bottom p + p {
    margin-top: var(--space-xs);
}

/* ═══════════════════════════════════════════════════════
   17. DISCLAIMER
   ═══════════════════════════════════════════════════════ */
.disclaimer {
    background: var(--soft-cream);
    padding: var(--space-md) 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--rule-color);
}

.disclaimer strong {
    color: var(--accent-red);
}

/* ═══════════════════════════════════════════════════════
   18. MODALS
   ═══════════════════════════════════════════════════════ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal__content {
    background: var(--bg-card);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 420px;
    width: 90%;
    border: 1px solid var(--rule-color);
}

.modal__content h2 {
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
}

.modal__content p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.modal__buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-xl);
}

/* ═══════════════════════════════════════════════════════
   19. COOKIE BANNER
   ═══════════════════════════════════════════════════════ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: var(--space-lg) 0;
    z-index: 1500;
    transform: translateY(100%);
    transition: var(--transition-normal);
    border-top: 1px solid var(--rule-color);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.cookie-banner p {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.cookie-banner a {
    color: var(--accent-red);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════
   20. ARTICLE CARDS (pour le blog)
   ═══════════════════════════════════════════════════════ */
.article-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-normal);
    border: 1px solid var(--rule-color);
    position: relative;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-card__content {
    padding: var(--space-xl);
}

.article-card__category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-red);
    margin-bottom: var(--space-sm);
    display: inline-block;
    font-weight: 600;
}

.article-card__title {
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
    font-family: var(--font-heading);
    line-height: 1.35;
}

.article-card__excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.article-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════
   21. STARS
   ═══════════════════════════════════════════════════════ */
.stars {
    color: #ffc107;
}

/* ═══════════════════════════════════════════════════════
   22. UTILITY CLASSES
   ═══════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* ═══════════════════════════════════════════════════════
   23. SCROLLBAR
   ═══════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--warm-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ink-black);
}

/* ═══════════════════════════════════════════════════════
   24. RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .hero {
        padding: var(--space-2xl) 0;
    }

    .section {
        padding: var(--space-2xl) 0;
    }
}

@media (max-width: 576px) {
    .hero__buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .modal__buttons {
        flex-direction: column;
    }
}