/* ══════════════════════════════════════════════════════════════════════════
   PARAMÈTRES DU COMPTE — feuille de style partagée (professeur et élève)

   Deux règles ont dicté l'écriture de ce fichier, apprises à nos dépens sur
   ce projet :

   1. AUCUN GLYPHE DE POLICE POUR UNE ICÔNE. dashboard.css impose
      « font-family: Inter, polices d'émojis » à TOUS les boutons ; les
      symboles typographiques (☆, ⚙) n'y figurent pas et le bouton paraît
      vide. Toutes les icônes d'ici sont des tracés SVG, dimensionnés et
      colorés en CSS, sans dépendre de « currentColor ».

   2. AUCUNE RÈGLE BALAI PAR IDENTIFIANT. « #machin span { color: … } » pèse
      (1,0,1) et écrase silencieusement les classes de composant, même avec
      « !important » des deux côtés. Ici, tout passe par des classes « prm-… ».

   Contrastes vérifiés par calcul (luminance relative, seuil AA 4,5:1) :
     #0f172a sur #ffffff → 17,9:1      #334155 sur #ffffff → 10,4:1
     #475569 sur #ffffff →  8,0:1      #ffffff sur #4f46e5 →  6,3:1
     #b91c1c sur #ffffff →  6,9:1      #15803d sur #ffffff →  5,0:1
   ══════════════════════════════════════════════════════════════════════════ */

/* ───────────────────────── Le bouton roue crantée ───────────────────────── */

.prm-roue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;               /* 44 px : cible tactile minimale recommandée */
  height: 44px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  flex-shrink: 0;            /* sinon le bouton s'écrase dans un conteneur flex */
  transition: background-color .15s ease, border-color .15s ease;
}
.prm-roue:hover        { background: #f1f5f9; border-color: #94a3b8; }
.prm-roue:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }
.prm-roue svg          { width: 22px; height: 22px; display: block; }
.prm-roue svg path,
.prm-roue svg circle   { fill: none; stroke: #334155; stroke-width: 2;
                         stroke-linecap: round; stroke-linejoin: round; }

/* ─────────────────────────── Le voile et la boîte ───────────────────────── */

.prm-voile[hidden] { display: none !important; }   /* « display » d'une feuille
     d'auteur écrase l'attribut « hidden » : il faut le dire explicitement. */
