/* MyExperiGo – identité visuelle : seul fichier où sont définies les couleurs et les polices.
   Règle : jamais de texte doré ou argenté de petite taille sur fond blanc (utiliser --or-fonce ou --violet).
   Seules les couleurs du logo sont autorisées ; unique exception : le rouge --erreur, réservé aux messages
   d'erreur et aux boutons de suppression. */
/* Polices hébergées sur le site (aucune requête vers Google) : Poppins et Manrope, licence SIL OFL 1.1.
   Voir static/fonts/LICENCE.txt. Sous-ensembles latin et latin-ext (français et noms africains). */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/poppins-500-latin-ext.1f24684cbd72.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/poppins-600-latin-ext.a575b6d9df98.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/poppins-700-latin-ext.367d2aa05bf0.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/manrope-400-700-latin-ext.6d36d5bdedfa.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/poppins-500-latin.a09f2fccfee3.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/poppins-600-latin.72993dddf88a.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/poppins-700-latin.25b0e113ca7c.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/manrope-400-700-latin.938c6e8019b6.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Palette de marque */
  --violet: #4B0082;        /* principale : boutons, titres, liens, menu actif */
  --violet-clair: #EFE6F7;  /* fonds teintés : étiquettes, survols, encarts */
  --or: #D4AF37;            /* accents, barres, contours de focus, éléments sur fond foncé */
  --or-fonce: #8A6A12;      /* texte doré sur fond clair (5,1:1 sur blanc, 4,6:1 sur --or-clair : WCAG AA) */
  --or-clair: #FBF3DC;      /* fond des badges et avertissements dorés */
  --argent: #C0C0C0;        /* bordures des champs */
  --argent-clair: #E4E4EC;  /* bordures des cartes, fonds secondaires, texte sur fond foncé */
  --nuit: #1E0636;          /* fonds foncés, pied de page, survol des boutons */
  --aubergine: #5E2A6B;     /* dégradés des images de démonstration uniquement */

  /* Exception : erreurs et suppression */
  --erreur: #B3261E;
  --erreur-fond: #FBEDEC;

  /* Neutres légèrement violacés */
  --fond: #F7F5FA;
  --texte: #1F1A28;
  --gris: #5F5870;
  --bord: var(--argent-clair);
  --survol: var(--violet-clair);

  /* Polices */
  --police-titre: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --police-texte: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Icônes des boutons secondaires (masques SVG, couleur = celle du texte) */
  --ico-defaut: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
  --ico-modifier: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E");
  --ico-supprimer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E");
  --ico-annuler: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
  --ico-retour: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 6l-6 6 6 6'/%3E%3C/svg%3E");
  --ico-enregistrer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
  --ico-voir: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  --ico-relancer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 10-2 6M20 5v6h-6'/%3E%3C/svg%3E");
}

/* Logo : hauteur fixe, largeur automatique, jamais déformé */
.logo-img { height: 36px; width: auto; display: block; }
.logo-symbole { height: 32px; width: auto; display: none; }
.logo-auth { text-align: center; margin: 8px 0 22px; }
.logo-auth img { height: 56px; width: auto; display: inline-block; }
@media (max-width: 899px) {
  .logo-img { display: none; }
  .logo-symbole { display: block; }
}

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--violet); color: #fff;
  border: 1px solid var(--violet); border-radius: 8px; padding: 8px 16px; cursor: pointer; text-decoration: none;
  font: inherit; font-size: .95rem; font-weight: 500; line-height: 1.3; max-width: 100%;
  transition: background-color .15s, border-color .15s, color .15s; }
@media (hover: hover) { .btn:hover { background: var(--nuit); border-color: var(--nuit); } }
.btn.principal { box-shadow: inset 0 -3px 0 var(--or); }
.btn.petit { padding: 4px 10px; font-size: .85rem; }

