/* ==========================================================================
   UNIVERS LIVRES — Feuille de style Éditoriale Couleur & Fond Blanc Sale Reposant
   Palette U.pdf : Vert Émeraude (#15803D), Violet Éditorial (#6D28D9), Bleu Littéraire (#1D4ED8)
   ========================================================================== */

:root {
  --bg-page: #E2E2E6;
  --bg-card: #EFEFF2;
  --bg-subtle: #E4E4E8;
  --bg-muted: #D4D4D8;
  --text-black: #000000;
  --text-dark: #18181B;
  --text-gray: #52525B;
  --text-light: #71717A;
  --text-lighter: #8E8E96;
  --border-light: #D4D4D8;
  --border-medium: #BCBCC2;
  /* Palette de couleurs U.pdf */
  --color-brand-green: #15803D;
  --color-brand-green-hover: #166534;
  --color-brand-green-soft: rgba(21, 128, 61, 0.12);
  --color-whatsapp: #16A34A;
  --color-whatsapp-hover: #15803D;
  --color-editorial-purple: #6D28D9;
  --color-editorial-purple-hover: #5B21B6;
  --color-editorial-purple-soft: rgba(109, 40, 217, 0.12);
  --color-section-blue: #1D4ED8;
  --color-section-blue-hover: #1E40AF;
  --color-section-blue-soft: rgba(29, 78, 216, 0.12);
  --color-amber: #D97706;
  --color-amber-soft: rgba(217, 119, 6, 0.14);
  --color-rose: #E11D48;
  --color-rose-soft: rgba(225, 29, 72, 0.12);
  --shadow-ios: 0 4px 24px -2px rgba(0, 0, 0, 0.06), 0 2px 8px -1px rgba(0, 0, 0, 0.04);
  --shadow-ios-hover: 0 14px 34px -4px rgba(29, 78, 216, 0.14), 0 4px 12px -2px rgba(0, 0, 0, 0.06);
  --shadow-ios-subtle: 0 1px 3px rgba(0, 0, 0, 0.06);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color: var(--text-black);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--text-black);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* Structure Responsive : Barre latérale sur ordinateur & Menu du bas sur mobile */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.desktop-sidebar {
  display: none;
  width: 290px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-light);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  flex-direction: column;
  user-select: none;
}

.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(239, 239, 242, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 35;
}

.main-area {
  flex: 1;
  padding: 20px 16px 104px 16px;
  width: 100%;
}

.main-container {
  max-width: 1180px;
  margin: 0 auto;
}

.mobile-bottom-nav {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(239, 239, 242, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  padding: 8px 10px 12px 10px;
  z-index: 45;
}

@media (min-width: 860px) {
  .desktop-sidebar {
    display: flex;
  }
  .mobile-header {
    display: none;
  }
  .mobile-bottom-nav {
    display: none;
  }
  .main-area {
    padding: 36px 40px 56px 330px;
  }
}

/* Composants iOS Noir & Blanc (Blanc sale reposant pour les yeux) */
.ios-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  box-shadow: var(--shadow-ios);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios-card-interactive {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  box-shadow: var(--shadow-ios);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios-card-interactive:hover {
  box-shadow: var(--shadow-ios-hover);
  transform: translateY(-3px);
  border-color: rgba(29, 78, 216, 0.35);
}

.ios-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--color-editorial-purple) 0%, var(--color-section-blue) 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 22px;
  border-radius: 14px;
  border: 1px solid var(--color-section-blue);
  box-shadow: 0 4px 14px -2px rgba(109, 40, 217, 0.28);
  transition: all 0.2s ease;
}

.ios-btn-primary:hover {
  background: linear-gradient(135deg, var(--color-editorial-purple-hover) 0%, var(--color-section-blue-hover) 100%);
  border-color: var(--color-editorial-purple-hover);
  box-shadow: 0 6px 18px -2px rgba(109, 40, 217, 0.38);
}

.ios-btn-primary:active {
  transform: scale(0.98);
}

