/* ═══════════════════════════════════════════════════════════════════
   SABINA INDUSTRIES — CHARTE APPLICATIVE v5.0
   Palette OFFICIELLE : Rouge #D42020 → Orange #F07020
   Comme le logo SABINA et le bouton "Parler à Sabina"
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* ─── COULEURS SABINA OFFICIELLES ─── */
  --sabina-red: #D42020;
  --sabina-red-dark: #A81818;
  --sabina-red-soft: #FFEBEE;         /* Fond rouge très pâle */
  --sabina-red-border: #F8C5C5;       /* Bordure rouge douce */

  --sabina-orange: #F07020;
  --sabina-orange-dark: #C85810;

  /* ─── GRADIENTS OFFICIELS (comme le logo) ─── */
  --sabina-grad: linear-gradient(135deg, #D42020 0%, #F07020 100%);
  --sabina-grad-hover: linear-gradient(135deg, #A81818 0%, #C85810 100%);
  --sabina-grad-h: linear-gradient(90deg, #D42020 0%, #F07020 100%);

  /* ─── NEUTRES CHAUDS ─── */
  --bg-app: #F5F3F0;
  --bg-card: #FFFFFF;
  --bg-hover: #FAF8F5;
  --bg-subtle: #F0EDE8;
  --line: #E8E3DC;
  --line-strong: #D4CCC2;

  /* ─── TEXTES ─── */
  --text-strong: #1A1210;
  --text: #3D3530;
  --text-mid: #6B6259;
  --text-muted: #A09890;

  /* ─── ACCENTS ─── */
  --green: #12B76A;
  --green-bg: #ECFDF5;
  --blue: #2563EB;
  --blue-bg: #EFF6FF;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --error: #DC2626;
  --error-bg: #FEF2F2;

  /* ─── RAYONS ─── */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;

  /* ─── OMBRES ─── */
  --sh-sm: 0 2px 8px rgba(30,15,5,.06);
  --sh: 0 4px 16px rgba(30,15,5,.08);
  --sh-sabina: 0 8px 24px rgba(212,32,32,.15);   /* Ombre rouge SABINA */
  --sh-sabina-md: 0 12px 32px rgba(212,32,32,.22);
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-app);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ═══ TYPOGRAPHIE ═══ */
h1, h2, h3, h4, h5 {
  font-family: 'Sora', 'Montserrat', sans-serif;
  color: var(--text-strong);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
}
h1 { font-size: 30px; letter-spacing: -.5px; }
h2 { font-size: 22px; letter-spacing: -.3px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }

a {
  color: var(--sabina-red);
  text-decoration: none;
  transition: color .15s;
}
a:hover { color: var(--sabina-orange); }

/* ═══ HEADER ═══ */
.sabina-header, header.sabina-header {
  background: #FFF;
  border-bottom: 1.5px solid var(--line);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--sh-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}
.sabina-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.sabina-header .logo img {
  height: 40px;
  border-radius: 10px;
}
.sabina-header .brand {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-strong);
}
.sabina-header .brand em {
  font-style: normal;
  background: var(--sabina-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ═══ BOUTONS (dégradé SABINA rouge → orange) ═══ */
.btn, button.btn, input[type="submit"].btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--sabina-grad);
  color: #FFF !important;
  border: none;
  border-radius: var(--r);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(212,32,32,.30);
  transition: all .2s ease;
}
.btn:hover {
  background: var(--sabina-grad-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(212,32,32,.45);
  color: #FFF !important;
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-outline {
  background: transparent;
  color: var(--sabina-red) !important;
  border: 2px solid var(--sabina-red);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--sabina-grad);
  border-color: transparent;
  color: #FFF !important;
}

.btn-danger {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
}
.btn-success {
  background: linear-gradient(135deg, #12B76A, #059669);
}
.btn-warning {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}
.btn-sm { padding: 8px 14px; font-size: 12px; }

/* ═══ CARDS ═══ */
.card, .carte, .box, .bloc, .panel, .widget, .service-card {
  background: #FFFFFF !important;
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: 0 2px 10px rgba(30,15,5,.06);
  border: 1.5px solid var(--line) !important;
  margin-bottom: 20px;
  transition: all .25s ease;
}
.card:hover, .carte:hover, .service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-sabina);
  border-color: var(--sabina-red) !important;
}

/* ═══ FORMULAIRES ═══ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-hover);
  outline: none;
  transition: all .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--sabina-red);
  background: #FFF;
  box-shadow: 0 0 0 4px rgba(212,32,32,.10);
}

/* ═══ TABLEAUX ═══ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #FFF;
  border-radius: var(--r);
  overflow: hidden;
}
th {
  background: var(--bg-subtle);
  padding: 12px;
  text-align: left;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--line);
}
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
tr:hover td { background: var(--sabina-red-soft); }

/* ═══ BANDEAU HERO (dégradé SABINA plein) ═══ */
.banner, .hero-banner, .bandeau, .hero,
.info-band, [class*="banner"] {
  background: var(--sabina-grad) !important;
  color: #FFF !important;
  padding: 28px 32px;
  border-radius: var(--r-lg);
  box-shadow: 0 8px 24px rgba(212,32,32,.25);
  margin-bottom: 20px;
  border: none !important;
}
.banner h1, .banner h2, .banner p,
.hero h1, .hero h2, .hero p,
.info-band *, [class*="banner"] * {
  color: #FFF !important;
}

/* ═══ MESSAGES ═══ */
.message, .alert {
  padding: 14px 18px;
  border-radius: var(--r);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}
.message.success, .alert-success {
  background: var(--green-bg);
  color: #059669;
  border: 1.5px solid #BBF7D0;
}
.message.error, .alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1.5px solid #FECACA;
}
.message.warning, .alert-warning {
  background: var(--warning-bg);
  color: #92400E;
  border: 1.5px solid #FDE68A;
}
.message.info {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1.5px solid #BFDBFE;
}

