/* ── match-moi · dates filtrées ─────────────────────────────────────────────
   Palette « soirée » : encre prune, voile rosé, framboise, sauge.
   Young Serif (titres) + Figtree (texte). Signature : la trame sonore. */

@font-face {
  font-family: "Young Serif";
  src: url("/static/fonts/youngserif-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2019, U+2013;
}
@font-face {
  font-family: "Young Serif";
  src: url("/static/fonts/youngserif-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02BA, U+1E00-1EFF, U+20A0-20CF;
}
@font-face {
  font-family: "Figtree";
  src: url("/static/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2019, U+2013;
}
@font-face {
  font-family: "Figtree";
  src: url("/static/fonts/figtree-latin-ext.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+1E00-1EFF, U+20A0-20CF;
}

:root {
  --encre: #33202e;
  --encre-doux: rgba(51, 32, 46, 0.72);
  --voile: #fbf7f9;
  --rose: #f3e2e8;
  --rose-fonce: #e7cbd6;
  --baiser: #c8385a;
  --baiser-fonce: #a62b49;
  --sauge: #48705f;
  --sauge-pale: #e4eeea;
  --or: #c99a3c;
  --blanc: #ffffff;
  --ligne: rgba(51, 32, 46, 0.14);
  --radius: 14px;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* L'attribut hidden doit gagner même sur les éléments qui déclarent un display
   (.btn, .traitement, .fil-voix…) — sans ceci, le style auteur le neutralise. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--encre);
  background: var(--voile);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { color: var(--encre-doux); }
a { color: var(--baiser); }

:focus-visible {
  outline: 3px solid rgba(200, 56, 90, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Bandeau d'incarnation (admin connecté comme un membre) ── */
.bandeau-incarnation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 9px 16px;
  background: var(--or);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}
.bandeau-incarnation a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Structure ── */
.conteneur { width: 100%; max-width: 660px; margin: 0 auto; padding: 0 20px; }
.conteneur--large { max-width: 1120px; }
main { flex: 1; padding: 40px 0 64px; }

.entete {
  border-bottom: 1px solid var(--ligne);
  background: var(--voile);
}
.entete .conteneur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.marque {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--encre);
  text-decoration: none;
}
.marque b { color: var(--baiser); font-weight: 400; }
.marque small {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--encre-doux);
}
.entete nav { display: flex; align-items: center; gap: 18px; }
.entete nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; }

.pied {
  border-top: 1px solid var(--ligne);
  padding: 22px 0;
  font-size: 0.85rem;
  color: var(--encre-doux);
}
.pied .conteneur { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ── Composants ── */
.eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--baiser);
  margin-bottom: 12px;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  background: var(--baiser);
  color: var(--blanc);
  transition: background 0.15s ease;
}
.btn:hover { background: var(--baiser-fonce); }
.btn--secondaire {
  background: transparent;
  color: var(--encre);
  border: 1.5px solid var(--ligne);
}
.btn--secondaire:hover { background: var(--rose); border-color: var(--rose-fonce); }
.btn--sauge { background: var(--sauge); }
.btn--sauge:hover { background: #3a5c4e; }
.btn--large { width: 100%; padding: 15px; font-size: 1.05rem; }

.carte {
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 3px rgba(51, 32, 46, 0.05);
}
.carte + .carte { margin-top: 18px; }

label { display: block; font-weight: 600; font-size: 0.92rem; margin: 16px 0 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="date"], input[type="number"], input[type="datetime-local"],
select, textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--encre);
  padding: 12px 14px;
  border: 1.5px solid var(--ligne);
  border-radius: 10px;
  background: var(--blanc);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--baiser);
  box-shadow: 0 0 0 3px rgba(200, 56, 90, 0.14);
}
.aide { font-size: 0.84rem; color: var(--encre-doux); margin-top: 5px; }

.choix-multiples { margin-top: 2px; }
.choix-multiples label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  margin: 8px 0;
}
.choix-multiples input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--baiser); }

.flash {
  padding: 13px 18px;
  border-radius: 10px;
  margin: 18px 0;
  font-weight: 600;
  font-size: 0.95rem;
}
.flash--ok { background: var(--sauge-pale); color: var(--sauge); }
.flash--erreur { background: var(--rose); color: var(--baiser-fonce); }

