/* === IMPORTS DES COMPOSANTS === */
@import url('./templates/layouts/header.css');
@import url('./templates/layouts/footer.css');
@import url('./templates/components/buttons.css');
@import url('./templates/components/cremerie-card.css');
@import url('./templates/components/shop-filters.css');
@import url('./templates/components/shop-review-form.css');
@import url('./templates/pages/shop-menu.css');
@import url('./templates/pages/shop-detail.css');



/* === RESET GLOBAL === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

@font-face {
    font-family: Fraunces;
    src: url('../assets/fonts/Fraunces[SOFT\,WONK\,opsz\,wght].woff2')
        format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('../assets/fonts/BricolageGrotesque-VariableFont_opsz\,wdth\,wght.ttf')
        format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Satoshi;
    src: url('../assets/fonts/Satoshi-Variable.ttf') format('truetype');
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* ------------------- */

    /* ====== Fonts ====== */

    /* ------------------- */

    /* ---> HEADINGS (Valeurs Mobile par défaut) <--- */
    --font-h1: 'Fraunces', arial, sans-serif;
    --font-h1-weight: 800;
    --font-h1-size: 2.25rem;
    --font-heading: 'Bricolage Grotesque', arial, sans-serif;
    --font-heading-weight: 700;
    --font-heading-h2-size: 1.625rem;
    --font-heading-h3-size: 1.375rem;
    --font-heading-h4-size: 1.25rem;
    --font-heading-h5-size: 1.125rem;
    --font-heading-h6-size: 1rem;

    /* ---> BODY & UI (Mobile par défaut) <--- */
    --font-body: 'Satoshi', arial, sans-serif;

    /* Large Text */
    --font-body-large-size: 1.125rem;
    --font-body-large-weight: 400;

    /* Main Text */
    --font-body-main-size: 1.1rem;
    --font-body-main-weight: 400;
    --font-body-line-height: 1.5;

    /* Small Text & Field */
    --font-body-small-size: 1rem;
    --font-body-small-weight: 400;

    /* UI: Form Label, Nav & Link, Confirmation & Error */
    --font-ui-size: 1rem;
    --font-ui-weight: 500;

    /* Button */
    --font-button-size: 1rem;
    --font-button-weight: 700;

    /* --------------------------- */

    /* ====== Color Palette ====== */

    /* --------------------------- */

    /* ---> Light Mode <--- */
    --light-primary-forest: #285744; /* 1. Couleur principale : Vert forêt */
    --light-secondary-sage: #dce6ce; /* 2. Couleur secondaire : Sauge */
    --light-bg-vanilla: #f5f2e8; /* 3. Fond de page : Vanille */
    --light-surface-cream: #fffdf7; /* 4. Cartes & formulaires : Crème */
    --light-text-darkpine: #173127; /* 5. Couleur du texte : Pin foncé */
    --light-danger-brick: #a02c30; /* 6. Erreurs et suppression : Rouge brique */

    /* ---> Dark Mode <--- */
    --dark-primary-pistachio: #c6e5a7; /* 1. Couleur principale : Pistache */
    --dark-secondary-moss: #314c3c; /* 2. Couleur secondaire : Vert mousse */
    --dark-bg-pine: #17261f; /* 3. Fond de page : Vert pin */
    --dark-surface-darkmoss: #25382e; /* 4. Cartes & formulaires : Mousse foncée */
    --dark-text-vanilla: #f5f2e8; /* 5. Couleur du texte : Vanille */
    --dark-danger-coral: #ffb4ab; /* 6. Erreurs et suppression : Corail doux */

    /* ---> Active Var <--- */
    --color-primary: var(--light-primary-forest);
    --color-on-primary: var(--light-surface-cream);
    --color-secondary: var(--light-secondary-sage);
    --color-bg: var(--light-bg-vanilla);
    --color-surface: var(--light-surface-cream);
    --color-text: var(--light-text-darkpine);
    --color-danger: var(--light-danger-brick);
    --color-on-danger: var(--light-surface-cream);

    /* --------------------------- */

    /* ====== Spacing (4px) ====== */

    /* --------------------------- */
    --space-1: 0.25rem; /* 4px : Icône + texte, micro-ajustements */
    --space-2: 0.5rem; /* 8px : Label + input, gouttière mobile */
    --space-4: 1rem; /* 16px : Standard entre composants */
    --space-6: 1.5rem; /* 24px : Sous-sections, marge après titres */
    --space-8: 2rem; /* 32px : Entre blocs et contenu, gouttière desktop 1280px */
    --space-12: 3rem; /* 48px : Séparation sections principales */
    --space-16: 4rem; /* 64px : Marges de page, gouttière desktop 1024px */
    --space-24: 6rem; /* 96px : Espace héro / intro */
}

/* === VERSION DESKTOP === */
@media (width >= 768px) {
    :root {
        --font-h1-size: 3.5rem;
        --font-heading-h2-size: 2rem;
        --font-heading-h3-size: 1.5rem;
        --font-body-large-size: 1.25rem;
    }
}

/* Bascule automatique en Mode Sombre */
[data-theme='dark'] {
    --color-primary: var(--dark-primary-pistachio);
    --color-on-primary: var(--dark-bg-pine);
    --color-secondary: var(--dark-secondary-moss);
    --color-bg: var(--dark-bg-pine);
    --color-surface: var(--dark-surface-darkmoss);
    --color-text: var(--dark-text-vanilla);
    --color-danger: var(--dark-danger-coral);
    --color-on-danger: var(--dark-bg-pine);
}

/* === BASE & CORPS DE TEXTE === */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--font-body-main-size);
    font-weight: var(--font-body-main-weight);
    line-height: var(--font-body-line-height);
    background-color: var(--color-bg);
    color: var(--color-text);
}

/* === TITRES (H1 à H6) === */
h1 {
    font-family: var(--font-h1);
    font-size: var(--font-h1-size);
    font-weight: var(--font-h1-weight);
    line-height: 1.15;
}

h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-heading-weight);
    line-height: 1.25;
}

h2 {
    font-size: var(--font-heading-h2-size);
}

h3 {
    font-size: var(--font-heading-h3-size);
}

h4 {
    font-size: var(--font-heading-h4-size);
}

h5 {
    font-size: var(--font-heading-h5-size);
}

h6 {
    font-size: var(--font-heading-h6-size);
}

/* === VARIANTES DE TEXTE === */
.text-large {
    font-size: var(--font-body-large-size);
    font-weight: var(--font-body-large-weight);
}

.text-small,
input,
textarea,
select {
    font-family: var(--font-body);
    font-size: var(--font-body-small-size);
    font-weight: var(--font-body-small-weight);
}

/* === ÉLÉMENTS D'INTERFACE (UI) === */
label,
nav a,
.link,
.message-status {
    font-size: var(--font-ui-size);
    font-weight: var(--font-ui-weight);
}

/* === BOUTONS === */

main {
    padding: var(--space-4);
    flex: 1;
}

img {
    border: none;
    display: block; /* Enlève aussi le gap vertical */
}
