/* Onglets Mon profil et Mon dossier, plus la modale. */

/* ---------- profil, en rangees denses ----------
   Un libelle a gauche, une valeur a droite. Les anciens panneaux en grille
   laissaient des cases vides et prenaient trois ecrans pour vingt champs. */

.reglages { display: flex; flex-direction: column; gap: 14px; }

.groupe {
  background: linear-gradient(168deg, var(--surf2), var(--surf) 65%);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.groupe-tete {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.groupe-tete h3 {
  font-family: var(--cond); font-weight: 800; font-size: 18px;
  letter-spacing: .05em; text-transform: uppercase; margin: 0;
}
.groupe-tete .src {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--txt3); background: rgba(255,255,255,.05); padding: 3px 9px; border-radius: 20px;
}

.rangee {
  display: grid; grid-template-columns: 210px 1fr; gap: 16px; align-items: center;
  padding: 9px 18px; border-bottom: 1px solid rgba(30,52,84,.5);
}
.rangee:last-child { border-bottom: 0; }
.rangee.large { align-items: start; }

.rangee .cle {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--txt3);
}
.pastille {
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
  flex: none; box-shadow: 0 0 0 3px rgba(55,229,240,.12);
}

.rangee .val { min-width: 0; font-size: 13.5px; }
.rangee .valeur { font-weight: 600; }
.rangee .vide-valeur { color: var(--txt3); }
.rangee .texte-long { margin: 0; line-height: 1.5; color: var(--txt2); font-size: 13px; }
.rangee .note { font-size: 11px; color: var(--txt3); margin-top: 3px; }

.rangee input, .rangee select, .rangee textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 7px;
  padding: 7px 10px; color: var(--txt); font-family: var(--ui); font-size: 13.5px;
}
.rangee textarea { resize: vertical; line-height: 1.45; }
.rangee input:focus, .rangee select:focus, .rangee textarea:focus {
  outline: 0; border-color: var(--gold);
}

.etiquettes { display: flex; flex-wrap: wrap; gap: 5px; }
.etiquette {
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 5px;
  background: rgba(55,229,240,.1); color: var(--gold); border: 1px solid rgba(55,229,240,.22);
}
.etiquette.no { background: rgba(255,92,122,.09); color: var(--bad); border-color: rgba(255,92,122,.22); }

.ed {
  margin-left: auto; background: transparent; border: 1px solid var(--line); color: var(--gold);
  border-radius: 7px; padding: 7px 16px; font-family: var(--ui); font-size: 12.5px;
  font-weight: 700; cursor: pointer;
}
.ed:hover { border-color: var(--line2); background: rgba(55,229,240,.07); }
.ed.actif { color: var(--ok); border-color: rgba(61,220,151,.4); }

/* Pendant l'ecriture, puis une seconde apres. C'est le bouton qui porte
   la reponse: c'est la que la personne vient de cliquer, donc c'est la
   qu'elle regarde. Un avis flottant ailleurs sur la page passe inapercu. */
.ed:disabled { opacity: .62; cursor: progress; }
.ed.fait {
  color: #06251A; background: var(--ok); border-color: var(--ok);
  animation: edFait .22s ease;
}
@keyframes edFait { from { transform: scale(.94); } to { transform: none; } }

@media (max-width: 700px) {
  .rangee { grid-template-columns: 1fr; gap: 5px; padding: 10px 14px; }
  .groupe-tete { padding: 11px 14px; }
  .sec .hint { display: none; }
}

/* ---------- jauge du dossier ---------- */

.jauge {
  background: linear-gradient(150deg, #17324F, #0E1C31); border: 1px solid var(--line);
  border-radius: 12px; padding: 19px 22px; margin-bottom: 16px; display: flex;
  align-items: center; gap: 22px; flex-wrap: wrap;
}
.jauge .txt { flex: 1; min-width: 230px; }
.jauge h3 { font-family: var(--cond); font-weight: 800; font-size: 23px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 4px; }
.jauge p { margin: 0; font-size: 13px; color: var(--txt2); line-height: 1.5; }
.jauge .sc { font-family: var(--cond); font-weight: 800; font-size: 44px; line-height: 1; flex: none; }
.jauge .sc small { font-size: 23px; color: var(--txt3); }
.barre { width: 100%; height: 7px; border-radius: 5px; background: rgba(255,255,255,.07); overflow: hidden; margin-top: 11px; }
.barre i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--line2), var(--gold)); transition: width .3s; }

/* ---------- tuiles du dossier ---------- */

