/* Sélection de Hanna, « Qui suis-je ? » et mode édition (boutons Modifier, fenêtres de formulaire). */

/* ---------- fiches : sélection et quartier ---------- */
.card__eyebrows { display: flex; flex-wrap: wrap; gap: 6px; padding-inline-end: 52px; }
.card__eyebrows:empty { display: none; }
.card__eyebrow--pick { display: inline-flex; align-items: center; gap: 4px; background: var(--sea-soft); color: var(--teal-deep); }
.card__quartier {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--teal-deep); font-size: 14px; font-weight: 700; text-decoration: none;
}

/* ---------- accueil : Qui suis-je ? ---------- */
.about {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 18px;
  border-radius: var(--radius-card); background: var(--sea-soft); text-align: center;
}
.about__face { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 4px solid var(--white); box-shadow: var(--shadow); }
.about__title { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; text-transform: uppercase; color: var(--title); }
.about__text { font-size: 16px; text-wrap: pretty; }
.about__link { display: inline-flex; align-items: center; min-height: 44px; color: var(--teal-deep); font-weight: 800; text-decoration: none; }
.intro { display: flex; flex-direction: column; gap: 6px; }
.about .intro { align-items: center; }

/* ---------- mode édition ---------- */
.admin-bar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; background: var(--charcoal); color: var(--white); font-size: 14px; font-weight: 700; text-decoration: none;
}
.edit-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 1.5px dashed var(--caramel-deep); border-radius: 999px; background: var(--caramel-soft); color: var(--caramel-deep);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.edit-btn--add { align-self: stretch; justify-content: center; min-height: 52px; }
.btn--quiet { border-color: transparent; background: transparent; color: var(--text-muted); }
.notice--ok { background: var(--success-soft); color: var(--success); }
.admin-howto { display: flex; flex-direction: column; gap: 8px; padding-inline-start: 20px; font-size: 15px; }
.admin-actions { display: flex; flex-direction: column; gap: 10px; }
.admin-list { display: flex; flex-direction: column; }
.admin-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; border-top: 1px solid var(--border); }
.admin-list a { color: var(--text); font-weight: 600; text-decoration: none; }

/* ---------- fenêtre de formulaire (plein écran sur téléphone) ---------- */
.sheet {
  width: 100%; max-width: 560px; max-height: 100dvh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0; background: var(--paper); color: var(--text);
}
.sheet::backdrop { background: rgb(30 25 20 / 45%); }
.sheet__head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: var(--paper); border-bottom: 1px solid var(--border);
}
.sheet__title { font-size: 1.05rem; font-weight: 800; }
.sheet__close {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--surface-soft); color: var(--text); cursor: pointer;
}
.sheet__close .icon { transform: rotate(45deg); }
.form { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.form__field { display: flex; flex-direction: column; gap: 6px; }
.form__label { font-size: 14px; font-weight: 800; color: var(--charcoal); }
.form__hint { font-size: 13px; color: var(--text-muted); }
.form__input {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-control);
  background: var(--white); color: var(--text); font: inherit; font-size: 16px;
}
textarea.form__input { min-height: 110px; resize: vertical; line-height: 1.45; }
.form__input:focus-visible { outline: 3px solid var(--sea); outline-offset: 1px; border-color: var(--teal-deep); }
.form__check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600; }
.form__check input { width: 22px; height: 22px; accent-color: var(--caramel-deep); }
.form__photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius-control); }
.btn--file { position: relative; align-self: flex-start; overflow: hidden; cursor: pointer; }
.form__file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.form__map { height: 240px; border-radius: var(--radius-control); overflow: hidden; border: 1.5px solid var(--border); }
.form__error { padding: 10px 12px; border-radius: var(--radius-control); background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.form__actions { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--paper); }
.form__actions .btn { flex: 1; }

@media (min-width: 600px) {
  .sheet { margin: auto; max-height: 90dvh; border-radius: var(--radius-card); }
}

