/* ===========================================================
   Hackathon écologique — parcours participant (mobile-first)
   Charte : bleu pétrole + corail, cartes blanches arrondies,
   cibles tactiles ≥ 44px. Variables de base.css utilisées.
   =========================================================== */

:root {
  --p-bg: var(--bg);
  --p-surface: var(--card);
  --p-border: var(--border);
  --p-text: var(--text);
  --p-text-muted: var(--muted);
  --p-teal: var(--accent);
  --p-teal-dark: var(--accent-dark);
  --p-teal-light: var(--accent-light);
  --p-amber: var(--yellow);
  --p-red: var(--coral);
  --p-red-dark: var(--red-dark);
  --p-radius: 16px;
  --p-gap: 0.65rem;
  --p-font-size: 1.08rem;
}

.p-screen {
  background: transparent;
  color: var(--p-text);
  font-size: var(--p-font-size);
  line-height: 1.5;
  padding: 1rem 1rem 3rem;
  max-width: 640px;
  margin: 0 auto;
}

/* --- Hero / header --- */
.p-hero { padding: 0.75rem 0 1.25rem; }
.p-hero--compact { padding-bottom: 0.75rem; }
.p-hero__title {
  font-size: 1.8rem;
  font-weight: 800;
  font-style: italic;
  margin: 0 0 0.5rem;
  color: var(--p-text);
}
.p-hero__title::after{
  content:"";
  display:block;
  width:84px;height:5px;
  margin-top:8px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--p-teal) 0 60%,var(--p-red) 60% 100%);
}
.p-hero__subtitle { margin: 0.6rem 0 0; color: var(--p-text-muted); font-size: 1rem; }
.p-hero__account { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 8px; }

.p-phase-banner {
  background: var(--p-teal-light);
  border: 1px solid rgba(31,122,140,.25);
  border-radius: var(--p-radius);
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 0;
  font-size: 0.98rem;
}
.p-phase-banner--responsable { background: var(--red-light); border-color: rgba(232,92,74,.3); }
.p-phase-banner__badge {
  display: inline-block; font-weight: 800; text-transform: uppercase; font-size: 0.72rem;
  letter-spacing: 0.05em; background: var(--p-teal); color: #fff; border-radius: 999px;
  padding: 0.2rem 0.7rem; margin-right: 0.5rem; vertical-align: middle;
}
.p-phase-banner--responsable .p-phase-banner__badge { background: var(--p-red); }