/* Bouton secondaire : même style partout, avec une icône (jamais le style du navigateur) */
.btn.gris, .btn.secondaire { background: #fff; color: var(--violet); border: 1px solid var(--argent); }
@media (hover: hover) { .btn.gris:hover, .btn.secondaire:hover { background: var(--violet-clair); border-color: var(--violet); color: var(--violet); } }
.btn.gris::before, .btn.secondaire::before { content: ""; width: 1em; height: 1em; flex: none; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; --ico: var(--ico-defaut); }
.btn.ico-modifier::before { --ico: var(--ico-modifier); }
.btn.ico-supprimer::before { --ico: var(--ico-supprimer); }
.btn.ico-annuler::before { --ico: var(--ico-annuler); }
.btn.ico-retour::before { --ico: var(--ico-retour); }
.btn.ico-enregistrer::before { --ico: var(--ico-enregistrer); }
.btn.ico-voir::before { --ico: var(--ico-voir); }
.btn.ico-relancer::before { --ico: var(--ico-relancer); }
.btn.avec-icone::before { display: none; }          /* icône déjà fournie en <svg> */

/* Suppression : seule exception rouge avec les erreurs */
.btn.danger { background: var(--erreur); border-color: var(--erreur); color: #fff; box-shadow: none; }
@media (hover: hover) { .btn.danger:hover { background: #8e1d17; border-color: #8e1d17; } }
.btn.gris.danger, .btn.secondaire.danger, .btn.ico-supprimer { background: #fff; color: var(--erreur); border-color: var(--erreur); }
@media (hover: hover) { .btn.gris.danger:hover, .btn.secondaire.danger:hover, .btn.ico-supprimer:hover { background: var(--erreur-fond); color: var(--erreur); border-color: var(--erreur); } }
.btn.danger.plein { background: var(--erreur); color: #fff; }

/* ---------- Badges et étiquettes ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .8rem; background: var(--violet-clair); color: var(--violet); margin: 2px; }
.badge.preuves, .badge.ok { background: var(--or-clair); color: var(--or-fonce); font-weight: 600; }
.badge.a-valider { background: var(--or-clair); color: var(--or-fonce); font-weight: 600; border: 1px solid var(--or); }
.tag { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: .78rem; background: var(--violet-clair); color: var(--violet); }
.pastille.publique { background: var(--violet); color: #fff; }
.pastille.privee { background: var(--argent-clair); color: var(--gris); }
.pastille.relire { background: var(--or-clair); color: var(--or-fonce); }

/* ---------- Messages ---------- */
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: var(--violet-clair); border-left: 4px solid var(--violet); }
.msg.warning { background: var(--or-clair); border-left-color: var(--or); }
.msg.error { background: var(--erreur-fond); border-left-color: var(--erreur); }
.encart-or { background: var(--or-clair); border: 1px solid var(--or); border-radius: 8px; padding: 8px 12px; font-size: .92rem; margin: 8px 0; }
.encart-violet { background: var(--violet-clair); border: 1px solid var(--argent); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.encart-erreur { background: var(--erreur-fond); border: 1px solid var(--erreur); border-radius: 8px; padding: 8px 12px; font-size: .92rem; margin: 8px 0; }

/* ---------- Cartes cliquables ---------- */
.carte-lien, .carte-r { position: relative; background: #fff; border: 1px solid var(--argent-clair); border-radius: 14px;
  box-shadow: 0 1px 3px rgba(30, 6, 54, .06); color: inherit; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.carte-lien::before, .carte-r::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 4px;
  border-radius: 14px 0 0 14px; background: var(--or); opacity: 0; transform: scaleY(.5);
  transition: opacity .18s ease, transform .18s ease; pointer-events: none; z-index: 1; }
.carte-lien:hover, .carte-lien:focus-visible, .carte-r:hover, .carte-r:focus-within {
  transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30, 6, 54, .14); border-color: var(--violet); }
.carte-lien:hover::before, .carte-lien:focus-visible::before, .carte-r:hover::before, .carte-r:focus-within::before { opacity: 1; transform: none; }
.carte-lien:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }
.carte-lien .fleche { position: absolute; right: 16px; top: 50%; margin-top: -.75em; font-size: 1.5rem; line-height: 1.5;
  color: var(--violet); transition: transform .18s ease; }
.carte-lien:hover .fleche, .carte-lien:focus-visible .fleche { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
  .carte-lien, .carte-r, .carte-lien::before, .carte-r::before, .carte-lien .fleche { transition: none; }
  .carte-lien:hover, .carte-lien:focus-visible, .carte-r:hover, .carte-r:focus-within { transform: none; }
  .carte-lien:hover .fleche, .carte-lien:focus-visible .fleche { transform: none; }
}

/* ---------- Mon carnet ---------- */
.barre-recherche { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: center;
  background: #fff; border: 1px solid var(--argent-clair); border-radius: 14px; padding: 10px; margin: 0 0 18px; }
.barre-recherche input, .barre-recherche select { width: 100%; min-width: 0; padding: 7px 9px; font-size: .92rem; }
.barre-recherche .actions { display: flex; gap: 6px; }
@media (max-width: 899px) { .barre-recherche { grid-template-columns: 1fr 1fr; } .barre-recherche .champ-q { grid-column: 1 / -1; } }
@media (max-width: 520px) { .barre-recherche { grid-template-columns: 1fr; } }
.mois-titre { display: flex; align-items: center; gap: 12px; margin: 26px 0 12px; font-size: .95rem; font-weight: 600;
  color: var(--gris); text-transform: capitalize; font-family: var(--police-titre); }
.mois-titre::after { content: ""; flex: 1; height: 1px; background: var(--argent-clair); }
.fiche { display: block; padding: 14px 44px 14px 20px; margin-bottom: 12px; }
.fiche strong { overflow-wrap: anywhere; }
.fiche-entete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.fiche-meta { margin-top: 2px; }
.fiche-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- Crédits ---------- */
.solde-credits.vide { border-color: var(--or); background: var(--or-clair); color: var(--or-fonce); }
header a.solde-credits.vide { color: var(--or-fonce); }
.solde-credits.vide:hover { background: var(--or); color: var(--nuit); }

/* ---------- Portfolio : grille et cartes (page privée et page publique) ---------- */
.grille-portfolio { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: stretch; width: 100%; max-width: 100%; margin: 0 0 8px; }
@media (min-width: 600px) { .grille-portfolio { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grille-portfolio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grille-portfolio > * { min-width: 0; }
.carte-r { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.carte-r:has(.etire:focus-visible) { outline: 3px solid var(--or); outline-offset: 3px; }
.carte-r .etire:focus-visible { outline: none; }
.carte-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 13px 13px 0 0; background: var(--violet-clair); }
.carte-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.carte-r:hover .carte-media img, .carte-r:focus-within .carte-media img { transform: scale(1.03); }
.carte-media.sans-couverture { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--violet), var(--aubergine)); }
.carte-media .initiale { font-family: var(--police-titre); font-weight: 700; font-size: 3rem; line-height: 1; color: var(--argent); user-select: none; }
.carte-media .sans-image { position: absolute; left: 8px; bottom: 8px; padding: 1px 8px; border-radius: 20px; font-size: .72rem;
  background: rgba(30, 6, 54, .55); color: var(--argent-clair); }
.carte-corps { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 12px; min-width: 0; }
.carte-corps h2 { margin: 0; font-size: 1.05rem; line-height: 1.3; color: var(--violet); overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.carte-corps h2 a { color: inherit; text-decoration: none; }
.etire::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.carte-meta { color: var(--gris); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-meta:empty { display: none; }
.carte-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.carte-tags:empty { display: none; }
.carte-tags .tag { margin: 0; }
.carte-pied { display: flex; justify-content: flex-end; padding: 0 10px 10px; pointer-events: none; }
.carte-pied > * { pointer-events: auto; }
.resume-portfolio { margin: 4px 0 20px; color: var(--gris); font-size: .92rem; }
.etat-vide { text-align: center; padding: 36px 20px; }
.etat-vide .motif { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--violet), var(--aubergine)); color: var(--argent); }
.etat-vide .motif svg { width: 30px; height: 30px; }
.etat-vide h2 { margin: 0 0 6px; font-size: 1.25rem; }
.etat-vide p { max-width: 460px; margin: 0 auto 18px; color: var(--gris); }
@media (prefers-reduced-motion: reduce) {
  .carte-media img { transition: none; }
  .carte-r:hover .carte-media img, .carte-r:focus-within .carte-media img { transform: none; }
}

/* ---------- Lettres de motivation ---------- */
.choix { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.choix legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.choix-option { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 4px 0; }
.choix-option input { width: auto; }
.a-personnaliser { background: var(--or-clair); color: var(--or-fonce); font-weight: 600; border-bottom: 1px dashed var(--or);
  border-radius: 3px; padding: 0 3px; }

/* ---------- Action longue en cours : le bouton lui-même change (grisé, animation à gauche, texte = action), ligne discrète dessous ---------- */
button.en-cours, .btn.en-cours { background: var(--argent-clair); color: var(--nuit); border-color: var(--argent); opacity: 1;
  cursor: progress; pointer-events: none; display: inline-flex; align-items: center; gap: 10px; }
button.en-cours .rond { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--argent);
  border-top-color: var(--violet); animation: patienter-tour 0.9s linear infinite; }
@keyframes patienter-tour { to { transform: rotate(360deg); } }
.patienter-note { display: block; flex-basis: 100%; margin: 6px 0 0; font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { button.en-cours .rond { animation: none; border-top-color: var(--nuit); } }

/* ---------- Cases à cocher et boutons radio : case À GAUCHE, sur la même ligne que son texte, toute la ligne cliquable
   (zone tactile d'au moins 44 px). Règle générale pour tout le site : le style `input { width: 100% }` ne s'applique
   jamais à une case, sinon elle s'étire et le texte passe dessous sur téléphone. ---------- */
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; min-width: 22px; flex: none; margin: 0;
  padding: 0; accent-color: var(--violet); cursor: pointer; }
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]), .liste-cases label, label.coche, label.case,
label.choix-option, .coche, .case {
  display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 0; padding: 6px 0; font-weight: 400;
  line-height: 1.35; cursor: pointer; }
.coche > label, .case > label { margin: 0; flex: 1; display: block; cursor: pointer; align-self: stretch;
  display: flex; align-items: center; }
.liste-cases > div { margin: 0; }
td input[type="checkbox"] { margin: 10px; }

/* Téléphone : sélecteur de pays puis numéro, sur une seule ligne (sous l'un l'autre seulement sur très petit écran) */
.tel-groupe { border: 0; margin: 12px 0 0; padding: 0; min-width: 0; }
.tel-groupe legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.tel-ligne { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: 8px; }
@media (max-width: 380px) { .tel-ligne { grid-template-columns: 1fr; } }

/* ---------- Encadré « Relisez attentivement avant d'envoyer » (documents rédigés avec l'aide de l'IA) ---------- */
.relire { display: flex; align-items: center; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin: 0 0 12px;
  padding: 8px 14px; background: var(--or-clair); border: 1px solid var(--or); border-left-width: 5px; border-radius: 10px; }
.relire p { margin: 0; flex: 0 1 auto; }
.relire-plus summary { cursor: pointer; display: inline-block; min-height: 24px; text-decoration: underline; color: var(--violet); font-size: .9rem; }
.relire-plus[open] { flex-basis: 100%; }
.relire-plus[open] p { margin-top: 6px; font-size: .92rem; }
@media print { .relire { display: none !important; } }

/* Zones repliables « bouton » (couleurs et police, modèle de CV) */
.personnaliser { margin: 0 0 14px; }
.personnaliser-titre { margin: 0 0 2px; font-size: 1.1rem; color: var(--violet); }
.personnaliser-aide { margin: 0 0 10px; font-size: .88rem; }
details.zone-bouton { margin: 0 0 10px; padding: 0; }
details.zone-bouton > summary { display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; min-height: 48px;
  padding: 10px 14px; cursor: pointer; list-style: none; background: var(--violet-clair); border: 1px solid var(--violet); border-radius: 10px;
  color: var(--violet); font-weight: 600; }
details.zone-bouton > summary::-webkit-details-marker { display: none; }
details.zone-bouton > summary:hover { background: var(--argent-clair); }
details.zone-bouton > summary:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
details.zone-bouton .zone-ico { flex: none; }
details.zone-bouton .zone-libelle { flex: 1; min-width: 0; }
details.zone-bouton .zone-fleche { flex: none; font-size: 1.2rem; line-height: 1; transition: transform .2s ease; }
details.zone-bouton[open] > summary .zone-fleche { transform: rotate(180deg); }
details.zone-bouton[open] > summary { border-radius: 10px 10px 0 0; }
details.zone-bouton > :not(summary) { margin-left: 14px; margin-right: 14px; }
details.zone-bouton > :last-child { margin-bottom: 14px; }
.option-palette:has(input:checked) { border: 2px solid var(--violet) !important; background: var(--violet-clair); font-weight: 600 !important; }
@media (prefers-reduced-motion: reduce) { details.zone-bouton .zone-fleche { transition: none; } }

/* Page de détail d'un document : lien retour, actions, menus, remarques, suppression discrète */
.lien-retour { margin: 0 0 6px; font-size: .95rem; }
.lien-retour a { display: inline-block; padding: 8px 0; }
.actions-doc { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; margin: 0 0 12px; }
.actions-doc > .btn, .actions-doc .menu-action > summary { min-height: 44px; box-sizing: border-box; }
.menu-action { position: relative; }
.menu-action > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.menu-action > summary::-webkit-details-marker { display: none; }
.menu-action[open] > summary span[aria-hidden] { display: inline-block; transform: rotate(180deg); }
.menu-liste { position: absolute; z-index: 20; left: 0; top: calc(100% + 4px); min-width: 230px; max-width: calc(100vw - 32px); background: #fff;
  border: 1px solid var(--violet); border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.15); overflow: hidden; }
.menu-liste a, .menu-liste button { display: flex; align-items: center; width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 14px; margin: 0;
  background: none; border: 0; border-radius: 0; text-align: left; font: inherit; font-weight: 600; color: var(--violet); text-decoration: none; cursor: pointer; }
.menu-liste a:hover, .menu-liste button:hover, .menu-liste a:focus-visible, .menu-liste button:focus-visible { background: var(--violet-clair); outline: none; }
.menu-liste form { margin: 0; }
.menu-liste > * + * { border-top: 1px solid var(--argent-clair); }
/* Téléphone : le menu s'ouvre sous la rangée d'actions, sur toute la largeur de l'écran (jamais coupé à gauche ni à droite) */
@media (max-width: 600px) {
  .actions-doc { position: relative; }
  .menu-action { position: static; }
  .menu-liste { left: 0; right: 0; min-width: 0; max-width: none; width: auto; }
  .menu-liste a, .menu-liste button { white-space: normal; overflow-wrap: anywhere; }
}
.personnaliser-boutons .btn::before { display: none; }  /* ces boutons ont déjà leur icône et leur flèche : pas de chevron en plus */
.personnaliser-titre { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.personnaliser-titre small { font-size: .8rem; font-weight: 400; }
.personnaliser-boutons { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.personnaliser-boutons .btn { flex: 1 1 150px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; margin: 0; }
.personnaliser-boutons .btn[aria-expanded="true"] .zone-fleche { display: inline-block; transform: rotate(180deg); }
.panneau-perso { background: #fff; border: 1px solid var(--argent-clair); border-radius: 12px; padding: 0 14px 14px; margin: 0 0 10px; }
.remarques { margin: 0 0 12px; border: 1px solid var(--or); background: var(--or-clair); border-radius: 10px; }
.remarques > summary { cursor: pointer; min-height: 44px; box-sizing: border-box; display: flex; align-items: center; padding: 8px 14px; font-weight: 600; list-style: none; }
.remarques > summary::-webkit-details-marker { display: none; }
.remarques[open] > summary span[aria-hidden] { display: inline-block; transform: rotate(180deg); }
.remarques .avis { margin: 0 12px 10px; }
.supprimer-bas { margin: 28px 0 8px; text-align: center; }
.lien-danger { background: none; border: 0; padding: 12px 8px; min-height: 44px; font: inherit; font-size: .9rem; color: var(--erreur); text-decoration: underline; cursor: pointer; }
@media print { .menu-action, .supprimer-bas, .remarques, .actions-doc { display: none !important; } }

/* Indicateur de remplissage du profil */
.completude { background: var(--argent-clair); border: 1px solid var(--argent); border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; }
.completude p { margin: 0 0 6px; }
.completude-barre { display: block; width: 100%; height: 10px; border: 0; border-radius: 5px; background: #fff; overflow: hidden;
  appearance: none; -webkit-appearance: none; }
.completude-barre::-webkit-progress-bar { background: #fff; border-radius: 5px; }
.completude-barre::-webkit-progress-value { background: var(--violet); border-radius: 5px; }
.completude-barre::-moz-progress-bar { background: var(--violet); border-radius: 5px; }
.completude-invite { margin-top: 8px !important; font-size: .92rem; }
.completude-liste { margin: 0; padding-left: 20px; font-size: .95rem; }
.completude-liste li { margin: 2px 0; }
.completude-liste a { display: inline-block; padding: 4px 0; }
.profil-complet, .note-profil { font-size: .88rem; margin: 6px 0; }
input.champ-code { font-size: 1.6rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }

/* Aide à la saisie d'une fiche */
.aide-fiche { background: var(--violet-clair); border-radius: 8px; padding: 8px 14px; margin: 6px 0 10px; font-size: .95rem; }
.aide-fiche ol { margin: 4px 0 8px 20px; padding: 0; }
.qualite-fiche { font-size: .88rem; color: var(--or-fonce); margin: 4px 0 0; }

/* Profil riche : compteur, encadré avant génération, astuce discrète, bienvenue */
.compteur-experiences { background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: 8px 14px; margin: 0 0 12px; }
.compteur-experiences p { margin: 4px 0; }
.encadre-carnet { border: 2px solid var(--violet); background: var(--violet-clair); }
.astuce { position: fixed; right: 16px; bottom: 16px; max-width: min(380px, calc(100vw - 32px)); z-index: 50; background: var(--nuit);
          color: var(--argent-clair); border-radius: 10px; padding: 10px 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.astuce[hidden] { display: none; }
.astuce p { margin: 0 0 8px; }
.astuce-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.astuce-masquer { margin: 0; }
.bienvenue { border: 2px solid var(--or); background: var(--or-clair); }
.bienvenue ol { margin: 8px 0 12px 20px; padding: 0; }
@media (prefers-reduced-motion: no-preference) { .astuce { animation: astuce-entree .3s ease-out; } }
@keyframes astuce-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Document dépassé : le profil a changé depuis la génération */
.depasse { background: var(--or-clair); border: 1px solid var(--or); border-radius: 8px; padding: 8px 14px; margin: 0 0 12px; }
.depasse p { margin: 4px 0; }

/* Retour sur la rubrique modifiée : message au-dessus de la rubrique, ligne mise en évidence quelques secondes */
.msg-rubrique { margin: 6px 0 10px; padding: 8px 12px; border-left: 4px solid var(--violet); background: var(--violet-clair); border-radius: 6px; }
.msg-rubrique.erreur { border-left-color: var(--erreur); background: var(--erreur-fond); }
.surligne { background: var(--violet-clair); animation: surligne 5s ease-out; }
@keyframes surligne { from { background: var(--or); } to { background: var(--violet-clair); } }
@media (prefers-reduced-motion: reduce) { .surligne { animation: none; } }

/* ---------- Jauges (barres de progression) : un seul composant pour tous les graphiques ----------
   Libellé et valeur sur leur propre ligne, barre dessous sur toute la largeur ; couleurs UNIES de la marque, jamais de dégradé ;
   une barre à 0 est vide ; jamais de mot coupé au milieu (retour à la ligne aux espaces seulement). */
.jauge { margin: 10px 0; }
.jauge-entete { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.jauge-nom, .jauge-val { word-break: normal; overflow-wrap: normal; hyphens: manual; }
.jauge-nom { font-size: .95rem; font-weight: 600; flex: 1 1 12rem; min-width: 0; }
.jauge-val { font-size: .88rem; color: var(--gris); flex: 0 1 auto; }
.jauge-fond { display: block; height: 14px; border-radius: 7px; background: var(--argent-clair); overflow: hidden; margin-top: 4px; }
.jauge-fond.fine { height: 10px; margin-top: 3px; }
.jauge-plein { display: block; height: 100%; background: var(--violet); border-radius: 7px; }
.jauge-plein.second { background: var(--or-fonce); }
.legende { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 10px; font-size: .9rem; color: var(--gris); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: var(--violet); }
.legende i.second { background: var(--or-fonce); }

/* Sélecteur segmenté (période, filtres courts) */
.segments { display: inline-flex; max-width: 100%; border: 1px solid var(--violet); border-radius: 10px; overflow: hidden; background: #fff; }
.segments a { padding: 8px 14px; min-height: 40px; display: flex; align-items: center; text-decoration: none; color: var(--violet); font-weight: 600; font-size: .92rem;
  white-space: nowrap; border-left: 1px solid var(--violet); }
.segments a:first-child { border-left: 0; }
.segments a[aria-current="true"] { background: var(--violet); color: #fff; }
.segments a:hover:not([aria-current="true"]) { background: var(--violet-clair); }
@media (max-width: 400px) { .segments { display: flex; } .segments a { flex: 1 1 auto; justify-content: center; padding: 8px 6px; font-size: .86rem; } }

/* Onglets d'une page : passent à la ligne sans être tronqués ; le bouton d'action est à part */
.onglets-page { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.onglets-page a { display: block; padding: 9px 14px; border: 1px solid var(--violet); border-radius: 10px; text-decoration: none; font-weight: 600; color: var(--violet); background: #fff; white-space: normal; }
.onglets-page a[aria-current="page"] { background: var(--violet); color: #fff; }
.action-page { margin: 0 0 16px; }
@media (max-width: 560px) { .action-page .btn { display: block; width: 100%; text-align: center; } }
.completude-barre.sur-blanc, .completude-barre.sur-blanc::-webkit-progress-bar { background: var(--argent-clair); }

/* Proposition d'installation de l'application : bandeau fixe en bas (aucun décalage de la page), aide iPhone, liens « Installer ». */
[data-pwa-ouvrir][hidden], .pwa-bandeau[hidden], .pwa-aide [hidden] { display: none !important; }
.lien-pwa { background: none; border: 0; padding: 0; min-height: 44px; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.pwa-bandeau { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 90; max-width: 600px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; background: #fff; color: var(--texte);
  border: 1px solid var(--argent); border-top: 3px solid var(--or); border-radius: 14px; box-shadow: 0 8px 28px rgba(30, 6, 54, .28); }
.pwa-bandeau__icone { border-radius: 10px; flex: none; }
.pwa-bandeau__texte { flex: 1 1 200px; margin: 0; font-size: .95rem; line-height: 1.4; }
.pwa-bandeau__actions { display: flex; gap: 8px; flex: 1 1 100%; justify-content: flex-end; }
.pwa-bouton { min-height: 44px; min-width: 96px; padding: 8px 18px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600;
  background: #fff; color: var(--violet); border: 2px solid var(--violet); }
.pwa-bouton--principal { background: var(--violet); color: #fff; box-shadow: inset 0 -3px 0 var(--or); }
.pwa-bouton:hover { background: var(--violet-clair); }
.pwa-bouton--principal:hover { background: var(--nuit); }
.pwa-bouton:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.pwa-aide { max-width: min(440px, calc(100vw - 24px)); border: 0; border-top: 4px solid var(--or); border-radius: 14px; padding: 20px 22px; color: var(--texte); }
.pwa-aide::backdrop { background: rgba(30, 6, 54, .55); }
.pwa-aide h2 { margin: 0 0 10px; font-size: 1.25rem; }
.pwa-etapes { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.pwa-etapes li { display: flex; align-items: center; gap: 12px; }
.pwa-etape-icone { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--violet-clair); color: var(--violet); }
@media (min-width: 640px) { .pwa-bandeau__actions { flex: none; } }
@media print { .pwa-bandeau, .pwa-aide { display: none !important; } }