/* ---------- édition étendue (22/11) : crayons sur titres, « Tous les textes » ---------- */
.edit-btn--mini { min-height: 44px; padding: 0 12px; font-size: 13px; pointer-events: auto; position: relative; z-index: 2; }
.banner__titles .edit-btn, .hero__titles .edit-btn { background: var(--white); }
.text-list li { flex-wrap: wrap; padding: 10px 0; }
.text-row__text { flex: 1 1 100%; font-size: 15px; white-space: pre-line; }
.text-row__own { font-size: 12px; font-weight: 700; color: var(--success); }
.edit-btn--photo { position: absolute; z-index: 3; top: 64px; inset-inline-end: 12px; background: var(--white); }
.page-head:not(.page-head--immersive) .edit-btn--photo { position: static; }
.hero__cover .edit-btn--photo { top: 56px; }
.move { display: flex; gap: 8px; margin-top: 10px; }
.edit-btn--icon { width: 44px; justify-content: center; padding: 0; }
.walk__edit { display: flex; flex-direction: column; gap: 8px; }
/* flex-wrap : sur téléphone, 6 outils ne tiennent pas sur une ligne (« Masquer » sortait de l'écran) */
.walk__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; }
.walk__tools .edit-btn { white-space: nowrap; }
.walk__tools .edit-btn--photo { position: static; }
.walk__tools .move { margin-top: 0; }

/* Rubriques et parties masquées par Hanna : grisées en mode édition, invisibles pour le visiteur */
.is-masked { position: relative; opacity: 0.45; filter: grayscale(1); }
.masked-badge { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 3; padding: 4px 10px; border-radius: 999px; background: var(--text-primary, #2d2a26); color: var(--white, #fff); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.stage__head .edit-btn--vis { margin-inline-start: auto; align-self: center; }
/* mode édition : « Masquer » + poignée + flèches passent sous le titre (sur téléphone ils écrasaient le titre et se chevauchaient) */
.stage__head:has(> .edit-btn--vis, > .move) { flex-wrap: wrap; }
.stage__head:has(> .edit-btn--vis, > .move) .stage__titles { flex: 1 1 60%; }
.stage__head:has(> .edit-btn--vis, > .move) .move { margin-top: 0; }

/* Panneau « Couleurs et style » du tableau de bord */
.theme-row { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 600; }
.theme-row input[type="color"] { width: 48px; height: 44px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); cursor: pointer; }
.theme-field { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-weight: 600; }
.theme-select { min-height: 44px; padding: 8px 12px; font-size: 16px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--text); }

/* barre d'envoi de la vidéo d'entrée */
.upload-bar { display: block; width: 100%; height: 10px; margin-top: 8px; accent-color: var(--terracotta); }
.upload-bar[hidden] { display: none; }

/* Rubriques créées par Hanna : bouton « Nouvelle rubrique » et choix des lieux */
.edit-btn--wide { width: 100%; justify-content: center; margin-top: 12px; min-height: 48px; }
.rubric-pick { margin: 16px var(--gutter, 16px); padding: 12px 14px; border: 2px dashed var(--terracotta, #c67b4a); border-radius: 16px; background: var(--white, #fff); }
.rubric-pick summary { min-height: 44px; display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.rubric-pick__hint { font-size: 14px; color: var(--text-secondary, #5a5650); margin: 6px 0 10px; }
.rubric-pick__search { width: 100%; min-height: 44px; font-size: 16px; padding: 8px 12px; border: 1px solid var(--sand, #e8d5b7); border-radius: 10px; }
.rubric-pick__list { max-height: 50vh; overflow-y: auto; margin: 10px 0; }
.rubric-pick__row { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--cream-dark, #f5ede3); }
.rubric-pick__row input { width: 22px; height: 22px; flex: none; }
.rubric-pick__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Listes de numéros modifiables (page Urgences) */
.list-edit { display: flex; flex-direction: column; gap: 10px; }
.list-edit__row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px; border: 1px solid var(--line, rgb(0 0 0 / 12%)); border-radius: 12px; }
.list-edit__num { font-variant-numeric: tabular-nums; }
.list-edit__tools { display: flex; gap: 6px; }
.list-edit__tool { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.list-edit__tools .list-edit__tool:last-child svg { transform: rotate(45deg); }
.list-edit__open { margin-top: 8px; }
