/* --- Polices locales --- */
@font-face {
    font-family: 'Lato';
    src: url('../assets/fonts/lato/Lato-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../assets/fonts/lato/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../assets/fonts/lato/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../assets/fonts/playfair-display/Playfair_Display/static/PlayfairDisplay-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../assets/fonts/playfair-display/Playfair_Display/static/PlayfairDisplay-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../assets/fonts/playfair-display/Playfair_Display/static/PlayfairDisplay-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* --- Variables & Reset --- */
:root {
    color-scheme: only light;

    --primary-color: #909d71;
    --primary-color-hover: #7a8a5f;
    /* Vert Sauge élégant / Nature */
    --secondary-color: #4a4d42;
    /* Gris foncé teinté primary (texte) */

    /* Neutres teintés, pré-calculés pour rester compatibles Opera/Brave. */
    --neutral-white: #fbfcf9;
    --neutral-light: #f5f5f2;
    --neutral-gray-100: #eeeeeb;
    --neutral-gray-200: #e3e5de;
    --neutral-gray-300: #d8dbd2;
    --neutral-gray-400: #9c9f98;
    --neutral-gray-500: #787b72;
    --neutral-gray-600: #65675f;
    --neutral-gray-700: #595b53;
    --neutral-dark: #34352f;
    --neutral-on-dark: #fbfbf9;

    --bg-light: #f3f4f1;
    --bg-white: var(--neutral-white);
    --bg-dark: var(--neutral-dark);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --transition: all 0.3s ease;

    /* Aliases for compatibility */
    --color-primary: var(--primary-color);
    --color-primary-light: #b8c5a1;
    /* Calculated light version */
    --color-text: var(--secondary-color);
    --color-background: var(--bg-light);
    --color-secondary-light: #f0f4e8;
    /* Light sage background */
    /* Breakpoints responsive (768 = mobile, 1024 = tablette) */
    --breakpoint-mobile: 768px;
    --breakpoint-tablet: 1024px;

    --btn-height-lg: 44px;
    --btn-height-sm: 32px;
    --padding-lg: 32px;
    --padding-sm: 16px;
    --navbar-height: 4.625rem;   /* ~74px */
    --promo-banner-height: 2.8rem;
    /* Padding fluide : 3.75rem (mobile) → 15rem (grand écran) selon la largeur */
    --section-padding: clamp(3.75rem, 12vw + 2rem, 12rem) 0;
    --section-padding-mobile: 3.75rem 0;
    --container-padding-x: 1.25rem;
    --border-radius-sm: 16px;
    --border-radius: 22px;
    --border-radius-lg: 38px;
    --border-radius-xlg: 48px;
    --border-subtle: 1px solid rgba(74, 77, 66, 0.08);
    --shadow-sm: 0 0.125rem 0.25rem rgba(52, 53, 47, 0.05);
    --shadow-md: 0 0.25rem 0.375rem rgba(52, 53, 47, 0.1);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-modal: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    --shadow-modal-strong: 0 20px 60px rgba(0, 0, 0, 0.2);
    --shadow-drawer: -4px 0 24px rgba(0, 0, 0, 0.15);
    --shadow-elevated: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-auth-card: 0 1rem 2rem rgba(0, 0, 0, 0.1);

    --overlay-bg: rgba(0, 0, 0, 0.4);
    --overlay-backdrop: rgba(61, 56, 40, 0.35);

    /* Espacements (gaps, marges cohérentes) */
    --gap-xs: 0.25rem;
    --gap-sm: 0.5rem;
    --gap-md: 0.75rem;
    --gap-lg: 1rem;
    --gap-xl: 1.5rem;
    --gap-2xl: 2rem;
    --gap-3xl: 2.5rem;
    --gap-4xl: 3.125rem;
    --gap-5xl: 5rem;

    /* Messages & feedback */
    --color-error: #c62828;
    --color-error-bg: #ffebee;
    --color-success: #2e7d32;
    --color-success-bg: #e8f5e9;
    --color-info: #1565c0;
    --color-info-bg: #e3f2fd;

    /* Texte */
    --color-text-dark: #3d3828;

    /* Typographie (tailles) */
    --text-xs: 0.85rem;
    --text-sm: 0.9rem;
    --text-base: 1rem;
    --text-lg: 1.1rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --heading-sm: 1.25rem;
    --heading-md: 1.5rem;
    --heading-lg: 2rem;
    --heading-xl: 2.5rem;
    --heading-2xl: 2.2rem;

    /* Typographie fluide (transition entre 320px et 1400px) */
    --fluid-heading-hero: clamp(1.5rem, 4vw + 1.25rem, 3.5rem);
    --fluid-heading-section: clamp(1.5rem, 2.5vw + 1rem, 2.5rem);
    --fluid-heading-card: clamp(1.25rem, 2vw + 0.9rem, 2.2rem);
    --fluid-text-xl: clamp(1rem, 1.2vw + 0.7rem, 1.25rem);
    --fluid-text-lg: clamp(0.95rem, 1vw + 0.65rem, 1.1rem);

    /* Boutons danger */
    --color-danger: #c62828;
    --color-danger-hover: #b71c1c;

    /* Carte cadeau (thème distinct) */
    --primary-gift-color: #2c3e50;
    --accent-gift-color: #c5a059;

    /* Formulaires */
    --input-border: 1px solid var(--neutral-gray-300);
    --input-border-radius: var(--border-radius);
    --input-padding: var(--padding-sm) var(--padding-sm);
    --input-focus-ring: 0 0 0 2px rgba(144, 157, 113, 0.2);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23666' d='M5 6.5L1 2.5h8z'/%3E%3C/svg%3E");
}

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

body {
    font-family: var(--font-body);
    color: var(--secondary-color);
    line-height: 1.6;
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}


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

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

h2 {
    text-align: center;
    font-family: var(--font-heading);
    font-size: var(--fluid-heading-section);
    color: var(--secondary-color);
    margin-bottom: 4rem;
}

p {
    text-wrap: pretty;
}

/* --- Icônes SVG --- */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: middle;
}

.icon svg {
    width: 100%;
    height: 100%;
}

.icon use {
    fill: currentColor;
}

.icon-opacity { opacity: 0.2; }

.icon-spin {
    animation: icon-spin 1s linear infinite;
}

@keyframes icon-spin {
    to { transform: rotate(360deg); }
}

/* --- Bandeau promotionnel --- */
.promo-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1500;
    background: var(--primary-color);
    color: var(--neutral-on-dark);
    min-height: var(--promo-banner-height);
    padding: var(--padding-sm) var(--padding-sm);
    font-size: 1rem;
    text-align: center;
    box-shadow: var(--shadow-elevated);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

.promo-banner.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    animation: promo-banner-appear 0.45s ease-out;
}

