/* ============================================================
   DUN RAMONAGE-FUMISTERIE — theme.css
   Fondations : palette, reset, typographie, utilitaires, animations.
   Palette « Bois · Braise · Cendre » issue de la maquette.
   ============================================================ */

/* ══════════ VARIABLES ══════════ */
:root {
    /* Couleurs de base */
    --charcoal: #16110E;   /* chêne brûlé, presque noir  */
    --soot:     #241C17;   /* cendre froide               */
    --soot-2:   #32261F;
    --ember:    #C1622E;   /* braise incandescente (accent) */
    --ember-lt: #E08B4E;
    --copper:   #A87B4E;   /* cuivre patiné (accent 2)    */
    --oak:      #C9B195;   /* bois clair, chaleureux      */
    --bone:     #EDE6DB;   /* os / papier ancien          */
    --bone-dim: #A99B8A;
    --line:     rgba(201, 177, 149, .16);
    --placeholder: #5A4C41;

    /* Couleurs sémantiques (états) */
    --success: #5B8C5A;
    --error:   #C1622E;
    --warning: #E08B4E;
    --info:    #A87B4E;

    /* Typographie */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans:  'Jost', system-ui, -apple-system, sans-serif;

    /* Rythme & mesures */
    --wrap-max: 1300px;
    --wrap-pad: 48px;
    --radius: 0px;              /* design « éditorial », angles nets */
    --transition: .35s cubic-bezier(.2, .8, .2, 1);

    /* Élévations */
    --shadow-ember: 0 10px 40px rgba(193, 98, 46, .4);
    --z-nav: 100;
    --z-fab: 200;
    --z-modal: 1000;
    --z-toast: 1100;
    --z-loader: 1200;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--charcoal);
    color: var(--bone);
    font-size: 16px;
    line-height: 1.75;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.01em;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

/* Accessibilité : focus visible clavier */
:focus-visible {
    outline: 2px solid var(--ember-lt);
    outline-offset: 3px;
}

/* ══════════ UTILITAIRES ══════════ */
.wrap {
    max-width: var(--wrap-max);
    margin: 0 auto;
    padding: 0 var(--wrap-pad);
    width: 100%;
}

/* Libellé « œil-de-bœuf » au-dessus des titres */
.eyebrow {
    font-family: var(--font-sans);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .34em;
    text-transform: uppercase;
    color: var(--ember);
    display: flex;
    align-items: center;
    gap: 14px;
}
.eyebrow::before {
    content: '';
    width: 34px;
    height: 1px;
    background: var(--ember);
}
.eyebrow.center { justify-content: center; }

/* Titres de section */
.section { padding: 140px 0; }
.section-head { max-width: 700px; margin-bottom: 80px; }
.section-head h2 {
    font-size: clamp(2.6rem, 5.5vw, 4.3rem);
    color: var(--bone);
    margin: 22px 0 26px;
    font-weight: 300;
}
.section-head h2 i { font-style: italic; color: var(--ember-lt); }
.section-head p { color: var(--bone-dim); font-size: 1.05rem; font-weight: 300; }
.section--soot { background: var(--soot); }
/* Première section d'une page intérieure : dégage la navigation fixe */
.section--first { padding-top: 170px; }
@media (max-width: 1000px) { .section--first { padding-top: 130px; } }

/* Helpers divers */
.text-ember { color: var(--ember-lt); }
.text-dim   { color: var(--bone-dim); }
.italic     { font-style: italic; }
.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;
}

/* ══════════ ANIMATIONS ══════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Révélation au défilement (piloté par main.js) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Respect des préférences de réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}

/* ══════════ RESPONSIVE (fondations) ══════════ */
@media (max-width: 1000px) {
    :root { --wrap-pad: 24px; }
    .section { padding: 80px 0; }
    .section-head { margin-bottom: 48px; }
}
