/* ============================================================
   profil.html — le profil d'un organisateur connecté
   Refonte du 26 octobre 2026 d'après maquettes-site/14-profil-*.
   Le titre « Profil », la carte d'en-tête (image de fond, photo,
   structure, nom et mois de création du compte, lien vers la page
   publique), puis quatre blocs qui s'enregistrent chacun à part :
   Votre page publique ; Vous ; Paiement (le numéro affiché, la saisie
   ouverte sur place) ; Mot de passe (idem). Puis « Se déconnecter » et
   « Supprimer mon compte », bloc à bordure rouge sur le fond bleu, et
   sa confirmation dans un <dialog>.
   Sur ordinateur : à gauche le titre, les ancres des rubriques et
   « Se déconnecter » ; à droite l'en-tête puis les blocs en grille.

   Les composants viennent d'orga.css (.o-carte, .o-champ, .o-saisie…).
   .champ reste sur chaque bloc de champ, car compte.js y pose les
   erreurs : cette feuille neutralise dans les cartes ce que style.css
   lui donne sur le bleu (libellé en Bungee, bord jaune du champ).
   Contrastes mesurés :
     - bleu #1C2B8F sur papier #FBF3DF : 10,60 ; sur #F3E7C4 : 9,6 ;
     - #2B3570 sur papier : 10,29 ;
     - papier sur bleu : 10,60 ; #E4E7FA sur bleu : 9,1 ;
     - jaune #F6C230 sur bleu : 7,08 ; brume #C9CEF0 sur bleu : 7,6.
   Le rouge ne porte aucun texte : bordure du bloc de suppression et
   du bouton seulement.
   ============================================================ */

section.pf-page{padding-block:22px 40px}
.pf-contenu{display:flex; flex-direction:column; gap:20px}
.pf-cote{display:flex; flex-direction:column; gap:22px}
.pf-titre{color:var(--lb-papier); font-size:30px}
.pf-sous-titre{margin-top:6px; color:#E4E7FA}
.pf-ancres, .pf-sortie--cote{display:none}
.pf-blocs{display:flex; flex-direction:column; gap:20px; min-width:0}
.pf-formulaires, .pf-colonne{display:flex; flex-direction:column; gap:20px; min-width:0}
.pf-contenu[hidden], .pf-contenu [hidden], .profil-dialogue [hidden]{display:none}

/* ---------- La carte d'en-tête ---------- */
.pf-tete{padding:0; overflow:hidden}
.pf-tete__fond{
  position:relative; height:150px; background:var(--lb-bleu) center / cover no-repeat;
  border-bottom:3px solid var(--lb-bleu);
}
.pf-tete__avatar{
  position:absolute; left:18px; bottom:-42px; width:84px; height:84px; box-sizing:border-box;
  border-radius:50%; border:4px solid var(--lb-papier); overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  background:var(--lb-jaune); color:var(--lb-bleu);
  font-family:var(--titre); font-size:28px;
}
.pf-tete__avatar img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; background:var(--lb-papier)}
.pf-tete__corps{
  padding:56px 18px 18px; display:flex; flex-wrap:wrap; align-items:flex-end;
  justify-content:space-between; gap:12px;
}
.pf-tete__noms{min-width:0; overflow-wrap:anywhere}
.pf-tete__structure{margin:0; font-family:var(--titre); font-size:22px; line-height:1.1; text-transform:uppercase; color:var(--lb-bleu)}
.pf-tete__qui{margin:4px 0 0; font-size:14px; color:var(--lb-bleu-doux)}
.pf-tete__qui:empty{display:none}
.pf-tete__lien{
  display:inline-flex; align-items:center; gap:6px; min-height:44px;
  font-weight:800; font-size:14px; color:var(--lb-bleu);
}
.pf-tete__lien svg{width:16px; height:16px; flex:none}
.pf-tete__lien:focus-visible{outline:3px solid var(--lb-bleu); outline-offset:3px}

/* ---------- Les blocs ---------- */
.profil-form{margin:0}
.pf-carte{display:flex; flex-direction:column; gap:18px}
.pf-carte .o-bloc-tete{margin-bottom:0}
.pf-carte .o-champ, .pf-carte .o-duo > .o-champ{margin:0}
.pf-carte .o-aide{margin:0}
/* Le libellé d'orga.css, contre .champ label (Bungee, capitales). */
.page-bleue .pf-carte .o-champ .o-label{font-family:var(--lb-font-texte); font-weight:800; font-size:15px; text-transform:none; letter-spacing:0; color:var(--lb-bleu)}
/* Le champ dans son enveloppe .o-saisie : sans bord ni fond propres,
   quoi qu'en dise .page-bleue .champ. */
