
/* ——— DEPRECIATED ——— */

/* BLOCS THÉMATIQUES (API : variables héritées par le contenu) */
.theme{
  --section-bg:var(--surface);
  --section-fg:var(--text);
  --section-muted:var(--text-muted);
  /* Accent du bloc (peut être écrasé par accent-picker / .ui-*) */
  --section-accent:var(--primary-500);
  --section-accent-2:var(--info-500);
  /* Ombre “accent” (utilisée par certains éléments décoratifs) */
  --section-shadow:0 8px 18px color-mix(in srgb, var(--section-accent) 18%, transparent);
  background:var(--section-bg);
  color:var(--section-fg);
}

.theme .title-on{color:var(--section-fg);}
.theme .text-muted-on{color:var(--section-muted);}
.theme a.on{color:var(--section-accent);}
.theme a.on:hover{color:var(--section-accent-2);}

/* 5) VARIANTES DE BLOC (fond alternatif par couleur) */
.theme-mint   { --section-bg:var(--mint-300);   --section-accent:var(--mint-500);   --section-accent-2:var(--mint-700);   --section-accent-3:var(--mint-800); }
.theme-blue   { --section-bg:var(--blue-300);   --section-accent:var(--blue-500);   --section-accent-2:var(--blue-700);   --section-accent-3:var(--blue-800); }
.theme-pink   { --section-bg:var(--pink-300);   --section-accent:var(--pink-500);   --section-accent-2:var(--pink-700);   --section-accent-3:var(--pink-800); }
.theme-orange { --section-bg:var(--orange-300); --section-accent:var(--orange-300); --section-accent-2:var(--orange-500);   --section-accent-3:var(--orange-700); }
.theme-yellow { --section-bg:var(--yellow-300); --section-accent:var(--yellow-500); --section-accent-2:var(--yellow-700);   --section-accent-3:var(--yellow-800); }
.theme-purple { --section-bg:var(--purple-300); --section-accent:var(--purple-500); --section-accent-2:var(--purple-700);   --section-accent-3:var(--purple-800); }
.theme-grey   { --section-bg:var(--grey-300);   --section-accent:var(--grey-500);   --section-accent-2:var(--grey-700);   --section-accent-2:var(--grey-800); }

/* Variante “no background” pour un bloc */
.theme-nobg{ --section-bg:transparent; box-shadow:none; }
.theme-nobg, .theme-nobg .title-on, .theme-nobg .text-muted-on, .theme-nobg a.on{ color:var(--section-fg); }

/* ACCENT PICKER & BOUTONS */

.accent-picker{ display:flex; gap:.5rem; align-items:center; }
.accent-dot{
  width:30px; height:30px; border-radius:999px; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  background: currentColor; border:2px solid rgba(255,255,255,.35);
  cursor:pointer; line-height:0;
  box-shadow: 0 0 0 0 transparent;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.accent-dot:hover{ transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.accent-dot[aria-pressed="true"]{ border-color:#fff; box-shadow: 0 0 0 2px rgba(255,255,255,.35) inset; }

/* Ligne : deux blocs séparés (toggle à gauche, picker à droite) */
.settings-row{
  display:flex;
  flex-wrap:wrap;
  column-gap: 2rem;   /* espace horizontal entre blocs */
  row-gap: 1.25rem;   /* espace vertical entre lignes (desktop) */
  align-items:flex-start;
}

/* Blocs (langue / thème / accent) */
.settings-block{
  display:flex;
  flex-direction:column;
  min-width: 240px;   /* force plus vite le wrap, ajuste si besoin */
}

/* Label compact par défaut */
.settings-block > label.small{ margin-bottom:.35rem; }

/* Vue plus étroite : compacter l’espace vertical */
@media (max-width: 1200px){
  .settings-row{ row-gap: .85rem; }
}
@media (max-width: 992px){
  .settings-row{ row-gap: .6rem; column-gap: 1.25rem; }
  .settings-block{ min-width: 220px; }
  .settings-block > label.small{ margin-bottom:.25rem; }
}
@media (max-width: 576px){
  .settings-row{ row-gap: .45rem; column-gap: 1rem; }
  .settings-block{ min-width: 200px; }
}

/* ===== Switch Theme (fix Bootstrap layout) ===== */
.form-switch.switch-theme{
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  padding-left: 0;              /* annule padding Bootstrap */
  margin: 0;
}

/* L’input dessine le track + le thumb (::before) */
.switch-theme .form-check-input{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  margin: 0;                    /* annule le margin Bootstrap */
  transform: none;              /* supprime translateY de Bootstrap */
  background:#ccc;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: none;             /* option: supprime glow Bootstrap */
  transition: background-color .2s ease-in-out;
}
.switch-theme .form-check-input:focus{ box-shadow: none; outline: none; }
.switch-theme .form-check-input:checked{ background-color: var(--grey-700); }

.switch-theme .form-check-input::before{
  content:"";
  position:absolute;
  top:50%;
  left:3px;
  width:24px; height:24px;
  background:#fff;
  border-radius:50%;
  transform: translateY(-50%);
  transition: transform .2s ease-in-out, left .2s ease-in-out;
}
.switch-theme .form-check-input:checked::before{
  left: calc(100% - 27px);
}

/* Le label recouvre tout le switch et porte les icônes */
.switch-theme .form-check-label{
  position:absolute;
  inset:0;                      /* top/right/bottom/left:0 */
  display:block;
  margin:0;                     /* annule margin Bootstrap */
  pointer-events:none;          /* clics passent à l’input */
}

/* Icônes soleil/lune */
.switch-theme .switch-icon{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  font-size:16px;
  line-height:1;
  transition: opacity .2s ease-in-out;
  pointer-events:none;
}
.switch-theme .switch-icon.sun{ left:8px;  color:#f39c12; opacity:1; }
.switch-theme .switch-icon.moon{ right:8px; color:#f1c40f; opacity:0; }

.switch-theme .form-check-input:checked + .form-check-label .switch-icon.sun{  opacity:0; }
.switch-theme .form-check-input:checked + .form-check-label .switch-icon.moon{ opacity:1; }

/* 8) Accessibilité : réduire les animations globales */
@media (prefers-reduced-motion:reduce){
  *{ transition:none !important; }
}