.ios-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #E2E2E6;
  color: var(--color-section-blue);
  font-weight: 700;
  font-size: 14px;
  padding: 13px 22px;
  border-radius: 14px;
  border: 1px solid rgba(29, 78, 216, 0.22);
  transition: all 0.2s ease;
}

.ios-btn-secondary:hover {
  background: rgba(29, 78, 216, 0.1);
  border-color: var(--color-section-blue);
}

.ios-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-card);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid var(--border-medium);
  transition: all 0.2s ease;
}

.ios-btn-outline:hover {
  border-color: var(--color-section-blue);
  color: var(--color-section-blue);
  background: rgba(29, 78, 216, 0.06);
}

.ios-input, .ios-select {
  width: 100%;
  background: #E2E2E6;
  color: #000000;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1.5px solid #D4D4D8;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  outline: none;
}

.ios-input::placeholder {
  color: #71717A;
}

.ios-input:focus, .ios-select:focus {
  background: #F4F4F6;
  border-color: var(--color-section-blue);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

/* Puces de catégories arrondies avec barre de défilement gauche/droite visible */
.pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--color-section-blue) #D4D4D8;
}
.pills-row::-webkit-scrollbar {
  height: 7px;
}
.pills-row::-webkit-scrollbar-track {
  background: #D4D4D8;
  border-radius: 9999px;
}
.pills-row::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--color-editorial-purple), var(--color-section-blue));
  border-radius: 9999px;
}
.pills-row::-webkit-scrollbar-thumb:hover {
  background: var(--color-section-blue-hover);
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s ease;
  background: #E2E2E6;
  color: #3F3F46;
  border: 1px solid #D4D4D8;
}

.category-pill:hover {
  background: rgba(29, 78, 216, 0.08);
  color: var(--color-section-blue);
  border-color: rgba(29, 78, 216, 0.3);
}

.category-pill.active {
  background: linear-gradient(135deg, var(--color-section-blue) 0%, var(--color-editorial-purple) 100%);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

/* Grilles responsives */
.docs-grid-4 {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 20px;
}

.docs-grid-3 {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 22px;
}

.filters-grid-5 {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 600px) {
  .docs-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .docs-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .docs-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .docs-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filters-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Mise en page Fiche Document (Prompt 4) */
.doc-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.doc-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 640px) {
  .doc-meta-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .doc-detail-grid {
    grid-template-columns: 1.05fr 1fr;
    align-items: start;
  }
}

.whatsapp-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 900;
  padding: 18px 24px;
  border-radius: 16px;
  border: 2px solid #15803D;
  box-shadow: 0 10px 28px -4px rgba(22, 163, 74, 0.32);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.whatsapp-cta-btn:hover {
  background: linear-gradient(135deg, #15803D 0%, #166534 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -4px rgba(22, 163, 74, 0.42);
}

.whatsapp-cta-btn:active {
  transform: scale(0.99);
}

.gallery-thumb {
  padding: 10px 12px;
  border-radius: 12px;
  background: #E2E2E6;
  border: 1.5px solid transparent;
  font-size: 12px;
  font-weight: 700;
  color: #52525B;
  transition: all 0.2s ease;
  text-align: left;
}

.gallery-thumb:hover {
  background: rgba(29, 78, 216, 0.08);
  color: var(--color-section-blue);
}

.gallery-thumb.active {
  background: var(--color-section-blue);
  color: #FFFFFF;
  border-color: var(--color-section-blue);
}

/* Tableau de bord Administrateur (Prompts 6 & 7) */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
}

.admin-two-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  background: #FFFFFF;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
  text-align: left;
}

.admin-table th {
  padding: 14px 16px;
  background: #F4F4F5;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #52525B;
  border-bottom: 1px solid var(--border-light);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #F4F4F5;
  vertical-align: middle;
  font-size: 13px;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #FAFAFA;
}

.action-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  color: #18181B;
  transition: all 0.18s ease;
}

.action-icon-btn:hover {
  background: var(--color-section-blue);
  color: #FFFFFF;
  border-color: var(--color-section-blue);
}