.promo-banner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.promo-banner-content {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    row-gap: 0.4rem;
    max-width: 100%;
    text-align: center;
}

.promo-banner-icon {
    flex-shrink: 0;
    font-size: 1.15rem;
    line-height: 1;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.22));
    animation: promo-icon-pulse 2.2s ease-in-out 2;
}

.promo-banner-text-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.35rem 0.45rem;
}

.promo-banner-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.92;
}

.promo-banner-text {
    flex: 0 1 auto;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.promo-banner .promo-banner-more {
    flex-shrink: 0;
    height: auto;
    min-height: 2rem;
    margin: 0;
    padding: 0.28rem 0.8rem;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.25;
    color: var(--secondary-color);
    text-decoration: none;
    background: var(--neutral-on-dark);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    vertical-align: middle;
    animation: promo-cta-pulse 2.4s ease-in-out 1;
}

.promo-banner .promo-banner-more:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.promo-banner .promo-banner-more:focus-visible {
    outline: 2px solid var(--neutral-on-dark);
    outline-offset: 2px;
}

@keyframes promo-banner-appear {
    0% {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes promo-icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes promo-cta-pulse {
    0%, 100% { transform: scale(1); }
    35% { transform: scale(1.04); }
    65% { transform: scale(1.01); }
}

@media (prefers-reduced-motion: reduce) {
    .promo-banner.is-visible,
    .promo-banner-icon,
    .promo-banner .promo-banner-more {
        animation: none !important;
    }
}

.promo-pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    box-sizing: border-box;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.promo-pdf-modal.is-open {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    overflow: hidden;
}

.promo-pdf-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.promo-pdf-modal__panel {
    position: relative;
    z-index: 100;
    box-sizing: border-box;
    width: calc(100vw - 0.8rem);
    width: calc(100dvw - 0.8rem);
    /* svh = petite hauteur visible (barres navigateur mobiles) ; évite de dépasser en hauteur */
    height: calc(100vh - 0.8rem);
    max-height: calc(100vh - 0.8rem);
    height: calc(100svh - 0.8rem);
    max-height: calc(100svh - 0.8rem);
    min-height: 0;
    background: #2a2a2a;
    border-radius: min(10px, 0.6vw);
    box-shadow: var(--shadow-elevated);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.promo-pdf-modal__close {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 200;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.65rem;
    line-height: 1;
    color: var(--neutral-on-dark);
    background: rgba(0, 0, 0, 0.55);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.promo-pdf-modal__close:hover {
    background: rgba(0, 0, 0, 0.72);
    color: var(--neutral-on-dark);
}

.promo-pdf-modal__frame {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    /* Avec flex column : empêche l’iframe d’étirer le panneau au-delà du max-height */
    height: 0;
    border: 0;
    margin: 0;
    display: block;
    background: #525252;
}

body.has-promo-banner {
    padding-top: var(--promo-banner-height);
}

body.has-promo-banner .navbar {
    top: var(--promo-banner-height);
}

body.has-promo-banner .hero {
    height: calc(100vh - var(--navbar-height) - var(--promo-banner-height));
}
