/* ==========================================================================
   1. VARIABLES & THEMES (Architecture Native Jour/Nuit)
   ========================================================================== */
:root,
[data-theme="dark"] {
  --ml-bg: #0D0D12;
  --ml-surface: #16161D;
  --ml-surface-2: #1D1D26;
  --ml-text: #EBE3F5;
  --ml-text-dim: #8A8A9C;

  --ml-success: #B7CE66;
  --ml-danger: #FF6B6B;
  --ml-warning: #F7C948;
    --ml-gold: #7C80FC;
  --ml-gold-dim: #ABA0F9;
  --ml-gold-soft: #D6CFFF;
  --ml-on-accent: #FEFEFF;
  --ml-border: rgba(255, 255, 255, 0.14);
  --ml-radius: 14px;
  --bg-overlay: linear-gradient(180deg, rgba(13, 13, 18, 0.6), rgba(13, 13, 18, 0.42));
  --ml-font-display: 'Plus Jakarta Sans', sans-serif;
  --ml-font-body: 'Plus Jakarta Sans', sans-serif;
  --ml-card-guide: #ABA0F9;
  --bg-modal: black;
}

[data-theme="light"] {
  --ml-bg: #F4F4FA;
  --ml-surface: #FFFFFF;
  --ml-surface-2: #EAE9F5;
  --ml-text: #12121A;
  --ml-text-dim: #65657A;
  --ml-gold: #5B60E1;
  --ml-gold-dim: #7C80FC;
  --ml-success: #8FB43A;
  --ml-danger: #D8434B;
  --ml-warning: #B9860F;
  --ml-gold-soft: #ABA0F9;
  --ml-on-accent: #FEFEFF;
  --ml-border: rgba(0, 0, 0, 0.12);
  --bg-overlay: linear-gradient(180deg, rgba(246, 243, 251, 0.05), rgba(237, 233, 248, 0.07));
  --ml-card-guide: #ffffff;
  --bg-modal: white;
  --ml-font-display: 'Plus Jakarta Sans', sans-serif;
  --ml-font-body: 'Plus Jakarta Sans', sans-serif;
}

/* ── Notes palette officielle (une seule source de vérité pour tout le projet) ──
   --ml-gold        : accent principal (violet indigo)
   --ml-gold-dim    : accent assombri (survol, bordures actives)
   --ml-gold-soft   : accent clair (reflets, dégradés)
   --ml-success     : succès
   --ml-danger      : erreur
   --ml-warning     : avertissement
   ==========================================================================
   2. STYLES COMMUNS ET RESET BASIQUE
   ========================================================================== */
* {
    box-sizing: border-box;
}

body {
    background: var(--ml-bg);
    color: var(--ml-text);
    font-family: var(--ml-font-body);
    margin: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

button,
input,
textarea,
select {
    font: inherit;
}

html,
body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Par défaut (Thème clair) : on montre la lune pour inciter à passer en mode nuit */
#theme-toggle .bi {
  content: "\f496";
  /* Code Bootstrap Icon pour bi-moon-stars-fill */
}

/* Quand le thème sombre est actif : on bascule sur le soleil */
[data-theme="dark"] #theme-toggle .bi {
  content: "\f5a4";
  /* Code Bootstrap Icon pour bi-sun */
  color: var(--ml-gold);
}

