/* build-id: OPTIRESTO-ORIG-4a6270f9dc1e */
/* ==========================================
   MODE SOMBRE
   Surcharge des classes Tailwind déjà utilisées dans l'app
   (index.html + static/js/*.js) sous le scope html.dark.
   ========================================== */

html.dark {
    color-scheme: dark;
}

/* Couleur de texte par défaut du body (text-gray-800), héritée par tous les
   champs de formulaire qui n'ont pas de classe text-* explicite */
html.dark body { color: #f1f5f9 !important; }
html.dark .text-gray-800 { color: #f1f5f9 !important; }

/* ---------- Étiquettes de réservation sur le plan de salle ----------
   Ces couleurs pleines (sky/indigo/amber-600) sont pensées pour un fond clair ;
   en mode sombre elles sont adoucies pour ne plus « flasher » sur le fond navy. */
html.dark .bg-sky-600 { background-color: #075985 !important; }
html.dark .bg-indigo-600 { background-color: #3730a3 !important; }
html.dark .bg-amber-600 { background-color: #92400e !important; }

/* ---------- Structure neutre (slate) ---------- */
html.dark .bg-white { background-color: #1e293b !important; }
html.dark .bg-slate-50 { background-color: #0f172a !important; }
html.dark .bg-slate-100 { background-color: #1e293b !important; }
html.dark .bg-slate-200 { background-color: #334155 !important; }
html.dark .bg-slate-400 { background-color: #475569 !important; }
html.dark .bg-slate-50\/50 { background-color: #0f172a80 !important; }
html.dark .bg-blue-50\/50 { background-color: #1e3a8a4d !important; }

html.dark .border-slate-100 { border-color: #1e293b !important; }
html.dark .border-slate-200 { border-color: #334155 !important; }
html.dark .border-slate-300 { border-color: #475569 !important; }
html.dark .border-slate-500 { border-color: #64748b !important; }
html.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]) { border-color: #334155 !important; }

html.dark .text-slate-500 { color: #94a3b8 !important; }
html.dark .text-slate-600 { color: #cbd5e1 !important; }
html.dark .text-slate-700 { color: #e2e8f0 !important; }
html.dark .text-slate-800 { color: #f1f5f9 !important; }

html.dark .hover\:bg-slate-50:hover { background-color: #334155 !important; }
html.dark .hover\:bg-slate-100:hover { background-color: #334155 !important; }
html.dark .hover\:bg-slate-200:hover { background-color: #475569 !important; }
html.dark .hover\:text-slate-600:hover { color: #e2e8f0 !important; }
html.dark .hover\:text-slate-800:hover { color: #f8fafc !important; }

/* Grille de fond du plan de salle / éditeur (radial-gradient de points) */
html.dark [class*="bg-\[radial-gradient"] { background-image: radial-gradient(#334155 1px, transparent 1px) !important; }

/* ---------- Bleu ---------- */
html.dark .bg-blue-50 { background-color: rgba(37, 99, 235, 0.15) !important; }
html.dark .bg-blue-100 { background-color: rgba(37, 99, 235, 0.22) !important; }
html.dark .bg-blue-200 { background-color: rgba(37, 99, 235, 0.3) !important; }
html.dark .bg-blue-50\/50 { background-color: rgba(37, 99, 235, 0.1) !important; }
html.dark .border-blue-100 { border-color: #1e3a8a !important; }
html.dark .border-blue-200 { border-color: #1e40af !important; }
html.dark .border-blue-300 { border-color: #1d4ed8 !important; }
html.dark .border-blue-400 { border-color: #2563eb !important; }
html.dark .text-blue-600 { color: #60a5fa !important; }
html.dark .text-blue-700 { color: #93c5fd !important; }
html.dark .text-blue-800 { color: #bfdbfe !important; }
html.dark .text-blue-900 { color: #dbeafe !important; }
html.dark .hover\:bg-blue-100:hover { background-color: rgba(37, 99, 235, 0.3) !important; }
html.dark .hover\:bg-blue-200:hover { background-color: rgba(37, 99, 235, 0.38) !important; }
html.dark .hover\:text-blue-900:hover { color: #dbeafe !important; }

/* ---------- Indigo ---------- */
html.dark .bg-indigo-50 { background-color: rgba(79, 70, 229, 0.18) !important; }
html.dark .bg-indigo-100 { background-color: rgba(79, 70, 229, 0.26) !important; }
html.dark .border-indigo-300 { border-color: #4338ca !important; }
html.dark .text-indigo-600 { color: #a5b4fc !important; }
html.dark .text-indigo-800 { color: #c7d2fe !important; }
html.dark .text-indigo-900 { color: #e0e7ff !important; }
html.dark .hover\:bg-indigo-100:hover { background-color: rgba(79, 70, 229, 0.34) !important; }

/* ---------- Purple ---------- */
html.dark .bg-purple-50 { background-color: rgba(147, 51, 234, 0.15) !important; }
html.dark .bg-purple-100 { background-color: rgba(147, 51, 234, 0.22) !important; }
html.dark .border-purple-200 { border-color: #6b21a8 !important; }
html.dark .border-purple-500 { border-color: #9333ea !important; }
html.dark .border-purple-700 { border-color: #7e22ce !important; }
html.dark .ring-purple-200 { --tw-ring-color: rgba(147, 51, 234, 0.35) !important; }
html.dark .text-purple-300 { color: #d8b4fe !important; }
html.dark .text-purple-600 { color: #c084fc !important; }
html.dark .text-purple-700 { color: #d8b4fe !important; }
html.dark .text-purple-800 { color: #e9d5ff !important; }
html.dark .hover\:bg-purple-100:hover { background-color: rgba(147, 51, 234, 0.3) !important; }

/* ---------- Amber ---------- */
html.dark .bg-amber-50 { background-color: rgba(217, 119, 6, 0.15) !important; }
html.dark .bg-amber-100 { background-color: rgba(217, 119, 6, 0.22) !important; }
html.dark .bg-amber-200 { background-color: rgba(217, 119, 6, 0.3) !important; }
html.dark .border-amber-200 { border-color: #92400e !important; }
html.dark .border-amber-300 { border-color: #b45309 !important; }
html.dark .border-amber-400 { border-color: #d97706 !important; }
html.dark .ring-amber-500 { --tw-ring-color: rgba(245, 158, 11, 0.5) !important; }
html.dark .text-amber-500 { color: #fbbf24 !important; }
html.dark .text-amber-600 { color: #fbbf24 !important; }
html.dark .text-amber-700 { color: #fcd34d !important; }
html.dark .text-amber-800 { color: #fde68a !important; }
html.dark .text-amber-900 { color: #fef3c7 !important; }
html.dark .hover\:bg-amber-100:hover { background-color: rgba(217, 119, 6, 0.3) !important; }
html.dark .hover\:bg-amber-200:hover { background-color: rgba(217, 119, 6, 0.38) !important; }
html.dark .hover\:text-amber-900:hover { color: #fef3c7 !important; }
html.dark .hover\:bg-yellow-100:hover { background-color: rgba(217, 119, 6, 0.3) !important; }
html.dark .bg-yellow-50 { background-color: rgba(217, 119, 6, 0.15) !important; }
html.dark .border-yellow-200 { border-color: #92400e !important; }
html.dark .text-yellow-600 { color: #fbbf24 !important; }
html.dark .text-yellow-800 { color: #fde68a !important; }

/* ---------- Rouge ---------- */
html.dark .bg-red-50 { background-color: rgba(220, 38, 38, 0.15) !important; }
html.dark .bg-red-100 { background-color: rgba(220, 38, 38, 0.22) !important; }
html.dark .bg-red-900 { background-color: #450a0a !important; }
html.dark .border-red-100 { border-color: #7f1d1d !important; }
html.dark .border-red-200 { border-color: #991b1b !important; }
html.dark .border-red-300 { border-color: #b91c1c !important; }
html.dark .text-red-400 { color: #f87171 !important; }
html.dark .text-red-500 { color: #f87171 !important; }
html.dark .text-red-600 { color: #fca5a5 !important; }
html.dark .text-red-700 { color: #fca5a5 !important; }
html.dark .text-red-800 { color: #fecaca !important; }
html.dark .hover\:bg-red-50:hover { background-color: rgba(220, 38, 38, 0.25) !important; }
html.dark .hover\:bg-red-100:hover { background-color: rgba(220, 38, 38, 0.32) !important; }
html.dark .hover\:text-red-600:hover { color: #fca5a5 !important; }
html.dark .hover\:text-red-700:hover { color: #fca5a5 !important; }

/* ---------- Rose ---------- */
html.dark .bg-rose-100 { background-color: rgba(225, 29, 72, 0.2) !important; }
html.dark .bg-rose-200 { background-color: rgba(225, 29, 72, 0.3) !important; }
html.dark .border-rose-400 { border-color: #e11d48 !important; }
html.dark .text-rose-600 { color: #fb7185 !important; }
html.dark .text-rose-950 { color: #ffe4e6 !important; }

/* ---------- Vert / Emerald ---------- */
html.dark .bg-green-50 { background-color: rgba(22, 163, 74, 0.15) !important; }
html.dark .bg-green-100 { background-color: rgba(22, 163, 74, 0.22) !important; }
html.dark .border-green-200 { border-color: #166534 !important; }
html.dark .border-green-400 { border-color: #22c55e !important; }
html.dark .border-green-500 { border-color: #22c55e !important; }
html.dark .ring-green-400 { --tw-ring-color: rgba(74, 222, 128, 0.5) !important; }
html.dark .ring-green-500 { --tw-ring-color: rgba(34, 197, 94, 0.5) !important; }
html.dark .text-green-600 { color: #4ade80 !important; }
html.dark .text-green-700 { color: #86efac !important; }
html.dark .text-green-800 { color: #bbf7d0 !important; }
html.dark .text-emerald-600 { color: #34d399 !important; }
html.dark .text-emerald-700 { color: #6ee7b7 !important; }
html.dark .text-emerald-800 { color: #a7f3d0 !important; }
html.dark .text-emerald-900 { color: #d1fae5 !important; }
html.dark .bg-emerald-50 { background-color: rgba(5, 150, 105, 0.14) !important; }
html.dark .bg-emerald-100 { background-color: rgba(5, 150, 105, 0.24) !important; }
html.dark .border-emerald-200 { border-color: #065f46 !important; }
html.dark .border-emerald-300 { border-color: #047857 !important; }
html.dark .border-emerald-400 { border-color: #10b981 !important; }
html.dark .hover\:bg-emerald-50:hover { background-color: rgba(5, 150, 105, 0.22) !important; }
html.dark .hover\:bg-emerald-100:hover { background-color: rgba(5, 150, 105, 0.3) !important; }
html.dark .hover\:bg-green-100:hover { background-color: rgba(22, 163, 74, 0.3) !important; }

/* ---------- Orange ---------- */
html.dark .bg-orange-50 { background-color: rgba(234, 88, 12, 0.15) !important; }
html.dark .border-orange-200 { border-color: #9a3412 !important; }
html.dark .text-orange-600 { color: #fb923c !important; }
html.dark .text-orange-700 { color: #fdba74 !important; }
html.dark .text-orange-800 { color: #fed7aa !important; }
html.dark .hover\:bg-orange-50:hover { background-color: rgba(234, 88, 12, 0.25) !important; }

/* ---------- Boutons/ badges pleins & ring de sélection ----------
   (bleu/violet/ambre/rouge -600/-700, bg-sky-600, bg-indigo-600, ring-slate-900...
   restent lisibles tels quels sur fond sombre, aucune surcharge nécessaire) */

/* ---------- Login screen : la carte blanche du form devient une carte sombre ---------- */
html.dark #ecran-login .bg-white { background-color: #1e293b !important; }

/* ---------- Modals : overlay reste identique (déjà semi-transparent slate-900) ---------- */

/* ---------- Modale CGU/CGV : contenu légal injecté avec des couleurs pensées pour un fond
   clair (voir CGV_CONTENU_DEFAUT dans main.py) -> on fige cette modale en mode clair, sinon
   le texte (couleur foncée) devient illisible sur le fond assombri par la règle .bg-white
   ci-dessus (texte et fond de la même couleur). ---------- */
html.dark #modal-cgv .bg-white { background-color: #ffffff !important; }
html.dark #modal-cgv .text-slate-800 { color: #1e293b !important; }
html.dark #modal-cgv .text-slate-700 { color: #334155 !important; }
html.dark #modal-cgv .text-slate-500 { color: #64748b !important; }
html.dark #modal-cgv .border-slate-200 { border-color: #e2e8f0 !important; }

/* ---------- Suggestions d'adresse (autocomplétion) : même souci de contraste que la modale CGU
   -> fond et texte figés en mode clair, sinon le survol (bg-blue-50, presque blanc) rendait le
   texte illisible (lui aussi éclairci par les règles .text-slate-700 ci-dessus). ---------- */
html.dark #ent-adresse-suggestions.bg-white { background-color: #ffffff !important; }
html.dark #ent-adresse-suggestions .text-slate-700 { color: #334155 !important; }
html.dark #ent-adresse-suggestions .border-slate-100 { border-color: #f1f5f9 !important; }
html.dark #ent-adresse-suggestions div:hover { background-color: #eff6ff !important; }

/* ---------- Scrollbars (Chromium/WebKit) ---------- */
html.dark ::-webkit-scrollbar-track { background: #0f172a; }
html.dark ::-webkit-scrollbar-thumb { background: #334155; border-radius: 8px; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ---------- Cases à cocher et boutons radio ----------
   Rendu natif du navigateur, forcé en version claire (case blanche, coche bleue) : bien visible
   sur les fonds sombres. L'ancien dessin maison (appearance: none) remplissait la case cochée avec
   la couleur du texte, quasi blanche en mode sombre : coché et non coché devenaient identiques. */
html.dark input[type="checkbox"],
html.dark input[type="radio"] {
    color-scheme: light;
    accent-color: #2563eb;
}
/* v2.4a6270f9 */