.prm-voile {
  position: fixed;
  inset: 0;
  z-index: 10060;            /* au-dessus de la bulle des liens (10050) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .55);
  animation: prm-voile-entree 140ms ease-out;
}
@keyframes prm-voile-entree { from { opacity: 0; } to { opacity: 1; } }

.prm-boite {
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  max-height: min(680px, 92vh);
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .35);
  animation: prm-boite-entree 180ms ease-out;
}
@keyframes prm-boite-entree {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ───────────────────────────── En-tête de boîte ─────────────────────────── */

.prm-entete {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.prm-titre {
  margin: 0; flex: 1;
  font-size: 1.15rem; font-weight: 700; color: #0f172a;
}
.prm-fermer {
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #cbd5e1; border-radius: 10px;
  background: #ffffff; cursor: pointer;
}
.prm-fermer:hover { background: #f1f5f9; }
.prm-fermer:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }
.prm-fermer svg { width: 18px; height: 18px; display: block; }
.prm-fermer svg path { fill: none; stroke: #334155; stroke-width: 2;
                       stroke-linecap: round; }

/* ─────────────────────────── Corps : menu + panneau ─────────────────────── */

.prm-corps { display: flex; flex: 1; min-height: 0; }

.prm-menu {
  width: 210px; flex-shrink: 0;
  padding: 14px 10px;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  overflow-y: auto;
}
.prm-menu-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; margin-bottom: 4px;
  padding: 10px 12px;
  border: none; border-radius: 10px;
  background: transparent;
  color: #334155; font-size: .92rem; font-weight: 600; text-align: left;
  cursor: pointer;
}
.prm-menu-btn:hover { background: #e2e8f0; }
.prm-menu-btn:focus-visible { outline: 3px solid #4f46e5; outline-offset: -2px; }
.prm-menu-actif       { background: #4f46e5; color: #ffffff; }
.prm-menu-actif:hover { background: #4338ca; }
.prm-menu-btn svg { width: 18px; height: 18px; flex-shrink: 0; display: block; }
.prm-menu-btn      svg path, .prm-menu-btn      svg circle
  { fill: none; stroke: #475569; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round; }
.prm-menu-actif    svg path, .prm-menu-actif    svg circle { stroke: #ffffff; }

.prm-panneau { flex: 1; padding: 20px 24px; overflow-y: auto; min-width: 0; }
.prm-section[hidden] { display: none !important; }

.prm-section-titre {
  margin: 0 0 4px;
  font-size: 1.05rem; font-weight: 700; color: #0f172a;
}
.prm-section-intro {
  margin: 0 0 18px;
  font-size: .87rem; line-height: 1.5; color: #475569;
}

/* ────────────────────────────── Champs de saisie ────────────────────────── */

/* 07/09/2026 — CORRECTION LISIBILITÉ : seule classe de ce fichier sans
   couleur de texte explicite. Le fond de la page (tableau de bord) est
   sombre avec du texte blanc par défaut ; sur le fond BLANC de cette
   modale, un texte qui hérite du blanc devient invisible. Toutes les
   autres classes d'ici (.prm-aide, .prm-section-intro, .prm-titre…)
   déclarent déjà leur propre couleur pour cette même raison — celle-ci
   avait été oubliée. #334155 : contraste 10,4:1 sur #ffffff (voir l'en-tête
   de ce fichier), cohérent avec le texte de champ utilisé ailleurs ici. */
.prm-champ { margin-bottom: 16px; color: #334155; }
.prm-label {
  display: block; margin-bottom: 5px;
  font-size: .85rem; font-weight: 600; color: #334155;
}
.prm-aide {
  display: block; margin-top: 5px;
  font-size: .78rem; line-height: 1.45; color: #475569;
}
.prm-saisie, .prm-liste {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid #cbd5e1; border-radius: 10px;
  background: #ffffff;
  color: #0f172a; font-size: .92rem; font-family: inherit;
}
.prm-saisie:focus, .prm-liste:focus {
  outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, .18);
}
.prm-saisie[readonly] { background: #f1f5f9; color: #475569; cursor: not-allowed; }
.prm-duo { display: flex; gap: 12px; flex-wrap: wrap; }
.prm-duo > .prm-champ { flex: 1 1 200px; margin-bottom: 16px; }

/* 08/09/2026 — Case de consentement CGV avant paiement (voir parametres.js,
   construireActionsAbonnement). Même raison que .prm-champ ci-dessus :
   fond blanc de cette modale, donc couleur de texte explicite requise. */
.prm-cgv {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 4px 0 16px; padding: 10px 12px;
  background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 10px;
  cursor: pointer;
}
.prm-cgv input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; cursor: pointer;
}
.prm-cgv span {
  font-size: .82rem; line-height: 1.5; color: #334155;
}
.prm-cgv a { color: #4f46e5; font-weight: 600; }

/* ───────────────────────────── Interrupteurs ────────────────────────────── */

.prm-bascule {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; margin-bottom: 10px;
  border: 1px solid #e2e8f0; border-radius: 12px;
  cursor: pointer;
}
.prm-bascule:hover { background: #f8fafc; }
.prm-bascule input { margin: 3px 0 0; width: 18px; height: 18px; flex-shrink: 0;
                     accent-color: #4f46e5; cursor: pointer; }
.prm-bascule-txt   { min-width: 0; }
.prm-bascule-nom   { display: block; font-size: .9rem; font-weight: 600; color: #0f172a; }
.prm-bascule-desc  { display: block; margin-top: 2px;
                     font-size: .8rem; line-height: 1.45; color: #475569; }

/* ─────────────────────────────── Avatar ─────────────────────────────────── */

.prm-avatar-rangee { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.prm-avatar-apercu {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; flex-shrink: 0;
  border-radius: 50%;
  font-size: 1.5rem; font-weight: 700; color: #ffffff;
  background: #4f46e5;
}
.prm-avatar-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.prm-pastille {
  width: 34px; height: 34px; padding: 0;
  border: 2px solid transparent; border-radius: 50%;
  cursor: pointer; font-size: 1.05rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.prm-pastille:focus-visible { outline: 3px solid #0f172a; outline-offset: 2px; }
.prm-pastille-active { border-color: #0f172a; }
.prm-emoji { background: #f1f5f9; border: 2px solid #cbd5e1; }
.prm-emoji.prm-pastille-active { border-color: #0f172a; }

/* ─────────────────────────────── Pied de boîte ──────────────────────────── */

.prm-pied {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}
.prm-etat { flex: 1; min-width: 0; font-size: .84rem; line-height: 1.4; }
.prm-etat-ok     { color: #15803d; font-weight: 600; }
.prm-etat-erreur { color: #b91c1c; font-weight: 600; }
.prm-etat-attente{ color: #475569; }

.prm-bouton {
  padding: 10px 18px;
  border: 1px solid #cbd5e1; border-radius: 10px;
  background: #ffffff; color: #334155;
  font-size: .9rem; font-weight: 600; font-family: inherit; cursor: pointer;
}
.prm-bouton:hover { background: #f1f5f9; }
.prm-bouton:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }
.prm-bouton-primaire {
  border-color: #4f46e5; background: #4f46e5; color: #ffffff;
}
.prm-bouton-primaire:hover { background: #4338ca; border-color: #4338ca; }
.prm-bouton[disabled] { opacity: .55; cursor: not-allowed; }

.prm-lien {
  color: #4338ca; text-decoration: underline; font-size: .87rem; font-weight: 600;
}
.prm-lien:hover { color: #3730a3; }

/* ───────────────────────────── Petits écrans ────────────────────────────── */

@media (max-width: 700px) {
  .prm-corps { flex-direction: column; }
  .prm-menu  { width: auto; display: flex; gap: 6px; overflow-x: auto;
               border-right: none; border-bottom: 1px solid #e2e8f0; padding: 10px; }
  .prm-menu-btn { width: auto; margin-bottom: 0; white-space: nowrap; }
  .prm-panneau  { padding: 16px; }
}

/* ──────────────────────── Mouvement refusé par le système ───────────────── */

@media (prefers-reduced-motion: reduce) {
  .prm-voile, .prm-boite { animation: none; }
}