.ml-btn-theme-toggle {
  background: transparent;
  color: var(--ml-text-dim, #6c757d);
  font-size: 1.15rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ml-btn-theme-toggle:hover {
  background: var(--ml-surface-2, rgba(0, 0, 0, 0.05));
  color: var(--ml-gold, #FFB900);
  transform: rotate(15deg);
}


a {
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Conteneurs principaux */
.ml-main {
  min-height: 70vh;
}

.ml-main-auth {
  min-height: 100vh;
  width: 100%;
  background-color: var(--ml-bg);
}

/* ── Logo : cadre premium léger + halo violet discret au survol ── */
.ml-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: var(--ml-radius);
  background: var(--bg-overlay);
  border: 1px solid var(--ml-gold-dim);
  padding: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ml-brand:hover .ml-logo {
  transform: translateY(-1px) rotate(-2deg);
  box-shadow: 0 6px 18px -6px rgba(124, 128, 252, 0.5);
  border: 1px solid var(--ml-gold-dim);
}

/* ==========================================================================
   3. CONFIGURATION COMPOSANTS : NAVBAR
   ========================================================================== */
.ml-nav-link {
  text-decoration: none;
}

.ml-nav-link::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  background: var(--ml-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.ml-nav-link.active::after,
.ml-nav-link:hover::after {
  transform: scaleX(1);
}

.ml-navbar {
  background: rgba(13, 13, 18, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ml-border);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Changement de couleur d'arrière-plan de la Navbar en mode clair */
[data-theme="light"] .ml-navbar {
  background: rgba(255, 255, 255, 0.85);
}

.ml-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ml-brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--ml-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ml-font-display);
  font-size: 13px;
  color: var(--ml-gold);
  letter-spacing: 0.5px;
}

/* ── Nom de l'application : typographie élégante à double graisse ──
   Cormorant Garamond (display) pour le mot "Manamaso", puis
   "Lens" en italique violet pour marquer l'identité visuelle.    ── */
.ml-brand-name {
  font-family: var(--ml-font-display);
  font-size: 24px;
  line-height: 1;
  color: var(--ml-text);
  font-weight: 700;
  letter-spacing: -0.4px;
}

.ml-brand-name em {
  color: var(--ml-gold);
  font-style: italic;
  font-weight: 600;
}

.ml-toggler {
  border: none;
  color: var(--ml-text);
  font-size: 24px;
}

.ml-toggler:focus {
  box-shadow: none;
}

.ml-nav-link {
  color: var(--ml-text-dim);
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 26px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.ml-nav-link i {
  font-size: 14px;
  line-height: 1;
}

.ml-nav-link:hover {
  color: var(--ml-text);
}

.navbar-nav {
  gap: 12px;
}

.ml-nav-link.active {
  color: var(--ml-gold);
}

/* Boutons Globaux */
.ml-btn-ghost {
  color: var(--ml-text);
  border: 1px solid var(--ml-border);
  padding: 9px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
}

.ml-btn-ghost:hover {
  border-color: var(--ml-gold);
  color: var(--ml-gold);
}

.ml-btn-gold {
  background: var(--ml-gold);
  color: var(--ml-on-accent);
  padding: 9px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  border: none;
}

.ml-btn-gold:hover {
  background: var(--ml-gold-dim);
  color: var(--ml-on-accent);
}

/* Menu de compte et Dropdowns */
.ml-account-btn {
  background: var(--ml-surface);
  border: 1px solid var(--ml-border);
  border-radius: 100px;
  padding: 6px 14px 6px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ml-text);
}

.ml-account-btn::after {
  transition: filter 0.3s ease;
}

[data-theme="dark"] .ml-account-btn::after {
  filter: invert(0.7);
}

.ml-avatar {
  width: 30px;
  height: 30px;
  background: var(--ml-gold);
  color: var(--ml-on-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.ml-dropdown {
  background: var(--ml-surface);
  border: 1px solid var(--ml-border);
  border-radius: 12px;
  padding: 8px;
  min-width: 220px;
}

.ml-dropdown .dropdown-item {
  color: var(--ml-text-dim);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
}

.ml-dropdown .dropdown-item:hover {
  background: var(--ml-surface-2);
  color: var(--ml-text);
}

.ml-dropdown .dropdown-divider {
  border-color: var(--ml-border);
}

.ml-admin-item {
  /* color: var(--ml-warning);
  font-weight: 600; */
}

/* ==========================================================================
   4. CONFIGURATION COMPOSANTS : FOOTER
   ========================================================================== */
.ml-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--ml-gold) 10%, transparent), transparent 30%),
    var(--ml-surface);
  border-top: 1px solid var(--ml-border);
  box-shadow: 0 -12px 40px color-mix(in srgb, var(--ml-bg) 18%, transparent);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.ml-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--ml-gold-soft) 5%, transparent), transparent 42%);
}

.ml-footer .container-fluid {
  max-width: 1440px;
}

.ml-footer .row {
  row-gap: 2.75rem !important;
}

.ml-footer-brand-col {
  max-width: 420px;
}

.ml-footer .ml-brand {
  width: fit-content;
}

.ml-footer-title {
  position: relative;
  color: var(--ml-text);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 1.15rem;
}

.ml-footer-title::after {
  content: '';
  display: block;
  width: 2rem;
  height: 2px;
  margin-top: 0.65rem;
  border-radius: 999px;
  background: var(--ml-gold);
}

.ml-footer-text {
  max-width: 31ch;
  color: var(--ml-text-dim);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 0;
}

.ml-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ml-footer-links li {
  margin-bottom: 0.75rem;
}

.ml-footer-links li:last-child {
  margin-bottom: 0;
}

.ml-footer-links a,
.ml-footer-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ml-text-dim);
  font-size: 0.875rem;
  line-height: 1.45;
  transition: color 0.2s ease, transform 0.2s ease;
}

.ml-footer-links a i,
.ml-footer-contact-item i {
  flex: 0 0 1.15rem;
  width: 1.15rem;
  color: var(--ml-gold);
  font-size: 0.9rem;
  line-height: 1;
  text-align: center;
  transition: color 0.2s ease;
}

.ml-footer-links a:hover,
.ml-footer-contact-item:hover {
  color: var(--ml-text);
  transform: translateX(3px);
}

