/* ============================================================
   base.css — Reset, tokens, typographie globale
   La Kahute · Camping nature à Carcans
   ============================================================ */

/* --- Tokens ------------------------------------------------- */
:root {
    /* Palette */
    --color-forest:       #2C2218;   /* brun forêt foncé — textes, fond footer */
    --color-forest-mid:   #4A3828;   /* brun moyen */
    --color-sand:         #F5EFE6;   /* sable clair — fond principal */
    --color-sand-dark:    #E8DDD0;   /* sable foncé — fond secondaire */
    --color-terracotta:   #C8895A;   /* terracotta — accent principal, CTA */
    --color-terracotta-dk:#A86E42;   /* terracotta foncé — hover CTA */
    --color-gold:         #D4C4A0;   /* or paille — accents typographiques */
    --color-muted:        #8C7B6A;   /* texte secondaire */
    --color-border:       rgba(44, 34, 24, 0.12);

    /* Typographie */
    --font-serif:   'Playfair Display', Georgia, serif;
    --font-sans:    'DM Sans', system-ui, sans-serif;

    --text-xs:    0.6875rem;  /* 11px */
    --text-sm:    0.75rem;    /* 12px */
    --text-base:  0.875rem;   /* 14px */
    --text-md:    1rem;       /* 16px */
    --text-lg:    1.25rem;    /* 20px */
    --text-xl:    1.75rem;    /* 28px */
    --text-2xl:   2.25rem;    /* 36px */
    --text-3xl:   3rem;       /* 48px */
    --text-hero:  4rem;       /* 64px */

    /* Espacements */
    --space-xs:   0.5rem;
    --space-sm:   1rem;
    --space-md:   1.5rem;
    --space-lg:   2.5rem;
    --space-xl:   4rem;
    --space-2xl:  6rem;

    /* Layout */
    --container-max: 1200px;
    --container-pad: 2rem;
    --header-height: 64px;

    /* Transitions */
    --transition-fast:   150ms ease;
    --transition-base:   250ms ease;
    --transition-slow:   400ms ease;
}

/* --- Reset -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-forest);
    background-color: var(--color-sand);
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { cursor: pointer; font-family: inherit; }
address { font-style: normal; }
ul, ol { list-style: none; padding: 0; margin: 0; }

/* --- Utilitaires -------------------------------------------- */
.u-container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

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

/* --- Typographie globale ------------------------------------ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.15;
    margin: 0;
}

p { margin: 0; }

.t-eyebrow {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-muted);
}

/* --- Boutons globaux --------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    cursor: pointer;
}

.btn--primary {
    background: var(--color-terracotta);
    color: #fff;
}
.btn--primary:hover { background: var(--color-terracotta-dk); }

.btn--outline {
    background: transparent;
    color: var(--color-forest);
    border: 0.5px solid var(--color-forest);
}
.btn--outline:hover {
    background: var(--color-forest);
    color: var(--color-sand);
}

.btn--ghost-light {
    background: transparent;
    color: rgba(255,255,255,0.82);
    border: 0.5px solid rgba(255,255,255,0.35);
}
.btn--ghost-light:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --container-pad: 1.25rem;
        --text-hero: 2.5rem;
        --text-3xl: 2rem;
    }
}
/* ── Flash messages (toast fixe, ne décale pas la mise en page) ── */
.flashMessage-form__flash {
    position: fixed;
    top: calc(90px + 1rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    max-width: 90vw;
    width: 480px;
    padding: 0.9rem 2.5rem 0.9rem 1.25rem;
    font-size: var(--text-sm);
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    animation: flashMessageFlashIn 0.25s ease;
}
.flashMessage-form__flash.is-hiding {
    animation: flashMessageFlashOut 0.25s ease forwards;
}
@keyframes flashMessageFlashIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes flashMessageFlashOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}
.flashMessage-form__flash-close {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.5;
    color: inherit;
}
.flashMessage-form__flash-close:hover { opacity: 1; }
.flashMessage-form__flash--success {
    background: #f0fdf4;
    color: #166534;
    border: 0.5px solid #bbf7d0;
}
.flashMessage-form__flash--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 0.5px solid #fecaca;
}
.flashMessage-form__flash--info {
    background: #eff6ff;
    color: #1e40af;
    border: 0.5px solid #bfdbfe;
}
.flashMessage-form__flash--warning {
    background: #fffbeb;
    color: #92400e;
    border: 0.5px solid #fde68a;
}