.chip {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.chip--sauge { background: var(--sauge-pale); color: var(--sauge); }
.chip--rose { background: var(--rose); color: var(--baiser-fonce); }
.chip--attente { background: #f5eede; color: #8a6a24; }
.chip--neutre { background: var(--voile); color: var(--encre-doux); border: 1px solid var(--ligne); }
.chip--cle { background: #f5eede; color: #8a6a24; border: 1px solid rgba(201, 154, 60, 0.45); }

/* ── La trame sonore (signature) ── */
.onde { display: flex; align-items: center; gap: 4px; height: 52px; }
.onde span {
  width: 4px;
  border-radius: 2px;
  background: var(--baiser);
  height: 30%;
  opacity: 0.85;
}
.onde span:nth-child(4n+1) { height: 55%; }
.onde span:nth-child(4n+2) { height: 90%; }
.onde span:nth-child(4n+3) { height: 40%; }
.onde span:nth-child(6n) { height: 70%; background: var(--rose-fonce); }
.onde--animee span { animation: onde-pulse 1.6s ease-in-out infinite; }
.onde--animee span:nth-child(3n) { animation-delay: 0.25s; }
.onde--animee span:nth-child(3n+1) { animation-delay: 0.55s; }
@keyframes onde-pulse {
  0%, 100% { transform: scaleY(0.6); }
  50% { transform: scaleY(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .onde--animee span { animation: none; }
}

/* ── Le fil de voix : onde en direct des enregistreurs ── */
.fil-voix {
  display: block;
  width: 100%;
  height: 72px;
  color: var(--baiser);      /* le canvas lit sa couleur de trait ici */
}

.btn-lien {
  background: none;
  border: none;
  padding: 4px 8px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--encre-doux);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.btn-lien:hover { color: var(--baiser); }

/* ── Traitement d'une réponse : envoi → transcription → analyse ── */
.traitement { display: flex; align-items: center; }
.traitement-etape {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--encre-doux);
}
.traitement-etape .pt {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: none;
  border: 2px solid var(--ligne);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--blanc);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.traitement-etape[data-etat="actif"] { color: var(--encre); }
.traitement-etape[data-etat="actif"] .pt {
  border-color: var(--baiser);
  animation: traitement-pouls 1.1s ease-in-out infinite;
}
.traitement-etape[data-etat="fait"] .pt { background: var(--sauge); border-color: var(--sauge); }
.traitement-etape[data-etat="fait"] .pt::after { content: "✓"; }
.traitement-lien { flex: 1; height: 2px; background: var(--ligne); margin: 0 10px; min-width: 18px; }
@keyframes traitement-pouls {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 56, 90, 0.35); }
  50% { box-shadow: 0 0 0 7px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .traitement-etape[data-etat="actif"] .pt { animation: none; }
}

/* ── Entrevue ── */
.question-affiche { font-size: clamp(1.4rem, 3.5vw, 1.9rem); max-width: 34ch; }
.onde--progres { height: 34px; gap: 3px; margin-top: 10px; }
.onde--progres span {
  width: 6px;
  height: 45% !important;
  background: var(--rose-fonce);
  transition: background 0.3s ease, height 0.3s ease;
}
.onde--progres span:nth-child(3n) { height: 70% !important; }
.onde--progres span:nth-child(5n) { height: 32% !important; }
.onde--progres span.rempli { background: var(--baiser); }

/* ── Étapes du profil (accueil membre) ── */
.etapes { list-style: none; }
.etapes li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 4px;
}
.etapes li + li { border-top: 1px solid var(--ligne); }
.etapes .pastille {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  border: 2px solid var(--rose-fonce);
  color: var(--encre-doux);
}
.etapes .pastille--fait {
  background: var(--sauge);
  border-color: var(--sauge);
  color: var(--blanc);
}
.etapes a { font-weight: 700; text-decoration: none; }
.etapes .fait { color: var(--encre-doux); text-decoration: line-through; font-weight: 600; }

/* ── Landing ── */
.hero { padding: 48px 0 26px; text-align: left; }
.hero h1 { max-width: 15ch; }
.hero p { max-width: 52ch; margin: 18px 0 26px; font-size: 1.08rem; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero .onde { margin: 26px 0 8px; max-width: 420px; }
.pas-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.pas-grille h3 { margin-bottom: 6px; }
.pas-grille p { font-size: 0.94rem; }

/* ── Landing : parcours numéroté et manifeste ── */
.parcours { list-style: none; margin-top: 26px; }
.parcours li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 0;
}
.parcours li + li { border-top: 1px solid var(--ligne); }
.parcours-num {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.25rem;
  background: var(--rose);
  color: var(--baiser-fonce);
}
.parcours h3 { margin-bottom: 4px; }
.parcours p { font-size: 0.97rem; }
.jamais { list-style: none; margin-top: 14px; }
.jamais li {
  padding: 9px 0 9px 30px;
  position: relative;
  font-weight: 600;
}
.jamais li::before {
  content: "✕";
  position: absolute;
  left: 4px;
  color: var(--baiser);
  font-weight: 800;
}

/* ── Admin ── */
.admin-grille {
  display: grid;
  grid-template-columns: 225px 1fr;
  min-height: 100vh;
}
.admin-nav {
  background: #291a25;
  color: var(--voile);
  padding: 26px 0;
  display: flex;
  flex-direction: column;
}
.admin-nav .marque { color: var(--voile); padding: 0 22px 22px; }
.admin-nav a.lien {
  color: rgba(251, 247, 249, 0.78);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-left: 3px solid transparent;
}
.admin-nav a.lien:hover { color: var(--voile); background: rgba(251, 247, 249, 0.06); }
.admin-nav a.lien.actif {
  color: var(--voile);
  border-left-color: var(--baiser);
  background: rgba(200, 56, 90, 0.16);
}
.admin-nav .bas { margin-top: auto; padding-top: 20px; }
.admin-contenu { padding: 34px 38px 64px; min-width: 0; }

.tuiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 22px 0 30px;
}
.tuile {
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.tuile .valeur { font-family: var(--serif); font-size: 2.2rem; line-height: 1; }
.tuile .libelle { font-size: 0.85rem; font-weight: 600; color: var(--encre-doux); margin-top: 6px; }
.tuile--alerte .valeur { color: var(--baiser); }

.tableau { width: 100%; border-collapse: collapse; background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--radius); overflow: hidden; }
.tableau th {
  text-align: left;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--encre-doux);
  padding: 12px 16px;
  border-bottom: 1px solid var(--ligne);
  background: var(--voile);
}
.tableau td { padding: 11px 16px; border-bottom: 1px solid var(--ligne); font-size: 0.94rem; vertical-align: top; }
.tableau tr:last-child td { border-bottom: none; }
.tableau-defile { overflow-x: auto; }