.ml-footer-links a:hover i,
.ml-footer-contact-item:hover i {
  color: var(--ml-gold-dim);
}

.ml-footer-contact-item {
  text-decoration: none;
  word-break: break-word;
}

.ml-footer-contact-item:not(a) {
  cursor: default;
}

.ml-footer-contact-item:not(a):hover {
  transform: none;
}

.ml-footer-divider {
  border: 0;
  border-top: 1px solid var(--ml-border);
  opacity: 1;
  margin: 2.75rem 0 1.35rem;
}

.ml-footer-copy,
.ml-footer-legal a {
  color: var(--ml-text-dim);
  font-size: 0.8rem;
}

.ml-footer-copy {
  letter-spacing: 0.02em;
}

.ml-footer-legal {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ml-footer-legal a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.ml-footer-legal a:hover {
  color: var(--ml-gold);
}

.ml-footer-legal .mx-2 {
  margin-right: 0 !important;
  margin-left: 0 !important;
  color: var(--ml-border);
}

.ml-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem !important;
}

.ml-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid var(--ml-border);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--ml-surface-2) 72%, transparent);
  font-size: 1rem;
  transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Couleurs officielles de chaque réseau */
.ml-social a[href*="facebook"],
.ml-social .ml-social-fb {
  color: #1877F2;
}

.ml-social a[href*="instagram"],
.ml-social .ml-social-ig {
  color: #E1306C;
}

.ml-social a[href*="linkedin"],
.ml-social .ml-social-li {
  color: #0A66C2;
}

.ml-social a:hover {
  transform: translateY(-3px);
  border-color: currentColor;
  background: currentColor;
  box-shadow: 0 8px 18px color-mix(in srgb, currentColor 24%, transparent);
}

.ml-social a:hover i {
  color: var(--ml-on-accent);
}

@media (prefers-reduced-motion: reduce) {

  .ml-footer,
  .ml-footer a,
  .ml-social a {
    transition: none;
  }
}

/* ── Toggle jour / nuit dans la navbar ── */
.ml-navbar .ml-theme-toggle {
  position: static;
  border: 1px solid var(--ml-border);
  background: transparent;
  padding: 8px 14px;
  border-radius: 100px;
  gap: 8px;
  font-size: 13px;
  color: var(--ml-text-dim);
  transition: color .2s ease, border-color .2s ease;
}

.ml-navbar .ml-theme-toggle:hover {
  border-color: var(--ml-gold);
  color: var(--ml-gold);
}

/* ==========================================================
   TOGGLE JOUR / NUIT
   ========================================================== */
.ml-theme-toggle {
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ml-surface);
  border: 1px solid var(--ml-border);
  color: var(--ml-text-dim);
  /* font-family: var(--ml-font-body); */
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ml-theme-toggle:hover {
  border-color: var(--ml-gold);
  color: var(--ml-gold);
  transform: translateY(-1px);
}

.ml-theme-toggle i {
  font-size: 14px;
}

@media (max-width: 991px) {
  .ml-footer .container-fluid {
    padding-right: clamp(1.25rem, 4vw, 3rem) !important;
    padding-left: clamp(1.25rem, 4vw, 3rem) !important;
  }
}

@media (max-width: 768px) {
  .ml-theme-toggle span {
    display: none;
  }

  .ml-theme-toggle {
    padding: 10px;
  }

  /* Marque compacte lorsque la navbar est repliée. */
  .ml-logo {
    width: 38px;
    height: 38px;
  }

  .ml-brand-name {
    font-size: 20px;
  }

  .ml-footer {
    text-align: center;
  }

  .ml-footer-brand-col {
    max-width: none;
  }

  .ml-footer .ml-brand,
  .ml-footer .ml-social {
    justify-content: center;
    margin-right: auto;
    margin-left: auto;
  }

  .ml-footer-text {
    margin-right: auto;
    margin-left: auto;
  }

  .ml-footer-links a,
  .ml-footer-contact-item {
    justify-content: center;
    text-align: left;
  }

  .ml-footer-title::after {
    margin-right: auto;
    margin-left: auto;
  }

  .ml-footer-copy,
  .ml-footer-legal {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 575px) {
  .ml-footer .container-fluid {
    padding-top: 2.75rem !important;
    padding-bottom: 2.25rem !important;
  }

  .ml-footer .row>div {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }

  .ml-footer .row {
    row-gap: 2.25rem !important;
  }

  .ml-footer-divider {
    margin-top: 2.25rem;
  }

  .ml-footer-copy {
    line-height: 1.6;
  }
}

@media (min-width: 769px) {
  .ml-footer .row {
    align-items: stretch;
  }

  .ml-footer .row>div {
    align-self: center;
  }
}

@media (max-width: 991px) and (min-width: 769px) {
  .ml-footer {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .ml-footer .row>div:first-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}