/* ═══ TEMA CHIARO DELLE PAGINE PUBBLICHE (solo Laravel) ═══
   public.css e public-home.css sono copie identiche del legacy, che ha solo il tema scuro. Qui la
   versione chiara, con i colori chiari del resto del portale (resources/css/app.css :root):
   si attiva quando <html> non ha la classe "dark" (partials/theme-init, scelta condivisa col
   portale e col negozio in localStorage "fm-theme"). Il tema scuro NON va toccato: ogni regola
   sta sotto html:not(.dark), a parte il logo per il fondo sbagliato e l'icona del tema
   (verificato da HomeLandingTest). Si carica dopo gli altri fogli. */

/* ── Colori ── */
html:not(.dark) {
    --amber: #d4830a;              /* brand-600: l'ambra del legacy sul bianco non si legge */
    --amber-hover: #a96209;
    --amber-dim: rgba(212,131,10,0.10);
    --amber-glow: rgba(212,131,10,0.22);
    --teal: #059669;
    --teal-hover: #047857;
    --teal-dim: rgba(5,150,105,0.10);
    --teal-glow: rgba(5,150,105,0.22);
    --bg: #f6f7f9;
    --bg-card: #ffffff;
    --bg-card-alt: #fffaf0;
    --bg-card-hover: #f8fafc;
    --bg-elevated: #ffffff;
    --border: #e6e9ee;
    --border-light: #d7dce3;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-dim: #64748b;
    /* --bg-deep resta scuro: e' il colore del testo sui pulsanti ambra */
}
html:not(.dark) body { background: #f6f7f9; }
html:not(.dark) body::before { opacity: 0.015; }

/* ── Barra e pulsanti (valori scritti a mano nel legacy per il fondo scuro) ── */
html:not(.dark) .nav { background: rgba(255,255,255,0.88); }
/* Nel legacy "Accedi" prende il grigio dei link della barra (.nav-links a vince su .nav-btn): sul
   fondo scuro passa, sull'ambra piu' scura del tema chiaro no. Qui testo scuro come gli altri
   pulsanti ambra; il tema scuro resta com'e'. */
html:not(.dark) .nav-links a.nav-btn { color: var(--bg-deep); }
html:not(.dark) .btn-ghost:hover { background: rgba(15,23,42,0.03); }

/* ── Home ── */
html:not(.dark) .hero::before {
    background-image:
        linear-gradient(rgba(15,23,42,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,23,42,0.06) 1px, transparent 1px);
}
html:not(.dark) .feat:hover { box-shadow: 0 16px 48px rgba(15,23,42,0.10); }
html:not(.dark) .step-num { background: #ffffff; }
html:not(.dark) .plan-list li { border-bottom-color: var(--border); }
html:not(.dark) .plan--featured { box-shadow: 0 0 60px rgba(212,131,10,0.12); }

/* ── Accesso e registrazione ── */
html:not(.dark) .auth-card input[type="text"],
html:not(.dark) .auth-card input[type="email"],
html:not(.dark) .auth-card input[type="password"] { background: #ffffff; }
html:not(.dark) .auth-success { color: #15803d; background: rgba(22,163,74,0.08); border-color: rgba(22,163,74,0.25); }
html:not(.dark) .auth-alert { color: #b91c1c; background: rgba(220,38,38,0.06); border-color: rgba(220,38,38,0.25); }

/* ── Logo: versione col testo chiaro sul fondo scuro, col testo scuro sul fondo chiaro ── */
html.dark img.logo-for-light,
html:not(.dark) img.logo-for-dark { display: none !important; }

/* ── Icona sole/luna ── */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 6px; flex-shrink: 0;
    background: transparent; border: none; cursor: pointer;
    color: var(--text-dim); transition: color 0.25s, background 0.25s;
}
.theme-toggle:hover { color: var(--text); background: var(--amber-dim); }
.theme-toggle svg { width: 18px; height: 18px; }
html.dark .theme-toggle .icon-moon,
html:not(.dark) .theme-toggle .icon-sun { display: none; }
/* Nelle pagine di accesso non c'e' barra: l'icona sta nell'angolo in alto a destra */
.auth-theme-toggle { position: fixed; top: 16px; right: 16px; z-index: 2; }