.page-bleue .pf-carte .o-champ .o-saisie :is(input, textarea){
  width:auto; flex:1; min-width:0; min-height:48px; padding:0; margin:0;
  border:0; border-radius:0; background:transparent; color:var(--lb-bleu); box-shadow:none;
}
.page-bleue .pf-carte .o-champ .o-saisie :is(input, textarea):is(:focus, :focus-within){outline:0}
.page-bleue .pf-carte .o-saisie:focus-within{outline:3px solid var(--lb-bleu); outline-offset:3px}
.pf-zone-texte{align-items:flex-start; padding:12px 14px}
.page-bleue .pf-carte .o-champ .pf-zone-texte textarea{min-height:76px; line-height:1.5; resize:vertical}
/* L'erreur sous son champ, dans la carte : bleu gras (10,60). */
.page-bleue .pf-carte .champ .erreur{margin:0; color:var(--lb-bleu); font-size:14px; font-weight:700}
/* Les boutons d'une carte : bleus, ou à contour bleu. */
.page-bleue .pf-carte .btn{--bg:var(--lb-bleu); --fg:var(--lb-papier); --bord:var(--lb-bleu)}
.page-bleue .pf-carte .btn--contour{--bg:transparent; --fg:var(--lb-bleu); --bord:var(--lb-bleu)}
.pf-carte .btn svg, .pf-sortie .btn svg, .pf-suppr-bouton svg{width:18px; height:18px; flex:none}
/* Le mot de passe et son bouton Afficher, sur une ligne. */
.page-bleue .pf-carte .mdp-ligne{display:flex; gap:10px; align-items:stretch}
.pf-carte .mdp-ligne .o-saisie{flex:1; min-width:0}

.profil-envoi{display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; margin:0}
/* La confirmation : elle ne prend aucune place tant qu'elle est vide. */
.profil-confirmation{font-weight:700; color:var(--lb-bleu)}
.profil-confirmation:empty{display:none}

/* ---------- L'image de fond : vignette, « Changer l'image », « Retirer » ---------- */
.profil-fond-choix{gap:8px}
.pf-fond-ligne{display:flex; gap:12px; align-items:center; flex-wrap:wrap}
.profil-fond-choix__apercu{
  position:relative; flex:none; width:120px; height:64px; overflow:hidden;
  border:2.5px solid var(--lb-bleu); border-radius:8px; background:var(--lb-bleu);
}
.profil-fond-choix__apercu img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block}
.profil-photo__boutons{display:flex; flex-direction:column; align-items:flex-start; gap:2px}
.pf-puce{
  display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 14px; box-sizing:border-box;
  border:2.5px solid var(--lb-bleu); border-radius:999px; background:#FFFDF7; color:var(--lb-bleu);
  font:inherit; font-weight:700; font-size:14px; white-space:nowrap; cursor:pointer;
}
.pf-puce svg{width:16px; height:16px; flex:none}
.pf-puce:hover{background:var(--lb-papier)}
.pf-lien{
  min-height:44px; padding:0; border:0; background:transparent; cursor:pointer;
  font:inherit; font-size:14px; font-weight:700; color:var(--lb-bleu-doux);
  text-decoration:underline; text-underline-offset:3px;
}
:is(.pf-puce, .pf-lien):focus-visible{outline:3px solid var(--lb-bleu); outline-offset:3px}
.profil-fond-choix .profil-confirmation{display:block}