.mono { font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: 0.85em; }
.muted { color: var(--encre-doux); }
.mt { margin-top: 26px; }
.mb { margin-bottom: 18px; }

/* ── Transcription d'entrevue (admin) ── */
.transcript { list-style: none; max-width: 760px; }
.transcript-tour {
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.transcript-tour + .transcript-tour { margin-top: 12px; }
.transcript-tour--relance { border-left: 3px solid var(--baiser); }
.transcript-code { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.transcript-question { font-weight: 700; color: var(--encre); }
.transcript-reponse { margin-top: 8px; }
.transcript-tour audio { width: 100%; margin-top: 12px; }

/* ── Photos : galerie et zone de dépôt ── */
.galerie-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.photo-carte {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--rose);
  box-shadow: 0 1px 3px rgba(51, 32, 46, 0.08);
}
.photo-carte img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.photo-carte .chip { position: absolute; top: 8px; left: 8px; box-shadow: 0 1px 3px rgba(51, 32, 46, 0.25); }
.photo-suppr {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(51, 32, 46, 0.55);
  color: var(--blanc);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}
.photo-suppr:hover { background: var(--baiser-fonce); }
.photo-motif {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 10px 8px;
  font-size: 0.78rem;
  color: var(--blanc);
  background: linear-gradient(transparent, rgba(51, 32, 46, 0.82));
}
.depot {
  display: block;
  border: 2px dashed var(--rose-fonce);
  border-radius: var(--radius);
  background: var(--blanc);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.depot:hover, .depot.depot--survol {
  border-color: var(--baiser);
  background: var(--rose);
}
.depot--survol { transform: scale(1.01); }
.depot-icone {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--rose);
  color: var(--baiser);
  display: grid;
  place-items: center;
}
.depot:hover .depot-icone, .depot--survol .depot-icone { background: var(--blanc); }
.depot-texte { font-weight: 700; color: var(--encre); }
.depot input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.apercus {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.apercus .photo-carte { animation: apercu-entree 0.25s ease; }
@keyframes apercu-entree {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .apercus .photo-carte { animation: none; }
}

/* ── Proposition de lieu de l'autre : bloc mis en avant ── */
.proposition-lieu {
  border: 2px solid var(--baiser);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 14px 0 18px;
  background: var(--voile);
}

/* ── Créneaux de rencontre : retrait d'une disponibilité ── */
.creneau-suppr {
  width: 26px;
  height: 26px;
  flex: none;
  border: none;
  border-radius: 50%;
  background: var(--rose);
  color: var(--baiser-fonce);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.creneau-suppr:hover { background: var(--baiser); color: var(--blanc); }

/* ── Notifications : expéditeur toujours identifié ── */
.notif-de {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--baiser);
  margin-bottom: 10px;
}
.notif-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--ligne);
}

/* ── Clavardage ── */
.bulle {
  align-self: flex-start;
  max-width: 78%;
  background: var(--rose);
  border-radius: 14px 14px 14px 4px;
  padding: 9px 14px;
  font-size: 0.97rem;
}
.bulle--moi {
  align-self: flex-end;
  background: var(--baiser);
  color: var(--blanc);
  border-radius: 14px 14px 4px 14px;
}
.bulle-heure {
  display: block;
  font-size: 0.68rem;
  opacity: 0.65;
  margin-top: 2px;
  text-align: right;
}

/* ── Pages centrées (connexion) ── */
.page-etroite { max-width: 430px; margin: 6vh auto 0; padding: 0 20px; }
.page-etroite .carte { padding: 34px; }
.page-etroite h1 { font-size: 1.7rem; margin-bottom: 4px; }

@media (max-width: 800px) {
  .admin-grille { grid-template-columns: 1fr; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px; padding: 12px 8px; }
  .admin-nav .marque { padding: 6px 14px; }
  .admin-nav a.lien { padding: 8px 12px; border-left: none; border-radius: 8px; }
  .admin-nav .bas { margin-top: 0; padding-top: 0; }
  .admin-contenu { padding: 22px 18px 48px; }
}