/* ═══ GRILLES ═══ */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ═══ SIDEBAR ═══ */
.sidebar, .menu-lateral {
  background: #FFF;
  border-right: 1.5px solid var(--line);
}
.sidebar-item {
  padding: 12px 20px;
  color: var(--text);
  font-size: 14px;
  transition: all .15s;
  border-left: 3px solid transparent;
}
.sidebar-item:hover {
  background: var(--sabina-red-soft);
  color: var(--sabina-red);
}
.sidebar-item.active {
  background: var(--sabina-red-soft);
  color: var(--sabina-red);
  border-left-color: var(--sabina-red);
  font-weight: 600;
}

/* ═══ FOOTER ═══ */
.sabina-footer, footer.sabina-footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.sabina-footer a { color: var(--sabina-red); font-weight: 600; }

/* ═══ UTILITAIRES ═══ */
.text-sabina { color: var(--sabina-red) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-strong { color: var(--text-strong) !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .3s ease-out; }

/* ═══════════════════════════════════════════════════════════════════
   OVERRIDE FINAL — Rouge SABINA partout (comme le logo)
   ═══════════════════════════════════════════════════════════════════ */

body { background: var(--bg-app) !important; color: var(--text) !important; }

/* Header */
header, .header, .topbar, .navbar {
  background: #FFF !important;
  border-bottom: 1.5px solid var(--line) !important;
}

/* Boutons colorés → dégradé SABINA */
[style*="#5BA89A"],
[style*="#7DD3C0"],
[style*="#079992"],
[style*="#14b8a6"],
[class*="btn-primary"]:not(.btn-outline) {
  background: var(--sabina-grad) !important;
  color: #FFF !important;
  border-color: transparent !important;
}

/* Bandeaux */
[class*="banner"], [class*="hero"], [class*="band"] {
  background: var(--sabina-grad) !important;
  color: #FFF !important;
}

/* Icônes rondes */
.icon-circle, [class*="icon-bg"] {
  background: var(--sabina-red-soft) !important;
  color: var(--sabina-red) !important;
}

/* Tables hover */
tr:hover td, tr:hover th {
  background: var(--sabina-red-soft) !important;
}

/* Liens */
a { color: var(--sabina-red) !important; }
a:hover { color: var(--sabina-orange) !important; }

/* ═══ EFFETS HOVER VIVANTS ═══ */
.card:hover, .service-card:hover, [class*="card"]:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--sh-sabina) !important;
  border-color: var(--sabina-red) !important;
}

