/* ==============================
   1. RESET & BOX-SIZING
   ============================== */

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

html {
    /* Base typographique */
    font-size: 100%; /* 16px par défaut */
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: "AW Conqueror Sans Light", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #2F5243; /* sapin */
    background-color: #F7F7F5;
    text-rendering: optimizeLegibility;
}

/* Supprime les marges par défaut gênantes */
h1, h2, h3, h4, h5, h6,
p,
ul, ol,
figure {
    margin: 0;
    padding: 0;
}

/* ==============================
   2. VARIABLES GLOBALES
   ============================== */

:root {
    /* Couleurs charte */
    --color-sauge:  #A9B5A8;
    --color-lichen: #638776;
    --color-sapin:  #2F5243;

    /* Neutres (à ajuster si besoin) */
    --color-bg:        #F7F7F5;
    --color-bg-alt:    #FFFFFF;
    --color-text:      #2F5243;
    --color-text-soft: #5D6B63;
    --color-border:    #D5DDD4;
    --color-error:     #B03A3A;
    --color-focus:     #638776; /* lichen, cohérent */

    /* Typo */
    --font-heading: "Times New Roman", serif;
    --font-body:    "AW Conqueror Sans Light", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Rythme vertical & tailles */
    --space-xxs: 0.25rem;
    --space-xs:  0.5rem;
    --space-sm:  0.75rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-xxl: 3rem;

    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.06);

    /* Largeurs */
    --container-width: 1120px;
}

/* ==============================
   3. TYPOGRAPHIE GÉNÉRALE
   ============================== */

/* Titres : Grand Duke, en minuscules dans le contenu HTML si possible */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--color-sapin);
    text-transform: none; /* la charte veut des minuscules, on force via le contenu */
}

/* Échelles (mobile-first) */
h1 {
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

h2 {
    font-size: 1.625rem;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

h3 {
    font-size: 1.325rem;
    line-height: 1.3;
    margin-bottom: var(--space-xs);
}

h4, h5, h6 {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

/* Paragraphes & texte courant */
p {
    margin-bottom: var(--space-md);
    color: var(--color-text-soft);
}

/* Listes */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: var(--space-md);
}

/* Texte fort / emphase */
strong {
    font-weight: 600;
}

em {
    font-style: italic;
}

/* Liens */
a {
    color: var(--color-lichen);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover,
a:focus-visible {
    color: var(--color-sapin);
    text-decoration-thickness: 0.08em;
}

/* ==============================
   4. MISE EN PAGE GLOBALE
   ============================== */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-inline: var(--space-md);
}

/* Sections génériques : utilisables sur toutes les pages */
.section {
    padding-block: var(--space-xl);
}

.section--tight {
    padding-block: var(--space-lg);
}

.section--alt {
    background-color: var(--color-bg-alt);
}

/* Image : responsive par défaut */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==============================
   5. HEADER / NAV (BASE)
   ============================== */

.site-header {
    background-color: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding-block: var(--space-sm);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.site-logo img {
    max-height: 48px;
}

.site-nav {
    display: flex;
    gap: var(--space-md);
}

.site-nav a {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

/* ==============================
   6. BOUTONS
   ============================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-body), serif;
    font-size: 0.95rem;
    text-transform: uppercase; /* charte: peut être en capitales */
    letter-spacing: 0.08em;
    font-weight: 400;
    cursor: pointer;
    background-color: var(--color-lichen);
    color: #FFFFFF;
    box-shadow: var(--shadow-soft);
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.btn:hover,
.btn:focus-visible {
    background-color: var(--color-sapin);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
    color: #FFFFFF;
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn--ghost {
    background-color: transparent;
    color: var(--color-sapin);
    border-color: var(--color-sapin);
    box-shadow: none;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
    background-color: var(--color-sapin);
    color: #FFFFFF;
}

/* ==============================
   7. FORMULAIRES (BASE)
   ============================== */

form {
    display: grid;
    gap: var(--space-md);
}

label {
    display: inline-block;
    margin-bottom: var(--space-xxs);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text);
}

input,
textarea,
select {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    background-color: #FFFFFF;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: #9BA79A;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid transparent;
    border-color: var(--color-focus);
    box-shadow: 0 0 0 2px rgba(99, 135, 118, 0.25);
}

/* Message d’erreur basique */
.form-error {
    color: var(--color-error);
    font-size: 0.85rem;
    margin-top: var(--space-xxs);
}

/* ==============================
   8. UTILITAIRES
   ============================== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Rythme vertical simple pour les blocs de texte */
.flow > * + * {
    margin-top: var(--space-sm);
}

/* Accessibilité : éléments uniquement pour les lecteurs d’écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==============================
   9. RESPONSIVE GLOBALE
   ============================== */

@media (min-width: 768px) {
    h1 {
        font-size: 2.6rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    .section {
        padding-block: var(--space-xxl);
    }
}