@media (min-width: 600px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .admin-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .admin-two-cols {
    grid-template-columns: 1fr 1.15fr;
  }
  .admin-form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Utilitaires typographiques & espacements */
.title-xl {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.title-lg {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Animations douces */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-view {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   PROMPT 10 : FINITIONS (Mode Sombre, Skeletons, Erreurs, Responsive & Tests)
   ========================================================================== */

/* 1. CHARGEMENT FLUIDE (SKELETONS MONOCHROMES STYLE iOS) */
@keyframes skeletonPulse {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, #E4E4E7 25%, #F4F4F5 50%, #E4E4E7 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.35s ease-in-out infinite;
  border-radius: 12px;
}

html[data-theme="dark"] .skeleton-shimmer {
  background: linear-gradient(90deg, #1F1F23 25%, #2E2E34 50%, #1F1F23 75%);
  background-size: 200% 100%;
}

/* 2. MESSAGES D'ERREUR CLAIRS & NOTIFICATIONS TOAST iOS */
.ios-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 390px;
  width: calc(100% - 32px);
  pointer-events: none;
}

.ios-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #15803D 0%, #166534 100%);
  color: #FFFFFF;
  border: 1.5px solid #16A34A;
  box-shadow: 0 14px 36px rgba(21, 128, 61, 0.28);
  animation: fadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ios-toast.toast-error {
  background: #FFF1F2;
  color: #9F1239;
  border: 2px solid #E11D48;
}

.form-error-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #FFF1F2;
  color: #9F1239;
  border: 2px solid #E11D48;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.ios-input.input-invalid {
  border-color: #E11D48 !important;
  background: #FFF1F2 !important;
}

/* 3. SIMULATEUR DE TESTS RESPONSIVE (MOBILE, TABLETTE, ORDINATEUR) */
.device-frame-mobile {
  max-width: 390px;
  margin: 0 auto;
  border: 3px solid var(--color-section-blue);
  border-radius: 28px;
  padding: 16px;
  background: var(--bg-page);
  box-shadow: var(--shadow-ios-hover);
}

.device-frame-tablet {
  max-width: 768px;
  margin: 0 auto;
  border: 3px solid var(--color-section-blue);
  border-radius: 24px;
  padding: 22px;
  background: var(--bg-page);
  box-shadow: var(--shadow-ios-hover);
}

/* Optimisations Tablette (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .docs-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .docs-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 4. MODE SOMBRE AVEC PALETTE DE COULEURS ADAPTÉE (U.pdf) */
html[data-theme="dark"] {
  --bg-page: #09090B;
  --bg-card: #121215;
  --bg-subtle: #1C1C21;
  --bg-muted: #27272A;
  --text-black: #FAFAFA;
  --text-dark: #F4F4F5;
  --text-gray: #A1A1AA;
  --text-light: #A1A1AA;
  --text-lighter: #71717A;
  --border-light: #27272A;
  --border-medium: #3F3F46;
  --color-brand-green: #22C55E;
  --color-brand-green-hover: #16A34A;
  --color-editorial-purple: #A78BFA;
  --color-editorial-purple-hover: #8B5CF6;
  --color-section-blue: #60A5FA;
  --color-section-blue-hover: #3B82F6;
  --shadow-ios: 0 6px 26px -2px rgba(0, 0, 0, 0.55);
  --shadow-ios-hover: 0 14px 36px -4px rgba(37, 99, 235, 0.35);
  color-scheme: dark;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  background-color: #09090B;
  color: #FAFAFA;
}

html[data-theme="dark"] .desktop-sidebar {
  background: #111114;
  border-right-color: #27272A;
}

html[data-theme="dark"] .mobile-header {
  background: rgba(17, 17, 20, 0.9);
  border-bottom-color: #27272A;
}

html[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(17, 17, 20, 0.94);
  border-top-color: #27272A;
}

html[data-theme="dark"] .ios-card,
html[data-theme="dark"] .ios-card-interactive,
html[data-theme="dark"] .admin-table-wrap {
  background: #141418 !important;
  border-color: #27272A !important;
  color: #FAFAFA;
}

html[data-theme="dark"] .ios-card-interactive:hover {
  border-color: #6366F1 !important;
}

html[data-theme="dark"] .ios-btn-primary {
  background: linear-gradient(135deg, #7C3AED 0%, #2563EB 100%) !important;
  color: #FFFFFF !important;
  border-color: #3B82F6 !important;
}

html[data-theme="dark"] .ios-btn-primary:hover {
  background: linear-gradient(135deg, #6D28D9 0%, #1D4ED8 100%) !important;
  border-color: #60A5FA !important;
}

html[data-theme="dark"] .whatsapp-cta-btn {
  background: linear-gradient(135deg, #16A34A 0%, #15803D 100%) !important;
  color: #FFFFFF !important;
  border-color: #22C55E !important;
}

html[data-theme="dark"] .whatsapp-cta-btn:hover {
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%) !important;
}

html[data-theme="dark"] .ios-btn-secondary {
  background: #1E1B4B !important;
  color: #93C5FD !important;
  border-color: #3730A3 !important;
}

html[data-theme="dark"] .ios-btn-secondary:hover {
  background: #312E81 !important;
}

html[data-theme="dark"] .ios-btn-outline {
  background: #141418 !important;
  color: #FAFAFA !important;
  border-color: #3F3F46 !important;
}

html[data-theme="dark"] .ios-btn-outline:hover {
  border-color: #60A5FA !important;
  color: #93C5FD !important;
  background: #1E1E24 !important;
}

html[data-theme="dark"] .ios-input,
html[data-theme="dark"] .ios-select {
  background: #1E1E24 !important;
  color: #FAFAFA !important;
  border-color: #2E2E36 !important;
}

html[data-theme="dark"] .ios-input:focus,
html[data-theme="dark"] .ios-select:focus {
  background: #141418 !important;
  border-color: #60A5FA !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .category-pill,
html[data-theme="dark"] .gallery-thumb {
  background: #1E1E24;
  color: #D4D4D8;
  border-color: #27272A;
}

html[data-theme="dark"] .pills-row {
  scrollbar-color: #3B82F6 #1E1E24;
}
html[data-theme="dark"] .pills-row::-webkit-scrollbar-track {
  background: #1E1E24;
}
html[data-theme="dark"] .pills-row::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #7C3AED, #2563EB);
}

html[data-theme="dark"] .category-pill:hover,
html[data-theme="dark"] .gallery-thumb:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #93C5FD;
}

html[data-theme="dark"] .category-pill.active,
html[data-theme="dark"] .gallery-thumb.active {
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%) !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .admin-table th {
  background: #1C1C21 !important;
  color: #A1A1AA !important;
  border-bottom-color: #27272A !important;
}

html[data-theme="dark"] .admin-table td {
  border-bottom-color: #222228 !important;
  color: #FAFAFA;
}

html[data-theme="dark"] .admin-table tr:hover td {
  background: #1A1A20 !important;
}

html[data-theme="dark"] .action-icon-btn {
  background: #1E1E24 !important;
  color: #FAFAFA !important;
  border-color: #323238 !important;
}

html[data-theme="dark"] .action-icon-btn:hover {
  background: #2563EB !important;
  color: #FFFFFF !important;
  border-color: #3B82F6 !important;
}

/* Harmonisation automatique en Mode Clair (Blanc sale reposant pour les yeux, zéro blanc éblouissant) */
html:not([data-theme="dark"]) [style*="background:#FFFFFF"] {
  background: #EFEFF2 !important;
}
html:not([data-theme="dark"]) [style*="background:#F4F4F5"],
html:not([data-theme="dark"]) [style*="background:#FAFAFA"] {
  background: #E2E2E6 !important;
}
html:not([data-theme="dark"]) [style*="border:1px solid #E4E4E7"],
html:not([data-theme="dark"]) [style*="border-top:1px solid #F4F4F5"],
html:not([data-theme="dark"]) [style*="border-bottom:1px solid #F4F4F5"],
html:not([data-theme="dark"]) [style*="border:1px solid #F4F4F5"] {
  border-color: #D4D4D8 !important;
}

/* Harmonisation automatique des styles en ligne en Mode Sombre */
html[data-theme="dark"] [style*="background:#F4F4F5"] {
  background: #1E1E24 !important;
}
html[data-theme="dark"] [style*="background:#FAFAFA"] {
  background: #18181D !important;
}
html[data-theme="dark"] [style*="background:#E4E4E7"] {
  background: #2E2E36 !important;
}
html[data-theme="dark"] [style*="background:#FFFFFF"] {
  background: #16161B !important;
  color: #FAFAFA !important;
}
html[data-theme="dark"] [style*="color:#000000"] {
  color: #FAFAFA !important;
}
html[data-theme="dark"] [style*="color:#15803D"] {
  color: #4ADE80 !important;
}
html[data-theme="dark"] [style*="color:#6D28D9"] {
  color: #C4B5FD !important;
}
html[data-theme="dark"] [style*="color:#1D4ED8"] {
  color: #93C5FD !important;
}
html[data-theme="dark"] [style*="color:#27272A"],
html[data-theme="dark"] [style*="color:#3F3F46"],
html[data-theme="dark"] [style*="color:#52525B"] {
  color: #D4D4D8 !important;
}
html[data-theme="dark"] [style*="color:#71717A"] {
  color: #A1A1AA !important;
}
html[data-theme="dark"] [style*="border:1px solid #E4E4E7"],
html[data-theme="dark"] [style*="border:1.5px solid #E4E4E7"],
html[data-theme="dark"] [style*="border-top:1px solid #E4E4E7"],
html[data-theme="dark"] [style*="border-bottom:1px solid #E4E4E7"],
html[data-theme="dark"] [style*="border-top:1px solid #F4F4F5"],
html[data-theme="dark"] [style*="border-bottom:1px solid #F4F4F5"],
html[data-theme="dark"] [style*="border:1px solid #F4F4F5"] {
  border-color: #27272A !important;
}
html[data-theme="dark"] [style*="background:#000000"] {
  background: #FFFFFF !important;
  color: #000000 !important;
}
html[data-theme="dark"] .ios-toast {
  background: linear-gradient(135deg, #15803D 0%, #166534 100%) !important;
  color: #FFFFFF !important;
  border-color: #22C55E !important;
}
html[data-theme="dark"] .ios-toast.toast-error {
  background: #4C0519 !important;
  color: #FFE4E6 !important;
  border-color: #F43F5E !important;
}
html[data-theme="dark"] .form-error-box {
  background: #4C0519 !important;
  color: #FFE4E6 !important;
  border-color: #F43F5E !important;
}

/* ==========================================================================
   BANNIÈRE « À LA UNE » ÉDITORIALE (PHOTOGRAPHIE DORÉE NATURELLE & SOBRE)
   ========================================================================== */
.featured-gold-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #C8A24A;
  background-color: #241B10;
  color: #FAF6EE;
  box-shadow: 0 8px 24px rgba(24, 18, 10, 0.14);
}

.featured-gold-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.featured-gold-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(26, 19, 11, 0.88) 0%,
    rgba(38, 28, 15, 0.76) 55%,
    rgba(56, 40, 18, 0.54) 100%
  );
  z-index: 1;
}

/* Bandeau où les messages de bienvenue défilent sobrement de gauche à droite */
.gold-marquee-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: rgba(20, 14, 8, 0.72);
  border-top: 1px solid rgba(200, 162, 74, 0.35);
  padding: 12px 0;
  z-index: 2;
}

.gold-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: goldFlowLeftToRight 38s linear infinite;
}

.gold-marquee-viewport:hover .gold-marquee-track {
  animation-play-state: paused;
}

@keyframes goldFlowLeftToRight {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0%);
  }
}

.gold-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 32px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: #F5EBD6;
  letter-spacing: 0.01em;
}

.gold-marquee-sep {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #D4AF37;
}

.gold-slide-stage {
  animation: goldCardGlideLeftToRight 0.45s ease-out;
}

@keyframes goldCardGlideLeftToRight {
  0% {
    opacity: 0;
    transform: translateX(-24px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.gold-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(20, 14, 8, 0.55);
  color: #EAD8B1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.gold-nav-btn:hover {
  background: #C8A24A;
  color: #1A130B;
  border-color: #C8A24A;
}