.btn:hover, button:not(.btn-danger):not(.btn-warning):not(.btn-success):hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(212,32,32,.40) !important;
}

/* Sélection */
::selection { background: rgba(212,32,32,.25) !important; }

/* Scrollbar */
::-webkit-scrollbar-thumb {
  background: var(--sabina-red) !important;
  border-radius: 10px;
}
::-webkit-scrollbar-track { background: var(--bg-subtle) !important; }

/* Mode nuit */
[data-theme="night"] {
  --bg-app: #1A1614;
  --bg-card: #241F1C;
  --bg-hover: #2E2825;
  --bg-subtle: #3D3530;
  --line: #3D3530;
  --text-strong: #F5F0EB;
  --text: #DDD5CC;
  --text-mid: #B0A79E;
  --text-muted: #80776E;
}

/* ═══════════════════════════════════════════════════════════════════
   OVERRIDE BADGES — VIRER LE VERT
   ═══════════════════════════════════════════════════════════════════ */

/* Badges d'options actives (dans "Mes options actives") */
.option-active-badge,
.options-actives-box .option-active-badge,
div.option-active-badge {
  background: linear-gradient(135deg, #F07020 0%, #FFA060 100%) !important;
  color: #FFF !important;
  border: none !important;
  padding: 8px 14px !important;
  border-radius: 20px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  box-shadow: 0 2px 8px rgba(240, 112, 32, .25) !important;
}

.option-active-badge:hover {
  background: linear-gradient(135deg, #D42020 0%, #F07020 100%) !important;
  box-shadow: 0 4px 12px rgba(212, 32, 32, .35) !important;
  transform: translateY(-2px) !important;
}

/* Tous les badges verts génériques */
[class*="active-badge"],
[class*="status-active"],
[class*="badge-active"],
.badge-success,
.status-success,
[class*="badge"][class*="green"],
[class*="status"][class*="green"] {
  background: linear-gradient(135deg, #F07020 0%, #FFA060 100%) !important;
  color: #FFF !important;
  border: none !important;
}

/* Icônes dans les badges */
.option-active-badge i,
.option-active-badge * {
  color: #FFF !important;
}

/* Badge "Actif" sur les plans (si vert) */
.badge-active,
.plan-active {
  background: linear-gradient(135deg, #12B76A 0%, #059669 100%) !important;
  color: #FFF !important;
}
/* ↑ On garde le vert UNIQUEMENT pour "Actif" sur les plans (c'est sémantique) */

/* Mais on vire le vert clair pâle partout */
[style*="#5BA89A"],
[style*="#7DD3C0"],
[style*="#6BA87A"],
[style*="rgba(107, 168, 122"],
[style*="rgba(91, 168, 154"] {
  background: linear-gradient(135deg, #F07020 0%, #FFA060 100%) !important;
  color: #FFF !important;
}

/* Toutes les classes qui pourraient être vertes */
.services-grid .service-card .badge,
.services-grid .service-card [class*="active"] {
  background: linear-gradient(135deg, #F07020 0%, #FFA060 100%) !important;
  color: #FFF !important;
}

/* ═══ CORRECTION SPÉCIFIQUE : "Mes options actives" ═══ */
.options-actives-box,
.options-actives,
section[class*="options-actives"] {
  background: transparent !important;
}

.options-actives-box .option-active-badge {
  background: linear-gradient(135deg, #F07020 0%, #FFA060 100%) !important;
  color: #FFF !important;
}