.p-postit-banner{
  display:flex;align-items:flex-start;gap:10px;background:#fffbe0;
  border:1px solid rgba(232,184,30,.4);border-radius:var(--p-radius);
  padding:0.75rem 1rem;margin:0.7rem 0 1.2rem;font-size:0.95rem;color:#5c4b00;
}
.p-postit-banner i{color:#c9960c;margin-top:2px;}
.p-postit-banner p{margin:0;white-space:pre-wrap;}

.p-banner { border-radius: var(--p-radius); padding: 0.75rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.p-banner--error { background: var(--red-light); border: 1px solid rgba(232,92,74,.35); color: var(--p-red-dark); }

.p-hint { color: var(--p-text-muted); font-size: 0.92rem; margin: 0.3rem 0; }

/* --- Form (inscription) : label flottant, même principe que .auth-field (static/css/auth.css) --- */
.p-form { display: flex; flex-direction: column; gap: 1.1rem; }
.p-field { position: relative; }
.p-field input, .p-field select, .p-field textarea {
  font: inherit; font-size: 1.05rem; padding: 1.35rem 0.9rem 0.55rem; border-radius: 12px;
  border: 1.5px solid var(--p-border); background: var(--p-surface); color: var(--p-text);
  min-height: 44px; width: 100%; box-sizing: border-box;
}
.p-field select { appearance: none; cursor: pointer; }
.p-field textarea { padding-top: 1.1rem; }
.p-field input::placeholder { color: transparent; }
/* Label flottant façon "notched outline" : au repos centré dans le champ, au focus/rempli il
   chevauche exactement la bordure haute (moitié dedans, moitié dehors), fond opaque pour découper
   visuellement le trait de bordure sous le texte (même principe que .auth-field, static/css/auth.css). */
.p-field label {
  position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
  font-weight: 700; font-size: 1.05rem; color: var(--p-text-muted); pointer-events: none;
  background: var(--p-surface); padding: 0 0.3rem; border-radius: 4px; transform-origin: left center;
  max-width: calc(100% - 1.4rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: top .18s ease, transform .18s ease, color .18s ease;
}
.p-field input:focus, .p-field select:focus, .p-field textarea:focus {
  outline: none; border-color: var(--p-teal);
  box-shadow: 0 0 0 3px var(--p-teal-light);
}
.p-field input[readonly] { background: var(--p-bg); color: var(--p-text-muted); cursor: default; }
.p-field input:focus + label,
.p-field input:not(:placeholder-shown) + label,
.p-field select:focus + label,
.p-field select.has-value + label,
.p-field textarea:focus + label,
.p-field textarea:not(:placeholder-shown) + label {
  /* translateY poussé un peu plus loin que le simple "à cheval sur la bordure" (-50%) pour
     dégager un espace visuel net entre le label et le haut du champ une fois flotté. */
  top: 0; transform: translateY(calc(-50% - 6px)) scale(.72); color: var(--p-teal-dark);
}
/* <select> n'a pas de :placeholder-shown : le label reste flottant en permanence (valeur toujours visible) */
.p-field select + label { top: 0; transform: translateY(calc(-50% - 6px)) scale(.72); color: var(--p-text-muted); }
.p-field select:focus + label { color: var(--p-teal-dark); }

.p-theme-picker {
  border: 1.5px solid var(--p-border); border-radius: var(--p-radius);
  padding: 0.9rem 1rem 1rem; background: var(--p-surface); box-shadow: var(--shadow);
}
/* Espace entre les champs empilés dans un même fieldset (ex. "tranche d'âge" / "profession"
   dans "Un peu sur vous") : .p-form gère déjà le gap entre ses enfants directs, mais pas entre
   deux .p-field imbriqués dans un fieldset. */
.p-theme-picker > .p-field + .p-field { margin-top: 0.9rem; }
.p-theme-picker legend { font-weight: 800; padding: 0 0.4rem; display: flex; align-items: center; gap: 0.6rem; }
.p-theme-picker__counter {
  font-size: 0.85rem; font-weight: 800; color: var(--p-teal-dark);
  background: var(--p-teal-light); padding: 0.15rem 0.7rem; border-radius: 999px;
}

/* --- Sélection des sous-thèmes (groupés visuellement par thème parent) --- */
.p-sous-theme-groups { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 0.5rem; }
.p-sous-theme-group__title {
  font-size: 0.95rem; font-weight: 800; color: var(--p-teal-dark); margin: 0 0 0.45rem;
}
.p-sous-theme-list { display: flex; flex-direction: column; gap: 0.5rem; }

.p-sous-theme-option {
  display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--p-border); border-radius: 12px; min-height: 44px;
  cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
}
.p-sous-theme-option:hover { border-color: var(--p-teal); }
.p-sous-theme-option:has(input:checked) {
  border-color: var(--p-teal); background: var(--p-teal-light);
  box-shadow: 0 0 0 1px var(--p-teal) inset;
}
.p-sous-theme-option.is-disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.p-sous-theme-option input {
  width: auto; min-height: auto; margin-top: 0.2rem; flex-shrink: 0;
  transform: scale(1.2); accent-color: var(--p-teal);
}
.p-sous-theme-option__text { display: flex; flex-direction: column; gap: 0.15rem; }
.p-sous-theme-option__name { font-weight: 700; }
.p-sous-theme-option__desc { font-size: 0.82rem; color: var(--p-text-muted); }

/* --- Code postal -> commune (lookup API, voir participant.js) --- */
.p-commune .p-field { margin-top: 0; }
.p-commune .p-hint:empty { margin: 0; }

/* --- Choix en pastilles (genre, pôle...) --- */
.p-radio-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0; }
.p-radio-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--p-border); border-radius: 999px; font-size: 0.92rem; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.p-radio-chip:has(input:checked) { border-color: var(--p-teal); background: var(--p-teal-light); font-weight: 700; }
.p-radio-chip input { width: auto; min-height: auto; accent-color: var(--p-teal); }

