/* =============================================================================
   Ma Dictée — feuille de style commune des pages légales
   =============================================================================
   Une seule source de vérité pour les pages /privacy/, /terms/ et /index.html.
   Pour modifier l'identité visuelle des pages : éditer ce fichier uniquement.

   Direction : palette Atelier (parchemin / sauge / encre chaude), identique
   à l'app iOS. Mobile-first, dark mode automatique via prefers-color-scheme.
   4 tailles typographiques au total : 28 / 19 / 16 / 13.
   ========================================================================== */

:root {
    color-scheme: light dark;

    /* ----- Palette Atelier (light) ----- */
    --bg:        #F7F2E8;   /* parchemin chaud */
    --surface:   #FBF7EE;   /* papier ivoire pour cartes */
    --border:    #E5DBC8;   /* crème, presque invisible */
    --text:      #2D2620;   /* encre chaude, jamais noir pur */
    --secondary: #6B5F52;   /* gris bois clair */
    --tertiary:  #A89D8C;   /* gris très atténué */
    --accent:    #7A8C6E;   /* sauge — couleur d'accent unique */
    --accent-bg: rgba(122, 140, 110, 0.06);
}

/* Dark mode automatique pour respecter la préférence système.
   Tons miroirs de l'app iOS pour rester reconnaissable. */
@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #1F1A14;
        --surface:   #2E2820;
        --border:    #3A322A;
        --text:      #ECE3D1;
        --secondary: #B5AB99;
        --tertiary:  #756B5C;
        --accent:    #9DAE8F;
        --accent-bg: rgba(157, 174, 143, 0.08);
    }
}

/* =============================================================================
   Reset léger + base
   ========================================================================== */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    /* Stack iOS-native avec fallback pour pages servies depuis Safari Mac/PC */
    font-family: -apple-system, BlinkMacSystemFont, system-ui,
                 "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   Layout — header + container + footer
   ========================================================================== */

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.site-header__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Bloc logo + nom de marque */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 16px;
}
.brand:hover { color: var(--accent); }

.brand__logo {
    /* Conteneur de l'image — la même taille que l'app icon dans l'app */
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--accent-bg);
    object-fit: cover;
    /* Tant que /assets/logo.svg n'est pas fourni, le contenu vide affiche
       un carré sage discret. Quand le logo SVG/PNG est ajouté, l'<img>
       prend le dessus. */
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.back-link:hover { text-decoration: underline; }

/* Conteneur principal */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 1.25rem;
    text-align: center;
    color: var(--tertiary);
    font-size: 13px;
}
.site-footer a {
    color: var(--accent);
    text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* =============================================================================
   Typography hierarchy — 4 niveaux uniquement
   ========================================================================== */

h1 {
    font-size: 28px;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: -0.01em;
}

.updated {
    color: var(--tertiary);
    font-size: 13px;
    margin: 0 0 2rem;
}

h2 {
    font-size: 19px;
    line-height: 1.35;
    font-weight: 600;
    color: var(--accent);
    margin: 2.25rem 0 0.5rem;
}

p {
    margin: 0 0 1rem;
}

strong { color: var(--text); }

a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 0.5px;
}
a:hover { text-decoration-thickness: 1px; }

ul {
    padding-left: 1.25rem;
    margin: 0 0 1rem;
}
ul li { margin-bottom: 0.4rem; }

/* =============================================================================
   Composants utilitaires
   ========================================================================== */

/* Sommaire ancres en haut de page */
.toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 0 0 2rem;
    font-size: 14px;
}
.toc ol {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.85;
}
.toc a {
    color: var(--accent);
    text-decoration: none;
}
.toc a:hover { text-decoration: underline; }

/* Encart contact discret en bas du contenu */
.contact {
    margin-top: 3rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--secondary);
    font-size: 15px;
}
.contact strong { color: var(--text); }

/* =============================================================================
   Responsive — mobile-first, ajustement desktop minimal
   ========================================================================== */

@media (min-width: 768px) {
    body { font-size: 17px; }
    h1 { font-size: 32px; }
    h2 { font-size: 21px; }
    .container { padding: 2.5rem 1.5rem 4rem; }
}

/* Reduce Motion — désactive les animations subtiles si demandé */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