.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 13px; margin-bottom: 26px; }
.cs {
  background: linear-gradient(168deg, var(--surf2), var(--surf) 65%); border: 1px solid var(--line);
  border-radius: 11px; padding: 17px; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 9px; position: relative; overflow: hidden;
}
.cs .ecu {
  width: 58px; height: 66px; position: relative; display: flex; align-items: center;
  justify-content: center; font-size: 24px; overflow: hidden;
  clip-path: polygon(50% 0, 100% 22%, 100% 74%, 50% 100%, 0 74%, 0 22%);
}
.cs.fourni .ecu   { background: linear-gradient(150deg, #3DDC97, #149B63); }
.cs.attente .ecu  { background: linear-gradient(150deg, #FFC24B, #C98A11); }
.cs.manquant .ecu { background: linear-gradient(150deg, #2E4A6E, #1A2C48); }
.cs .ecu img, .cs .ecu video { width: 100%; height: 100%; object-fit: cover; }

.cs h4 { font-family: var(--cond); font-weight: 800; font-size: 16.5px; letter-spacing: .04em; text-transform: uppercase; margin: 0; }

/* L'etiquette « Obligatoire » / « Recommandé » sur la tuile.

   Les trois pieces du haut partagent une grille et deux seulement ferment
   la porte. Sans marque sur la tuile elle-meme, il faut remonter lire
   l'en-tete de section pour savoir laquelle est laquelle, et personne ne
   remonte. L'ambre est deja la couleur du barrage des opportunites: le
   meme signal veut dire la meme chose partout. */
.cs h4 .tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 20px;
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  vertical-align: 2px;
  background: rgba(155, 174, 200, .14);
  color: var(--txt2);
}
.cs h4 .tag.obl { background: rgba(255, 194, 75, .16); color: var(--or, #FFC24B); }
.cs p { margin: 0; font-size: 11.5px; color: var(--txt3); line-height: 1.45; }
.cs .st { font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; }
.cs.fourni .st   { background: rgba(61,220,151,.13); color: var(--ok); }
.cs.attente .st  { background: rgba(255,194,75,.13); color: var(--warn); }
.cs.manquant .st { background: rgba(255,255,255,.05); color: var(--txt3); }
.cs .actions { display: flex; gap: 6px; width: 100%; margin-top: auto; }
.cs .b { width: 100%; }

/* ---------- tuiles de chiffres ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 11px; }
.st1 {
  background: linear-gradient(168deg, var(--surf2), var(--surf) 65%); border: 1px solid var(--line);
  border-radius: 11px; padding: 15px 17px;
}
.st1 .v { font-family: var(--cond); font-weight: 800; font-size: 31px; line-height: 1; }
.st1 .v.or { color: var(--gold); }
.st1 .v.or { color: var(--or2); }
.st1 .k { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--txt3); text-transform: uppercase; margin-top: 4px; }
.st1 .d { font-size: 11px; color: var(--txt3); margin-top: 6px; line-height: 1.4; }

/* ---------- modale ---------- */

dialog { border: 0; padding: 0; background: transparent; max-width: 560px; width: 93vw; }
dialog::backdrop { background: rgba(3,8,16,.88); }
.md { background: #101F36; border: 1px solid #26405F; border-radius: 14px; overflow: hidden; }
.mtop { background: linear-gradient(150deg, #17324F, #0F2038); padding: 20px 26px 17px; border-bottom: 1px solid var(--line); position: relative; }
.mtop::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent 70%); }
.mtop .lg4 { font-family: var(--cond); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.mtop h3 { font-family: var(--cond); font-weight: 800; font-size: 27px; text-transform: uppercase; letter-spacing: .02em; margin: 4px 0 0; line-height: 1.05; }
.mbody { padding: 22px 26px 24px; max-height: 68vh; overflow-y: auto; }

.qn {
  display: flex; align-items: center; gap: 9px; background: rgba(255,194,75,.08);
  border: 1px solid rgba(255,194,75,.22); border-radius: 8px; padding: 10px 13px;
  font-size: 13px; color: #D6E2F2; margin-bottom: 20px;
}
.qn b { color: var(--warn); font-family: var(--cond); font-size: 20px; line-height: 1; }

.q { margin-bottom: 16px; }
.q label { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: var(--txt); margin-bottom: 8px; }
.q label i {
  font-style: normal; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); color: #04222B; font-family: var(--cond); font-size: 14px;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
/* Les champs se posent sur un fond plus clair que la modale, pas plus sombre.
   Sur le quasi-noir d'origine, on ne distinguait plus le champ de son cadre
   et les questions semblaient flotter dans le vide. */
.q textarea, .q select, .q input {
  width: 100%; background: #16263F; border: 1px solid #2A4368; border-radius: 8px;
  padding: 11px 12px; color: var(--txt); font-family: var(--ui); font-size: 14px;
  resize: vertical; transition: border-color .15s, background .15s;
}
.q textarea::placeholder, .q input::placeholder { color: #7D93B3; }
.q textarea:hover, .q select:hover, .q input:hover { border-color: #37557F; }
.q textarea { min-height: 66px; }
.q textarea:focus, .q select:focus, .q input:focus { outline: 0; border-color: var(--gold); background: #1A2E4C; }
.q .h { font-size: 11.5px; color: #8FA5C2; margin-top: 6px; padding-left: 31px; }
.q .h.erreur { color: var(--bad); }
.mg { display: flex; gap: 9px; margin-top: 22px; }

/* ---------- camera et televersement ---------- */

.cam { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.cam video {
  width: 100%; max-width: 420px; aspect-ratio: 4/3; background: #000;
  border-radius: 10px; border: 1px solid var(--line); object-fit: cover;
}
.cam .chrono {
  font-family: var(--cond); font-weight: 800; font-size: 30px; letter-spacing: .04em;
  color: var(--txt);
}
.cam .chrono.enreg { color: var(--bad); }
.cam .chrono small { font-size: 13px; color: var(--txt3); font-weight: 600; }
.cam .cmds { display: flex; gap: 9px; width: 100%; max-width: 420px; }

.zone {
  border: 1px dashed var(--line); border-radius: 10px; padding: 26px 18px; text-align: center;
  color: var(--txt3); font-size: 13px; cursor: pointer; transition: .15s; line-height: 1.5;
}
.zone:hover, .zone.survol { border-color: var(--gold); color: var(--txt2); background: rgba(55,229,240,.04); }
.zone b { display: block; color: var(--txt); font-size: 14px; margin-bottom: 4px; }

.apercu { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.apercu img { max-width: 100%; max-height: 320px; border-radius: 10px; border: 1px solid var(--line); }
.apercu video, .apercu audio { width: 100%; max-width: 460px; border-radius: 10px; }
.apercu .info { font-size: 12px; color: var(--txt3); }

.consentement {
  display: flex; gap: 10px; align-items: flex-start; background: rgba(255,194,75,.07);
  border: 1px solid rgba(255,194,75,.24); border-radius: 8px; padding: 12px 14px;
  font-size: 12.5px; color: var(--txt2); line-height: 1.5; margin-bottom: 16px;
}
.consentement input { flex: none; margin-top: 2px; width: 16px; height: 16px; accent-color: var(--warn); }

.reference { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.reference:last-of-type { border-bottom: 0; }

/* ---------- elements de modale ---------- */

.mbody .intro { margin: 0 0 16px; color: var(--txt2); font-size: 13.5px; line-height: 1.55; }

.marche { margin: 0; padding-left: 20px; color: var(--txt2); font-size: 13px; line-height: 1.75; }
.marche li { padding-left: 3px; }
.marche b { color: var(--txt); }

.prompt {
  width: 100%; margin-top: 12px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 11px; color: var(--txt2); font-size: 11.5px; line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical;
}

.cs .meta { font-size: 10.5px; color: var(--txt3); }

/* ---------------------------------------------------------------- cases
   « Ce que je cherche » et « Ce que je refuse » etaient du texte libre que
   personne ne remplissait. En cases, la reponse se donne au pouce, et
   l'etat coche doit se voir d'un coup d'oeil sans lire: c'est la couleur
   qui porte l'information, pas la petite coche du systeme.            */
.cases { display: flex; flex-wrap: wrap; gap: 6px; }
.case {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent;
  font-size: 12.5px; line-height: 1.2; color: var(--txt2);
  transition: border-color .12s, background .12s, color .12s;
}
.case:hover { border-color: var(--line2); }
.case input { width: 14px; height: 14px; margin: 0; accent-color: var(--gold); flex: none; }
.case:has(input:checked) {
  background: rgba(55,229,240,.1); border-color: rgba(55,229,240,.4); color: var(--gold);
}
.case.no input { accent-color: var(--bad); }
.case.no:hover { border-color: rgba(255,92,122,.45); }
.case.no:has(input:checked) {
  background: rgba(255,92,122,.09); border-color: rgba(255,92,122,.4); color: var(--bad);
}

/* Le texte qui suit un titre de section. « hint » tient sur une ligne a
   cote du titre; celui-ci porte une phrase entiere et a besoin de sa
   propre ligne. */
.expli {
  margin: -6px 0 14px; max-width: 70ch;
  font-size: 13px; line-height: 1.5; color: var(--txt3);
}

/* Le mot sous les deux boutons de la video. Il porte une information que
   les boutons ne peuvent pas dire: que les deux chemins se valent, et
   pourquoi filmer avec son telephone donne souvent mieux. C'est la piece
   qui bloque le plus de monde, alors elle a droit a une phrase de plus. */
.mbody .sous-mg {
  margin: 11px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--txt3);
}

/* L'attente pendant le reencodage de la video.
 *
 * Plein ecran et par dessus tout: pendant qu'on encode, aucun autre geste
 * n'a de sens, et un panneau discret dans un coin laisserait la personne
 * cliquer ailleurs puis conclure que rien ne se passe. */
.compress {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 7, 20, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.compress-boite {
  width: 100%;
  max-width: 420px;
  padding: 26px 24px 22px;
  border-radius: 12px;
  background: var(--surf);
  border: 1px solid var(--line);
  text-align: center;
}
.compress-txt { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.compress-txt strong {
  font-family: var(--cond);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -.01em;
}
.compress-txt span { font-size: 14px; line-height: 1.5; color: var(--txt2); }

.compress-jauge {
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surf2);
  margin-bottom: 10px;
}
.compress-jauge i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--line2), var(--gold));
  transition: width .25s ease;
}
.compress b {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--txt3);
  font-variant-numeric: tabular-nums;
}