.p-btn {
  font: inherit; font-weight: 700; border-radius: 999px; border: 1.5px solid transparent;
  padding: 0.75rem 1.2rem; min-height: 44px; cursor: pointer; background: var(--p-surface);
  color: var(--p-teal-dark); border-color: var(--p-teal);
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, filter .15s ease;
}
.p-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.p-btn:active { transform: translateY(1px); box-shadow: none; }
.p-btn--primary {
  background: linear-gradient(135deg, var(--p-teal) 0%, var(--p-teal-dark) 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(31,122,140,.3);
}
.p-btn--primary:hover { filter: brightness(1.08); box-shadow: 0 6px 16px rgba(31,122,140,.38); }
.p-btn--block { width: 100%; font-size: 1.1rem; }
.p-btn--small { padding: 0.45rem 0.9rem; min-height: 36px; font-size: 0.9rem; }
.p-btn--danger { background: transparent; border: 1px solid var(--p-red); color: var(--p-red); }
.p-btn--danger:hover { background: var(--red-light); }
.p-btn--icon { padding: 0.2rem 0.5rem; min-height: 32px; line-height: 1; }
.p-btn--valider { border-color: var(--p-teal); color: var(--p-teal-dark); }
.p-btn--rejeter { border-color: var(--p-red); color: var(--p-red-dark); }
.p-btn--rejeter:hover { background: var(--red-light); }

/* --- Thème cards (espace / phase 1) --- */
.p-screen--espace { max-width: 1800px; padding-left: 0.75rem; padding-right: 0.75rem; }
.p-screen--workspace { max-width: 1500px; padding-left: 0.75rem; padding-right: 0.75rem; }
/* auto-fit (et non un nombre de colonnes fixe par breakpoint) : avec peu de thèmes (ex. 2), les
   cartes se partagent toute la largeur disponible (50/50) au lieu de laisser une colonne vide. */
.p-theme-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1rem; align-items: stretch; }
.p-theme-list .p-theme-card { height: 100%; display: flex; flex-direction: column; }
@media (max-width: 480px) { .p-theme-list { grid-template-columns: 1fr; } }
.p-theme-card {
  background: var(--p-surface); border: 1px solid var(--p-border);
  border-radius: var(--p-radius); padding: 1.1rem 1rem; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.p-theme-card::before{
  content:"";position:absolute;top:0;left:0;right:0;height:5px;
  background:linear-gradient(90deg,var(--p-teal) 0%,var(--p-teal-dark) 100%);
}
.p-theme-card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.2rem; }
.p-theme-card__head h2 { margin: 0; font-size: 1.25rem; color: var(--p-teal-dark); }
.p-theme-card__waiting { font-size: 0.8rem; color: var(--p-text-muted); font-style: italic; }
.p-theme-card__change {
  display: flex; gap: 0.5rem; margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px dashed var(--p-border);
  flex-wrap: wrap; align-items: center;
}
.p-theme-card__change select {
  flex: 1 1 160px; font: inherit; font-size: 0.88rem; padding: 0.4rem 0.6rem; border-radius: 8px;
  border: 1.5px solid var(--p-border); background: #fff; color: var(--p-text);
}