/* ---------- Paiement : le numéro affiché ---------- */
.pf-wave{display:flex; align-items:center; gap:14px; padding:14px; border-radius:12px; background:#F3E7C4}
.pf-wave__icone{
  flex:0 0 44px; width:44px; height:44px; border-radius:10px; background:var(--lb-bleu); color:var(--lb-jaune);
  display:flex; align-items:center; justify-content:center;
}
.pf-wave__icone svg{width:22px; height:22px}
.pf-wave__texte{flex:1; min-width:0}
.pf-wave__etiquette{margin:0; font-family:var(--lb-font-info); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color:var(--lb-bleu-doux)}
.pf-wave__numero{margin:3px 0 0; font-family:var(--lb-font-info); font-weight:700; letter-spacing:.04em; font-size:17px; color:var(--lb-bleu)}
.pf-ouvrir{align-self:flex-start}

/* ---------- Mot de passe : la ligne de points ---------- */
/* Les points et « Changer » passent sur deux lignes quand la carte est
   étroite (deux cartes côte à côte, vers 901 px) : jamais hors de la carte. */
.pf-mdp-ligne{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px}
.pf-points{font-family:var(--lb-font-info); font-weight:700; font-size:18px; letter-spacing:.2em; color:var(--lb-bleu)}

/* La saisie ouverte sur place (Wave, mot de passe). */
.pf-zone{display:flex; flex-direction:column; gap:16px; padding-top:16px; border-top:2px dashed #E3D6B4}
.pf-zone__actions{display:flex; flex-wrap:wrap; gap:12px; margin:0}

/* ---------- Se déconnecter ---------- */
.pf-sortie .btn svg{width:18px; height:18px}

/* ---------- Supprimer mon compte ----------
   Bloc à bordure rouge sur le fond bleu : texte papier pâle (9,1),
   liens jaunes (7,08), dates en brume (7,6). <section> porte
   padding-block:var(--rythme) dans style.css : il est remis ici. */
.profil-suppr{
  display:flex; flex-direction:column; gap:12px;
  padding:20px 18px; border:2.5px solid var(--lb-rouge); border-radius:14px;
}
.profil-suppr h2{margin:0; font-family:var(--titre); font-weight:400; font-size:19px; text-transform:uppercase; color:var(--lb-papier)}
#suppr-etat{display:flex; flex-direction:column; align-items:flex-start; gap:12px}
#suppr-etat p{margin:0; line-height:1.5; color:#E4E7FA; max-width:60ch}
.profil-suppr__fetes{margin:0; padding-left:18px; overflow-wrap:anywhere} /* titres saisis */
.profil-suppr__fetes li{padding:2px 0; color:var(--lb-papier)}
.profil-suppr__fetes a{
  display:inline-flex; align-items:center; min-height:44px;
  color:var(--lb-jaune); font-weight:700; text-decoration:underline; text-underline-offset:4px;
}
.profil-suppr__fetes a:focus-visible{outline:3px solid var(--lb-jaune); outline-offset:2px}
.profil-suppr__date{color:var(--brume, #C9CEF0)}
.pf-suppr-bouton{white-space:normal; text-align:center}

/* ---------- La confirmation, dans un <dialog> ----------
   Une carte papier (.encart, surface de style.css) posée sur un voile
   bleu : texte et boutons bleus (10,60). */
.profil-dialogue{
  width:min(560px, calc(100% - 32px)); max-width:none; max-height:calc(100% - 32px);
  margin:auto; padding:0; border:0; background:transparent; overflow:auto;
}
.profil-dialogue::backdrop{background:color-mix(in srgb, var(--lb-bleu) 80%, transparent)}
.profil-dialogue .encart{border:3px solid var(--lb-bleu); border-radius:12px; box-shadow:0 5px 0 var(--lb-rouge)}
.profil-dialogue h2{font-size:clamp(20px,3vw,26px); color:var(--ink)}
.profil-dialogue p{margin-top:10px}
.profil-suppr__liste{margin:14px 0 18px; padding-left:20px}
.profil-suppr__liste li{margin-top:8px}
.profil-suppr__liste .profil-suppr__fetes{padding-left:18px}
.profil-suppr__liste .profil-suppr__fetes li{color:inherit}
.profil-dialogue__actions{display:flex; flex-wrap:wrap; gap:12px; margin-top:22px}
.profil-dialogue__actions .btn{white-space:normal; text-align:center; max-width:100%}

/* La page après la suppression. */
.profil-supprime .compte-envoi{margin-top:26px}
.profil-supprime .o-titre{color:var(--lb-papier)}

/* ---------- Ordinateur ---------- */
@media (min-width:901px){
  section.pf-page{padding-block:44px 72px}
  .pf-grille{max-width:1200px; padding-inline:32px}
  .pf-contenu{display:grid; grid-template-columns:260px minmax(0, 1fr); gap:48px; align-items:start}
  .pf-cote{position:sticky; top:96px}
  .pf-titre{font-size:40px}
  .pf-sous-titre{margin-top:8px}
  .pf-ancres{display:flex; flex-direction:column; gap:4px}
  .pf-ancres a{
    display:flex; align-items:center; min-height:44px; padding:0 14px; border-radius:10px;
    font-weight:700; text-decoration:none; color:var(--lb-papier);
  }
  .pf-ancres a:hover, .pf-ancres a[aria-current="true"]{background:var(--lb-papier); color:var(--lb-bleu)}
  .pf-ancres a:focus-visible{outline:3px solid var(--lb-jaune); outline-offset:2px}
  .pf-sortie--cote{display:block; border-top:1px solid rgba(251,243,223,.25); padding-top:18px}
  .pf-sortie--bas{display:none}
  .pf-blocs{gap:22px; max-width:760px}
  .pf-formulaires{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:22px; align-items:start}
  .pf-large{grid-column:1 / -1}
  .pf-colonne{gap:22px}
  .pf-tete__fond{height:200px}
  .pf-tete__avatar{width:110px; height:110px; bottom:-55px; font-size:34px}
  .pf-tete__corps{padding:69px 18px 18px}
  .pf-carte{padding:20px 18px}
  /* Une ancre ne cache pas le haut de son bloc sous l'en-tête. */
  .pf-carte, .profil-suppr{scroll-margin-top:100px}
}
/* Les chiffres publics, sous le nom : le nombre en gras, bleu sur papier. */
.pf-tete__chiffres{margin:8px 0 0; display:flex; flex-wrap:wrap; gap:4px 16px; font-size:14px}
.pf-tete__chiffres:empty{display:none}
.pf-tete__chiffres b{font-weight:800}
