/* ==========================================================================
   Thème clair de l'espace client (choisi par le client, bouton soleil / lune)
   <html data-theme="light"> est posé par le serveur d'après le cookie taa_theme :
   pas de flash au chargement. Le thème sombre reste celui par défaut.
   Seules les variables changent ; les quelques couleurs fixes sont reprises en bas.
   ========================================================================== */

html[data-theme="light"] .theme-garage {
    --g-asphalt: #eceae5;      /* fond de page : béton clair */
    --g-chassis: #f6f5f2;      /* en-tête, barres */
    --g-panel: #ffffff;        /* blocs */
    --g-field: #f4f2ee;        /* champs */
    --g-line: #d5d0c6;
    --g-line-soft: #e5e1d9;
    --g-text: #1c1a17;
    --g-text-2: #47433c;
    --g-muted: #6b655b;
    --g-sand: #87652d;         /* sable du logo, foncé pour rester lisible sur blanc */
    --g-sand-dim: #b59d74;
    --g-signal: #c8180c;
    --g-signal-hi: #a51309;
    --g-signal-soft: rgba(200, 24, 12, 0.08);
    --g-ok: #1d8553;
    --g-ok-soft: rgba(29, 133, 83, 0.1);
    --g-warn: #a46700;
    --g-warn-soft: rgba(201, 133, 0, 0.12);
    --g-reflect: #121110;      /* titres et textes forts */
    --g-danger-text: #b42318;
    --g-danger-text-2: #b42318;
    --g-ok-text: #17744a;
    --g-warn-text: #8a5700;

    --g-sunken: rgba(28, 26, 23, 0.04);  /* bandeaux en creux (dates, pied de fenêtre) */
    --g-hover: rgba(28, 26, 23, 0.045);  /* survol des lignes et menus */

    --g-chart-1: #a07c3f;
    --g-chart-grid: rgba(0, 0, 0, 0.08);

    color-scheme: light;
}

/* Survols et fonds légers écrits en blanc translucide : en noir translucide sur fond clair */
html[data-theme="light"] .site-header { background: rgba(246, 245, 242, 0.94); }
html[data-theme="light"] .theme-garage ::selection { color: #fff; }

/* Ombres : plus douces sur fond clair */
html[data-theme="light"] .theme-garage .g-panel,
html[data-theme="light"] .site-garage .g-panel { box-shadow: 0 1px 2px rgba(28, 26, 23, 0.06); }

/* Bouton de thème */
.site-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: none;
    border: 1px solid var(--g-line);
    border-radius: 999px;
    background: var(--g-panel);
    color: var(--g-text-2);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.site-theme-toggle:hover { color: var(--g-sand); border-color: var(--g-sand-dim); }
.site-theme-toggle:focus-visible { outline: 2px solid var(--g-sand); outline-offset: 2px; }
/* L'icône montre le thème vers lequel on bascule */
.site-theme-toggle .fa-moon { display: none; }
html[data-theme="light"] .site-theme-toggle .fa-moon { display: inline; }
html[data-theme="light"] .site-theme-toggle .fa-sun { display: none; }

/* Prix offerts (vert vif en sombre) */
html[data-theme="light"] .theme-garage .price-offert { color: var(--g-ok-text); background: var(--g-ok-soft); }

/* Accueil : le bandeau photo reste sombre (texte clair sur la photo de nuit) */
html[data-theme="light"] .hm-hero {
    --g-panel: #22272d;
    --g-field: #111418;
    --g-line: #2f353c;
    --g-text: #ede8df;
    --g-text-2: #b8b2a7;
    --g-muted: #a39c90;
    --g-sand: #d2ba93;
    --g-sand-dim: #9c8c70;
    --g-reflect: #f3eee6;
    color: var(--g-text);
}