.p-bullet-list { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.p-bullet-list li { margin-bottom: 0.45rem; }
.p-bullet-list li::marker { color: var(--p-teal); }
.p-bullet-list--nested { margin-top: 0.3rem; }
.p-bullet-list--nested li::marker { color: var(--p-red); }
.p-doleance { color: var(--p-text-muted); font-size: 0.92rem; }

/* --- Mesure workspace (phase 2) --- */
/* Une seule colonne, même en grand écran : les mesures/sous-thèmes sont abordés un par un
   (accordéon), pas comparés côte à côte -- chaque fiche profite donc de toute la largeur
   disponible plutôt que d'être compressée dans une grille 2 colonnes. */
.p-mesures { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin-top: 0.5rem; align-items: start; }
.p-mesure {
  background: var(--p-surface); border: 1px solid var(--p-border);
  border-radius: var(--p-radius); overflow: hidden; box-shadow: var(--shadow);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.p-mesure:hover { border-color: rgba(31,122,140,.4); }
.p-mesure[open] { border-color: var(--p-teal); box-shadow: var(--shadow-lift); }
.p-mesure__summary {
  list-style: none; cursor: pointer; padding: 0.9rem 1rem; display: flex; gap: 0.6rem;
  align-items: baseline; flex-wrap: wrap; font-weight: 700;
  transition: background .15s ease;
}
.p-mesure__summary:hover { background: var(--p-teal-light); }
.p-mesure__summary::-webkit-details-marker { display: none; }
.p-mesure__hint {
  margin-left: auto; align-self: flex-end; font-weight: 400; font-size: 0.78rem;
  color: var(--p-text-muted); white-space: nowrap;
}
.p-mesure[open] .p-mesure__hint { display: none; }
.p-mesure__desc { font-weight: 400; color: var(--p-text-muted); font-size: 0.92rem; }
.p-mesure__body { padding: 0 1rem 1rem; border-top: 1px solid var(--p-border); }
.p-phase-heading {
  font-size: 1rem; font-weight: 800; color: var(--p-navy, var(--p-text));
  margin: 1.4rem 0 0.4rem; padding-top: 1.1rem; border-top: 2px solid var(--p-border);
}
.p-mesure__body > .p-phase-heading:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.p-mesure__block { margin-top: 0.9rem; }
.p-mesure__block h3 {
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--p-teal-dark); margin: 0 0 0.3rem;
  display: flex; align-items: center; gap: 0.45rem;
}
.p-mesure__block h3::before{
  content:"";width:8px;height:8px;border-radius:50%;
  background:var(--p-red);flex-shrink:0;
}

.p-version-current { background: var(--p-teal-light); border-radius: 12px; padding: 0.75rem 0.9rem; }
.p-version-current__meta { display: block; margin-top: 0.4rem; font-size: 0.8rem; color: var(--p-text-muted); }
.p-status-badge { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; padding: 0.15rem 0.55rem; border-radius: 999px; margin-left: 0.3rem; }
.p-status-badge--pending { background: var(--yellow-light); color: #7a5409; }
.p-status-badge--validee { background: var(--p-teal-light); color: var(--p-teal-dark); }
.p-status-badge--rejetee { background: var(--red-light); color: var(--p-red-dark); }

.p-history { margin-top: 0.5rem; font-size: 0.92rem; }
.p-history summary { cursor: pointer; color: var(--p-teal-dark); font-weight: 700; }
.p-history summary:hover { color: var(--p-teal); }
.p-history-list { padding-left: 1.2rem; }
.p-history-list li { margin: 0.4rem 0; color: var(--p-text-muted); }

.p-edit-zone { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.3rem; }
.p-edit-zone label { font-size: 0.88rem; font-weight: 700; }
.p-edit-zone__footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; }
.p-char-counter { color: var(--p-text-muted); }
.p-save-status { font-weight: 700; color: var(--p-teal-dark); min-height: 1em; }
.p-save-status.is-error { color: var(--p-red-dark); }

.p-validation { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.4rem; }
.p-validation__row {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  background: var(--yellow-light); border-radius: 12px; padding: 0.5rem 0.7rem; font-size: 0.9rem;
}
.p-validation__row span { flex: 1 1 100%; }

/* --- Commentaires (discussion en fil, soft-delete réservée à l'auteur) --- */
.p-comments__list { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.4rem; }
.p-comment {
  background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 10px;
  padding: 0.4rem 0.55rem;
}
.p-comment.is-deleted { background: transparent; }
.p-comment__meta { font-size: 0.8rem; margin-bottom: 0.1rem; }
.p-comment__content { font-size: 0.92rem; white-space: pre-wrap; word-break: break-word; }
.p-comment__actions { display: flex; gap: 0.35rem; margin-top: 0.25rem; }
.p-comment__action {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: none; border: 1px solid var(--p-border); border-radius: 8px;
  padding: 0.18rem 0.55rem; min-height: 26px; font: inherit; font-size: 0.78rem; line-height: 1.2;
  color: var(--p-text-muted); cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.p-comment__action:hover { border-color: var(--p-teal); color: var(--p-teal-dark); background: var(--p-teal-light); }
.p-comment__action.js-delete:hover { border-color: var(--p-red); color: var(--p-red-dark); background: rgba(232, 92, 74, .08); }
.p-comment__replies { margin: 0.3rem 0 0 0.6rem; padding-left: 0.55rem; border-left: 2px solid var(--p-border); display: flex; flex-direction: column; gap: 0.3rem; }
.p-comment-form, .p-comment-reply-form { display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 0.4rem; }
.p-comment-form textarea, .p-comment-reply-form textarea {
  flex: 1 1 auto; border: 1.5px solid var(--p-border); border-radius: 10px; padding: 0.4rem 0.6rem;
  font: inherit; font-size: 0.92rem; resize: vertical;
}
.p-comment-reply-form { margin-top: 0.4rem; }

/* --- Fiche technique (étape 3) : formulaire complet par mesure, imbriqué dans l'accordéon --- */
.p-fiche-technique {
  margin-top: 0.4rem; border: 1px dashed var(--p-border); border-radius: 12px;
  padding: 0.1rem 0.7rem 0.6rem; transition: border-color .15s ease;
}
.p-fiche-technique[open] { border-color: var(--p-teal); border-style: solid; }
.p-fiche-technique__summary {
  list-style: none; cursor: pointer; padding: 0.65rem 0.1rem; font-weight: 700;
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; color: var(--p-teal-dark);
}
.p-fiche-technique__summary::-webkit-details-marker { display: none; }
.p-fiche-technique__body { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 0.3rem; }

.p-fiche-field { display: flex; flex-direction: column; gap: 0.35rem; }
.p-fiche-field > label { font-size: 0.88rem; font-weight: 700; }
.p-fiche-field input[type="text"],
.p-fiche-field input[type="url"],
.p-fiche-field input[type="email"],
.p-fiche-field input[type="tel"],
.p-fiche-field input[type="number"],
.p-fiche-field textarea {
  font: inherit; font-size: 0.98rem; padding: 0.55rem 0.75rem; border-radius: 10px;
  border: 1.5px solid var(--p-border); background: var(--p-surface); color: var(--p-text);
  min-height: 44px; width: 100%; box-sizing: border-box;
}
.p-fiche-field textarea { min-height: auto; resize: vertical; }
.p-fiche-field input:focus, .p-fiche-field textarea:focus {
  outline: none; border-color: var(--p-teal); box-shadow: 0 0 0 3px var(--p-teal-light);
}

.p-fiche-list { display: flex; flex-direction: column; gap: 0.4rem; }
.p-fiche-list__row { display: flex; gap: 0.4rem; align-items: center; }
.p-fiche-list__row input { flex: 1 1 auto; }
.p-fiche-list__row--pair input { flex: 1 1 50%; }
.p-fiche-list__row--triple input { flex: 1 1 33%; }
.p-fiche-list__remove {
  flex: 0 0 auto; border: 1.5px solid var(--p-border); background: var(--p-surface);
  color: var(--p-red-dark); border-radius: 999px; width: 32px; height: 32px; min-height: 32px;
  cursor: pointer; font-weight: 700; line-height: 1; padding: 0;
}
.p-fiche-list__remove:hover { background: var(--red-light); border-color: var(--p-red); }

.p-fiche-toggle { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; font-weight: 600; }
.p-fiche-toggle input { width: auto; min-height: auto; accent-color: var(--p-teal); }

.p-fiche-horizons { display: flex; flex-direction: column; gap: 0.7rem; }
.p-fiche-horizon { display: flex; flex-direction: column; gap: 0.3rem; }
.p-fiche-horizon label { font-size: 0.82rem; font-weight: 700; color: var(--p-text-muted); }

.p-fiche-grid { display: grid; grid-template-columns: 1fr; gap: 0.8rem; }
.p-fiche-grid--expert { grid-template-columns: 1fr; gap: 0.5rem; }

@media (min-width: 640px) {
  .p-fiche-grid { grid-template-columns: 1fr 1fr; }
  .p-fiche-horizons { flex-direction: row; }
  .p-fiche-horizon { flex: 1 1 0; }
  .p-fiche-grid--expert { grid-template-columns: 1fr 1fr; }
}

/* ---------- Espace étape 1 : sélecteur direct de sous-thèmes ---------- */
.p-picker { margin-bottom: 1rem; }
.p-picker h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 1.1rem; }
.p-picker-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 10px; }
@media (min-width: 720px) { .p-picker-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1180px) { .p-picker-grid { grid-template-columns: 1fr 1fr 1fr; } }
.p-picker-theme { background: var(--p-surface-2, var(--p-surface)); border: 1px solid var(--p-border); border-radius: var(--p-radius); padding: 0.8rem; }
.p-picker-theme h3 { font-size: 0.95rem; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.p-picker-sous-themes { display: flex; flex-direction: column; gap: 6px; }
.p-picker-chip-wrap { display: flex; align-items: center; gap: 6px; }
.p-picker-chip {
  flex: 1; text-align: left; background: var(--p-surface); border: 1px solid var(--p-border);
  border-radius: 999px; padding: 6px 12px; font-size: 0.85rem; cursor: pointer; color: var(--p-text);
}
.p-picker-chip.is-active { background: var(--p-teal); border-color: var(--p-teal); color: #fff; font-weight: 700; }
.p-picker-downvote {
  background: none; border: 1px solid var(--p-border); border-radius: 999px; padding: 4px 8px;
  font-size: 0.78rem; cursor: pointer; color: var(--p-text-muted); flex-shrink: 0;
}
.p-picker-downvote.is-active { background: var(--red-light); border-color: var(--p-red); color: var(--p-red-dark); }

/* ---------- Bulles initiales (roster du thème) ---------- */
.p-bubble-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }

.p-my-subtheme {
  display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px;
  padding: 0.6rem 0.8rem; border-radius: 10px;
  background: color-mix(in srgb, var(--p-teal) 10%, transparent);
  color: var(--p-text); font-size: 0.95rem; font-weight: 600;
}
.p-my-subtheme i { color: var(--p-teal); margin-top: 2px; }
.p-my-subtheme__tag {
  display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .02em; color: #fff; background: var(--p-teal); border-radius: 999px;
  padding: 2px 8px; margin-left: 2px; vertical-align: middle;
}
.p-bubble {
  width: 30px; height: 30px; border-radius: 50%; background: var(--p-teal-light); color: var(--p-teal);
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800;
  cursor: default;
}

/* ---------- Étape 2 : candidature responsable + votes + propositions ---------- */
.p-responsable-block {
  background: linear-gradient(165deg, var(--p-surface) 0%, var(--p-surface-2, var(--p-surface)) 100%);
  border: 1px solid var(--p-border); border-radius: calc(var(--p-radius) + 2px);
  padding: 1rem 1.1rem; margin: 14px 0; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.p-responsable-block__title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 0.95rem;
  font-weight: 800; color: var(--p-teal); letter-spacing: .01em;
}
.p-responsable-block__title i { font-size: 1rem; }

/* Interrupteur moderne (remplace la case à cocher brute) */
.p-switch-row { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; cursor: pointer; font-weight: 600; }
.p-switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.p-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.p-switch__slider {
  position: absolute; inset: 0; background: var(--p-border); border-radius: 999px; transition: background .2s ease;
}
.p-switch__slider::before {
  content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease;
}
.p-switch input:checked + .p-switch__slider { background: var(--p-teal); }
.p-switch input:checked + .p-switch__slider::before { transform: translateX(16px); }
.p-switch input:focus-visible + .p-switch__slider { outline: 2px solid var(--p-teal); outline-offset: 2px; }

.p-responsable-subblock {
  margin: 14px 0 0; padding: 10px 0 0 14px; border-left: 3px solid var(--p-teal-light);
}
.p-responsable-subblock__title { font-size: 0.86rem; font-weight: 700; color: var(--p-text); margin: 0 0 8px; }

.p-candidate-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.p-candidate {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--p-radius);
  background: var(--p-surface); transition: background .15s ease;
}
.p-candidate.is-top3 { background: var(--p-teal-light); }
.p-candidate__avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--p-teal-light); color: var(--p-teal);
  display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 800; flex-shrink: 0;
}
.p-candidate.is-top3 .p-candidate__avatar { background: var(--p-teal); color: #fff; }
.p-candidate__name { flex: 1; font-size: 0.85rem; font-weight: 600; }
.p-candidate__crown { color: #e8b900; margin-left: 2px; }
.p-thumb-btn {
  background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 999px; padding: 5px 12px;
  font-size: 0.78rem; font-weight: 700; cursor: pointer; color: var(--p-text-muted); transition: all .15s ease;
}
.p-thumb-btn:hover { border-color: var(--p-teal); color: var(--p-teal); }
.p-thumb-btn.is-active { background: var(--p-teal); border-color: var(--p-teal); color: #fff; }
.p-proposal-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.p-proposal-list__rule { font-style: italic; margin: 0 0 4px; }
.p-proposal-item { font-size: 0.85rem; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.p-propose-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.p-propose-form input, .p-propose-form textarea {
  padding: 8px 10px; border: 1px solid var(--p-border); border-radius: var(--p-radius); font: inherit;
}
.p-picker-theme > .js-propose-sous-theme-open,
.p-propose-form .js-propose-submit { display: block; margin: 10px auto 4px; }

/* ---------- Inscription : choix du mot de passe (œil + règles de robustesse) ---------- */
.p-field--eye input { padding-right: 44px; }
.p-field__eye {
  position: absolute; right: 6px; top: 0; height: 100%; width: 38px; border: none; background: none;
  box-shadow: none; cursor: pointer; color: var(--p-text-muted); display: flex; align-items: center;
  justify-content: center;
}
.p-field__eye:hover, .p-field__eye:focus, .p-field__eye:active {
  background: none; box-shadow: none; filter: none; transform: none; color: var(--p-teal);
}
.p-rules { display: flex; flex-wrap: wrap; gap: 6px; margin: -0.6rem 0 1rem; }
.p-rule {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; background: var(--p-surface-2, var(--p-surface)); color: var(--p-text-muted);
  transition: background .25s ease, color .25s ease;
}
.p-rule.is-ok { background: var(--p-teal-light); color: var(--p-teal); }
.p-rule__icon { font-size: 0.6rem; }

.p-responsable-subblock--measure { margin: 10px 0 0 10px; border-left-color: var(--p-border); padding-left: 10px; }
.p-responsable-subblock__title--measure { font-size: 0.78rem; font-weight: 600; color: var(--p-text-muted); }

/* --- Conclusion atelier 1 / annonce atelier 2 (phase '3') --- */
.p-conclusion {
  margin-bottom: 1rem;
}
.p-conclusion__message {
  background: var(--p-surface); border: 1px solid var(--p-border);
  border-radius: var(--p-radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem;
  box-shadow: var(--shadow); border-left: 5px solid var(--p-teal);
}
.p-conclusion__message h2 {
  margin: 0 0 0.5rem; font-size: 1.15rem; color: var(--p-text);
  display: flex; align-items: center; gap: 0.5rem;
}
.p-conclusion__message p { margin: 0; line-height: 1.6; }
.p-conclusion__questionnaire {
  background: color-mix(in srgb, var(--p-amber) 12%, var(--p-surface)); border: 1px solid var(--p-border);
  border-radius: var(--p-radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow);
  border-left: 5px solid var(--p-amber); text-align: center;
}
.p-conclusion__questionnaire h3 { margin: 0 0 0.4rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.p-conclusion__questionnaire p { margin: 0 0 0.9rem; }
.p-conclusion__questionnaire-row { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.p-conclusion__questionnaire-row img { border-radius: 10px; border: 1px solid var(--p-border); }
.p-conclusion__questionnaire-link {
  display: flex; align-items: center; gap: 8px; max-width: 100%;
  background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 10px;
  padding: 6px 6px 6px 12px;
}
.p-conclusion__questionnaire-link code {
  flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap;
  font-size: 0.82rem; color: var(--p-text-muted); text-align: left;
}
.p-conclusion__card::before {
  background: linear-gradient(90deg, var(--p-teal) 0%, var(--p-teal-dark) 100%);
}
.p-conclusion__card .ac-bullet-list li::before { background: var(--p-teal); }
