/* ==========================================================================
   UNIVERS - feuille de style unique
   Mobile d'abord. Sombre par defaut, clair si le telephone est en mode clair.
   ========================================================================== */

:root {
  --violet:  #7C5CFF;
  --rose:    #FF5CA8;
  --menthe:  #3DDC97;
  --jaune:   #FFD166;
  --bleu:    #4CC9F0;

  --degrade:        linear-gradient(135deg, #7C5CFF 0%, #FF5CA8 100%);
  --degrade-menthe: linear-gradient(135deg, #3DDC97 0%, #4CC9F0 100%);
  --degrade-jaune:  linear-gradient(135deg, #FFD166 0%, #FF8C42 100%);

  --nuit:       #0A0A12;
  --surface:    #14141F;
  --surface-2:  #1D1D2B;
  --bord:       rgba(255, 255, 255, 0.09);
  --texte:      #F3F3F8;
  --texte-doux: #9695AE;

  --r-s:  12px;
  --r-m:  20px;
  --r-l:  28px;
  --r-xl: 36px;

  --ombre:       0 8px 32px rgba(0, 0, 0, 0.4);
  --ombre-lueur: 0 8px 32px rgba(124, 92, 255, 0.35);

  --nav-h: 72px;
}

/* Le theme clair est defini plus bas, avec la bascule manuelle : il doit
   pouvoir l'emporter sur la preference systeme, ce qu'un simple bloc
   @media ici ne permettrait pas. */

* { box-sizing: border-box; }

/* Un élément masqué l'est toujours, même si une classe lui donne un
   display : sans cette règle, le display de la classe l'emporte. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--nuit);
  color: var(--texte);
  font-family: 'Outfit', ui-rounded, 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* Halo colore en fond, fixe, tres discret */
body::before {
  content: '';
  position: fixed;
  inset: -30% -30% auto -30%;
  height: 70vh;
  background:
    radial-gradient(closest-side, rgba(124, 92, 255, 0.30), transparent 70%),
    radial-gradient(closest-side, rgba(255, 92, 168, 0.22), transparent 70%);
  background-position: 20% 0%, 85% 15%;
  background-size: 70% 100%, 60% 90%;
  background-repeat: no-repeat;
  filter: blur(24px);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; }

.app {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
}

/* ---------- Entete ---------- */

.entete {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(20px + env(safe-area-inset-top)) 0 18px;
}

.entete-texte { flex: 1; min-width: 0; }

.entete .salut {
  font-size: 13px;
  color: var(--texte-doux);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
}

.entete h1 { font-size: 26px; }

.pastille {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  font-size: 26px;
  background: var(--degrade);
  box-shadow: var(--ombre-lueur);
  border: none;
  cursor: pointer;
}

.pastille.violet { background: var(--degrade); }
.pastille.rose   { background: linear-gradient(135deg, #FF5CA8, #FF8C42); }
.pastille.menthe { background: var(--degrade-menthe); }
.pastille.jaune  { background: var(--degrade-jaune); }
.pastille.bleu   { background: linear-gradient(135deg, #4CC9F0, #7C5CFF); }

/* ---------- Cartes ---------- */

.carte {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--r-l);
  padding: 22px;
  box-shadow: var(--ombre);
}

/* ---------- Bandeau collectif ---------- */

.collectif {
  position: relative;
  overflow: hidden;
  background: var(--degrade);
  border: none;
  color: #fff;
  margin-bottom: 26px;
}

.collectif::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -60px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

.collectif .intitule {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
  opacity: 0.85;
}

.collectif .chiffre {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 4px 0 2px;
}

.collectif .detail { font-size: 14px; opacity: 0.9; }

.jauge {
  position: relative;
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  margin-top: 16px;
  overflow: hidden;
}

.jauge span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 99px;
  background: #fff;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Le chemin ---------- */

.saison-titre {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--texte-doux);
}

.saison-titre::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bord);
}

.chemin { position: relative; padding: 18px 0 8px; }

.trace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.trace path {
  fill: none;
  stroke: var(--bord);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 2 14;
}

.trace path.parcouru {
  stroke: url(#degradeTrace);
  stroke-dasharray: none;
  stroke-width: 5;
  opacity: 0.55;
}

.jalon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 20px;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jalon:active { transform: scale(0.96); }

/* La sinusoide. On compte en nth-of-type : le <svg> du trace est le premier
   enfant de .chemin, il fausserait un nth-child. Cycle de 4 pour qu'une
   saison courte montre quand meme une ondulation complete. */
.jalon:nth-of-type(4n+1) { margin-left: 0; }
.jalon:nth-of-type(4n+2) { margin-left: 12%; }
.jalon:nth-of-type(4n+3) { margin-left: 20%; }
.jalon:nth-of-type(4n+4) { margin-left: 12%; }

.bulle {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  font-size: 25px;
  font-weight: 800;
  background: var(--surface-2);
  border: 2px solid var(--bord);
  color: var(--texte-doux);
}

.jalon.fait .bulle {
  background: var(--degrade-menthe);
  border-color: transparent;
  color: #06231a;
  box-shadow: 0 6px 22px rgba(61, 220, 151, 0.35);
}

.jalon.courant .bulle {
  background: var(--degrade);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--ombre-lueur);
}

/* Anneau qui pulse sur l'etape en cours */
.jalon.courant .bulle::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--violet);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0%   { transform: scale(0.92); opacity: 0.9; }
  70%  { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}

/* Les seances a venir ne sont plus grisees : grisé voulait dire « pas
   cliquable » aux yeux des jeunes, alors qu'on s'y inscrit aux postes.
   Un contour violet en pointille dit « pas encore vecu », sans eteindre. */
.jalon.futur .bulle {
  background: color-mix(in srgb, var(--violet) 10%, var(--surface));
  border: 2px dashed color-mix(in srgb, var(--violet) 70%, transparent);
  color: var(--violet);
}

.jalon-texte { min-width: 0; }

.jalon-texte .num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

.jalon-texte .nom {
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.jalon .coche {
  position: absolute;
  left: 46px;
  top: 44px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--menthe);
  color: #06231a;
  font-size: 13px;
  border: 3px solid var(--nuit);
}

/* ---------- Panneau d'etape ---------- */

.voile {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 5, 12, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.voile.ouvert { opacity: 1; pointer-events: auto; }

.panneau {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  max-height: 92dvh;
  overflow-y: auto;
  padding: 12px 22px calc(28px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border-top: 1px solid var(--bord);
  transform: translateY(102%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.panneau.ouvert { transform: translateY(0); }

@media (min-width: 640px) {
  .panneau {
    left: 50%;
    right: auto;
    bottom: 24px;
    width: 560px;
    transform: translate(-50%, 130%);
    border-radius: var(--r-xl);
    border: 1px solid var(--bord);
  }
  .panneau.ouvert { transform: translate(-50%, 0); }
}

.panneau .etiquette {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--texte-doux);
  margin-bottom: 12px;
}

.panneau h2 { font-size: 26px; margin-bottom: 10px; }
.panneau .resume { color: var(--texte-doux); margin-bottom: 22px; }

.question {
  border-radius: var(--r-m);
  background: var(--surface-2);
  padding: 18px;
  margin-bottom: 18px;
}

.question .libelle {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 6px;
}

.question p { font-size: 17px; font-weight: 500; }

/* Fiche pratique de la seance : date, format, references */
.fiche {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.fiche li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--texte-doux);
}

.fiche .ic { flex: none; font-size: 15px; line-height: 1.5; }

/* Le fil rouge de l'annee, en bas de la carte collective */
.fil-rouge {
  position: relative;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 13px;
  font-weight: 500;
  opacity: 0.9;
}

/* Le theme de l'annee, sur l'ecran de connexion */
.connexion .theme {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  background: var(--degrade);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  padding: 16px;
  border-radius: var(--r-m);
  border: 1px solid var(--bord);
  background: var(--surface-2);
  color: var(--texte);
  font: inherit;
  font-size: 16px;
}

textarea:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
textarea::placeholder { color: var(--texte-doux); }

.mention-privee {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--texte-doux);
  margin: 10px 0 20px;
}

/* ---------- Boutons ---------- */

.bouton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 17px 22px;
  border: none;
  border-radius: var(--r-m);
  background: var(--degrade);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--ombre-lueur);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.bouton:active { transform: scale(0.975); }
.bouton:disabled { opacity: 0.5; cursor: default; box-shadow: none; }

.bouton.fantome {
  background: var(--surface-2);
  color: var(--texte);
  box-shadow: none;
  border: 1px solid var(--bord);
}

.bouton.valide {
  background: var(--degrade-menthe);
  color: #06231a;
  box-shadow: 0 8px 28px rgba(61, 220, 151, 0.3);
}

.bouton.petit { width: auto; padding: 11px 18px; font-size: 14px; }

/* ---------- Badges ---------- */

.grille-badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 14px;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px;
  border-radius: var(--r-m);
  background: var(--surface-2);
  border: 1px solid var(--bord);
  text-align: center;
}

.badge .rond {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 26px;
  background: var(--surface);
}

.badge.acquis { border-color: rgba(255, 209, 102, 0.4); }
.badge.acquis .rond { background: var(--degrade-jaune); }

.badge.verrouille { opacity: 0.4; }
.badge.verrouille .rond { filter: grayscale(1); }

.badge .nom { font-size: 12px; font-weight: 600; line-height: 1.25; }

/* ---------- Mur du groupe ---------- */

.mur {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 16px 10px;
}

.membre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}

.membre .prenom {
  font-size: 13px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.membre .compte { font-size: 11px; color: var(--texte-doux); }

.anneau {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 26px;
  background: var(--surface-2);
}

/* ---------- Carnet ---------- */

.note-carte {
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--bord);
  padding: 18px;
  margin-bottom: 14px;
}

.note-carte .titre { font-weight: 700; margin-bottom: 4px; }
.note-carte .date { font-size: 12px; color: var(--texte-doux); margin-bottom: 10px; }
.note-carte .contenu { color: var(--texte-doux); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Annonces ---------- */

.annonce {
  display: flex;
  gap: 13px;
  padding: 16px 18px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--bord);
  border-left: 4px solid var(--jaune);
  margin-bottom: 12px;
}

.annonce .corps { min-width: 0; }
.annonce .meta { font-size: 12px; color: var(--texte-doux); margin-top: 6px; }

/* ---------- Vide ---------- */

.vide {
  text-align: center;
  padding: 46px 20px;
  color: var(--texte-doux);
}

.vide .emoji { font-size: 44px; display: block; margin-bottom: 12px; }

/* ---------- Navigation basse ---------- */

.barre-nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 4px;
  padding: 7px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px);
  border: 1px solid var(--bord);
  box-shadow: var(--ombre);
}

.onglet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 17px;
  border: none;
  border-radius: 99px;
  background: none;
  color: var(--texte-doux);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.onglet .ic { font-size: 20px; line-height: 1; }

.onglet.actif {
  background: var(--degrade);
  color: #fff;
}

/* ---------- Ecrans ---------- */

.ecran { display: none; animation: entree 0.32s cubic-bezier(0.22, 1, 0.36, 1); }
.ecran.actif { display: block; }

@keyframes entree {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Connexion ---------- */

.connexion {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 460px;
  margin: 0 auto;
  padding: 0 22px calc(28px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}

.connexion-haut {
  padding: clamp(40px, 10vh, 88px) 0 26px;
  text-align: center;
}

.logo-parcours {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  border-radius: 26px;
  font-size: 42px;
  background: var(--degrade);
  box-shadow: var(--ombre-lueur);
  transform: rotate(-6deg);
}

.connexion h1 { font-size: 34px; margin-bottom: 8px; }
.connexion .accroche { color: var(--texte-doux); font-size: 16px; }

.grille-avatars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.choix-jeune {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--bord);
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.16s ease;
}

.choix-jeune:hover  { border-color: var(--violet); }
.choix-jeune:active { transform: scale(0.95); }
.choix-jeune .prenom { font-size: 13px; font-weight: 600; }

.pave {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 300px;
  margin: 26px auto 0;
}

.touche {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--bord);
  border-radius: 50%;
  background: var(--surface);
  font-size: 26px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.touche:active { transform: scale(0.9); background: var(--surface-2); }
.touche.vide { border: none; background: none; cursor: default; }

.points {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 26px 0 4px;
}

.point {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid var(--bord);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.18s ease;
}

.point.plein {
  background: var(--degrade);
  border-color: transparent;
  transform: scale(1.15);
}

.erreur {
  min-height: 22px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--rose);
  margin-top: 12px;
}

.secousse { animation: secousse 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97); }

@keyframes secousse {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

.lien-discret {
  display: block;
  text-align: center;
  margin-top: 26px;
  font-size: 14px;
  color: var(--texte-doux);
  text-decoration: none;
}

/* ---------- Confettis ---------- */

.confetti {
  position: fixed;
  top: -14px;
  width: 10px;
  height: 14px;
  z-index: 60;
  pointer-events: none;
  border-radius: 2px;
  animation: chute linear forwards;
}

@keyframes chute {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 34px + env(safe-area-inset-bottom));
  z-index: 70;
  transform: translate(-50%, 24px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--bord);
  box-shadow: var(--ombre);
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Espace animateur ---------- */

.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }

.tableau th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--texte-doux);
  padding: 10px 8px;
  border-bottom: 1px solid var(--bord);
}

.tableau td { padding: 12px 8px; border-bottom: 1px solid var(--bord); }
.tableau tr:last-child td { border-bottom: none; }

.enveloppe-tableau { overflow-x: auto; }

.mini-jauge {
  height: 7px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
  min-width: 70px;
}

.mini-jauge span { display: block; height: 100%; border-radius: 99px; background: var(--degrade); }

.champ {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-m);
  border: 1px solid var(--bord);
  background: var(--surface-2);
  color: var(--texte);
  font: inherit;
  font-size: 16px;
}

.champ:focus { outline: 2px solid var(--violet); outline-offset: 1px; }

.ligne-champs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ligne-champs .champ { flex: 1; min-width: 130px; }

.code-affiche {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--menthe);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Notes de staff : visibles uniquement dans l'espace animateur, jamais
   envoyees vers la page des jeunes (voir etapesPubliques() dans lib/programme.php). */
.note-staff {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: var(--r-s);
  background: color-mix(in srgb, var(--jaune) 12%, transparent);
  border-left: 3px solid var(--jaune);
  font-size: 13px;
  color: var(--texte-doux);
}

/* ==========================================================================
   Prochain rendez-vous, sur l'ecran Parcours
   ========================================================================== */

.rappel {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid var(--bord);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--ombre);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.rappel:active { transform: scale(0.985); }
.rappel:hover  { border-color: var(--violet); }

.rappel-emoji {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 22px;
  background: var(--surface-2);
}

.rappel-corps { flex: 1; min-width: 0; display: grid; gap: 2px; }

.rappel-quand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
}

.rappel-titre { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.rappel-date  { font-size: 13px; color: var(--texte-doux); }
.rappel-fleche { flex: none; font-size: 26px; color: var(--texte-doux); line-height: 1; }

/* ==========================================================================
   Le tableau de priere
   ========================================================================== */

.note-anonymat {
  padding: 14px 16px;
  margin-bottom: 22px;
  border-radius: var(--r-m);
  background: color-mix(in srgb, var(--menthe) 10%, transparent);
  border-left: 3px solid var(--menthe);
  font-size: 13px;
  line-height: 1.5;
  color: var(--texte-doux);
}

.note-anonymat strong { color: var(--texte); }

/* Le liege : une trame discrete pour que les post-it aient l'air poses. */
.tableau-liege {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 14px;
  padding: 18px 12px;
  border-radius: var(--r-l);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 8px),
    var(--surface);
  border: 1px solid var(--bord);
}

.postit {
  position: relative;
  padding: 16px 14px 12px;
  border-radius: 4px 4px 14px 4px;
  color: #1A1526;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Chaque post-it penche un peu differemment : c'est ce qui fait « tableau »
   plutot que « tableur ». */
.postit:nth-child(4n+1) { transform: rotate(-1.6deg); }
.postit:nth-child(4n+2) { transform: rotate(1.1deg); }
.postit:nth-child(4n+3) { transform: rotate(-0.6deg); }
.postit:nth-child(4n+4) { transform: rotate(1.8deg); }

.postit:hover { transform: rotate(0deg) scale(1.03); z-index: 2; }

/* La punaise */
.postit::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  margin-left: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.5), transparent 60%), #C0392B;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.postit.jaune  { background: linear-gradient(160deg, #FFE9A3, #FFD166); }
.postit.rose   { background: linear-gradient(160deg, #FFC4DD, #FF9EC7); }
.postit.menthe { background: linear-gradient(160deg, #B6F2D8, #7EE5B8); }
.postit.bleu   { background: linear-gradient(160deg, #B9E6F7, #86D5EF); }
.postit.violet { background: linear-gradient(160deg, #D6CBFF, #B7A5FF); }

.postit-texte {
  flex: 1;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.postit-pied {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
  padding-top: 8px;
  border-top: 1px solid rgba(26, 21, 38, 0.18);
}

.postit-auteur { font-weight: 700; }
.postit-date   { opacity: 0.6; white-space: nowrap; }

.postit-retirer {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(26, 21, 38, 0.14);
  color: #1A1526;
  font-size: 13px;
  cursor: pointer;
}

.postit-retirer:hover { background: rgba(26, 21, 38, 0.28); }

/* display:grid ci-dessus l'emporterait sur le display:none que le navigateur
   applique a [hidden] : on retablit explicitement. */
.postit-retirer[hidden] { display: none; }

/* ==========================================================================
   Ecran A venir
   ========================================================================== */

.agenda-abo { margin-bottom: 26px; }
.agenda-abo h2 { font-size: 19px; margin-bottom: 10px; }
.agenda-abo p  { font-size: 14px; color: var(--texte-doux); margin-bottom: 16px; }
.agenda-abo .bouton { text-decoration: none; }

.agenda-aide {
  font-size: 12px !important;
  margin: 12px 0 0 !important;
  opacity: 0.8;
}

.rdv {
  display: flex;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--bord);
}

.rdv.suivant {
  border-color: var(--violet);
  box-shadow: 0 0 0 1px var(--violet), var(--ombre);
}

.rdv-date {
  flex: none;
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  border-radius: var(--r-s);
  background: var(--surface-2);
}

.rdv.suivant .rdv-date { background: var(--degrade); color: #fff; }

.rdv-jour { font-size: 22px; font-weight: 800; line-height: 1; }
.rdv-mois { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; opacity: 0.8; }

.rdv-corps { flex: 1; min-width: 0; }
.rdv-titre { font-weight: 600; margin-bottom: 3px; overflow-wrap: anywhere; }
.rdv-meta  { font-size: 12px; color: var(--texte-doux); }

.rdv-resume {
  font-size: 13px;
  color: var(--texte-doux);
  margin-top: 8px;
  line-height: 1.45;
}

.rdv-agenda {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--bord);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--texte);
}

.rdv-agenda:hover { border-color: var(--violet); }

/* ==========================================================================
   Formulaires : sous-titres, petits champs, bascules
   ========================================================================== */

.bloc-titre {
  font-size: 15px;
  font-weight: 700;
  margin: 26px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--bord);
}

.libelle-champ {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--texte-doux);
  margin: 14px 0 6px;
}

textarea.petit-champ { min-height: 80px; font-size: 15px; }

.retour-envoye {
  padding: 16px;
  border-radius: var(--r-m);
  background: color-mix(in srgb, var(--menthe) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--menthe) 40%, transparent);
  font-weight: 600;
  text-align: center;
}

.bascule {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 16px;
  cursor: pointer;
}

.bascule input { position: absolute; opacity: 0; pointer-events: none; }

.bascule-piste {
  position: relative;
  flex: none;
  width: 46px;
  height: 27px;
  margin-top: 2px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--bord);
  transition: background 0.2s ease;
}

.bascule-piste::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--texte-doux);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}

.bascule input:checked + .bascule-piste {
  background: var(--degrade);
  border-color: transparent;
}

.bascule input:checked + .bascule-piste::after {
  transform: translateX(19px);
  background: #fff;
}

.bascule input:focus-visible + .bascule-piste {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.bascule-texte { display: grid; gap: 2px; }
.bascule-texte strong { font-size: 15px; font-weight: 600; }
.bascule-texte small  { font-size: 12px; color: var(--texte-doux); line-height: 1.4; }

/* ==========================================================================
   Cinq onglets : il faut resserrer
   ========================================================================== */

.onglet { padding: 9px 12px; white-space: nowrap; }

@media (max-width: 400px) {
  .barre-nav { gap: 0; padding: 6px; }
  .onglet     { padding: 8px 9px; font-size: 9px; }
  .onglet .ic { font-size: 18px; }
}

/* ==========================================================================
   Espace animateur : retours, sujets de priere, evenements
   ========================================================================== */

.avertissement-anonymat {
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: var(--r-m);
  background: color-mix(in srgb, var(--violet) 12%, transparent);
  border-left: 3px solid var(--violet);
  font-size: 13px;
  line-height: 1.5;
  color: var(--texte-doux);
}

.avertissement-anonymat strong { color: var(--texte); }

.sous-titre {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texte-doux);
  margin: 22px 0 10px;
}

.bloc-retours { margin-bottom: 24px; }

.bloc-retours h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  margin-bottom: 10px;
}

.bloc-retours h3 span {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

.retour {
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--r-m);
  background: var(--surface-2);
  border: 1px solid var(--bord);
}

.retour-plus,
.retour-moins {
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.retour-plus  { color: var(--texte); }
.retour-moins { color: var(--texte); margin-top: 10px; }

.retour-date {
  font-size: 11px;
  color: var(--texte-doux);
  margin-top: 10px;
}

.priere-ligne {
  padding: 14px 0;
  border-bottom: 1px solid var(--bord);
}

.priere-ligne:last-child { border-bottom: none; }
.priere-ligne p { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.priere-ligne.masquee { opacity: 0.5; }

.priere-ligne .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--texte-doux);
  margin-top: 8px;
}

.lien-action {
  padding: 0;
  border: none;
  background: none;
  color: var(--rose);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.lien-action:hover { color: var(--violet); }

/* ==========================================================================
   Marques de type de reunion
   ========================================================================== */

.marque {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--texte-doux);
  border: 1px solid var(--bord);
}

.marque.bleu   { background: color-mix(in srgb, var(--bleu) 20%, transparent);   color: var(--bleu);   border-color: color-mix(in srgb, var(--bleu) 45%, transparent); }
.marque.rose   { background: color-mix(in srgb, var(--rose) 20%, transparent);   color: var(--rose);   border-color: color-mix(in srgb, var(--rose) 45%, transparent); }
.marque.menthe { background: color-mix(in srgb, var(--menthe) 20%, transparent); color: var(--menthe); border-color: color-mix(in srgb, var(--menthe) 45%, transparent); }
.marque.invite { background: color-mix(in srgb, var(--jaune) 20%, transparent);  color: var(--jaune);  border-color: color-mix(in srgb, var(--jaune) 45%, transparent); }

.jalon-texte .marque { margin-top: 5px; }

/* ==========================================================================
   Postes de service, cote jeune
   ========================================================================== */

#blocPostes[hidden] { display: none; }

.poste {
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--r-m);
  background: var(--surface-2);
  border: 1px solid var(--bord);
}

.poste.inscrit { border-color: color-mix(in srgb, var(--menthe) 55%, transparent); }
.poste.complet { opacity: 0.6; }

.poste-entete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.poste-nom    { font-weight: 600; font-size: 15px; }
.poste-places { font-size: 12px; font-weight: 700; color: var(--texte-doux); }

.poste-gens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.poste-jeune {
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--bord);
  font-size: 12px;
  font-weight: 600;
}

.poste-vide { font-size: 12px; color: var(--texte-doux); font-style: italic; }

/* ==========================================================================
   Espace staff : navigation, edition du programme
   ========================================================================== */

.sections {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 22px;
  -webkit-overflow-scrolling: touch;
}

.sections a {
  flex: none;
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--bord);
  color: var(--texte-doux);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.sections a:hover { border-color: var(--violet); color: var(--texte); }

.seance-edit {
  border: 1px solid var(--bord);
  border-radius: var(--r-m);
  margin-bottom: 10px;
  background: var(--surface-2);
  overflow: hidden;
}

.seance-edit[open] { border-color: var(--violet); }

.seance-edit summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.seance-edit summary::-webkit-details-marker { display: none; }

.seance-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--bord);
  font-size: 13px;
  font-weight: 700;
}

.seance-resume { min-width: 0; display: grid; gap: 3px; }
.seance-titre  { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }

.seance-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--texte-doux);
}

.seance-formulaire {
  padding: 4px 16px 18px;
  border-top: 1px solid var(--bord);
}

.seance-formulaire .libelle-champ { margin-top: 14px; }

.seance-pied {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.seance-maj { font-size: 11px; color: var(--texte-doux); }

select.champ {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--texte-doux) 50%),
                    linear-gradient(135deg, var(--texte-doux) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

/* Postes vus par le staff */
.grille-postes-staff {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}

.poste-staff {
  padding: 12px 14px;
  border-radius: var(--r-s);
  background: var(--surface-2);
  border: 1px solid var(--bord);
}

.poste-staff.vide { border-color: color-mix(in srgb, var(--rose) 40%, transparent); }

.poste-staff .poste-nom { font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.poste-staff .poste-nom span { color: var(--texte-doux); font-weight: 700; }
.poste-liste { font-size: 12px; color: var(--texte-doux); margin-top: 5px; overflow-wrap: anywhere; }

/* ==========================================================================
   Administration : journal
   ========================================================================== */

.bouton.danger {
  color: var(--rose);
  border-color: color-mix(in srgb, var(--rose) 40%, transparent);
}

.filtres { display: flex; gap: 8px; flex-wrap: wrap; }

.filtre {
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--bord);
  font-size: 13px;
  font-weight: 600;
  color: var(--texte-doux);
  text-decoration: none;
}

.filtre.actif { background: var(--degrade); color: #fff; border-color: transparent; }

.ligne-journal {
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--r-s);
  background: var(--surface-2);
  border-left: 3px solid var(--bord);
}

.ligne-journal.erreur { border-left-color: var(--rose); }
.ligne-journal.action { border-left-color: var(--bleu); }

.journal-tete { display: flex; gap: 9px; align-items: flex-start; }
.journal-pastille { flex: none; }
.journal-message { font-size: 14px; overflow-wrap: anywhere; }
.journal-meta { font-size: 11px; color: var(--texte-doux); margin-top: 6px; padding-left: 26px; }

.journal-detail { margin-top: 8px; padding-left: 26px; }
.journal-detail summary { font-size: 12px; color: var(--texte-doux); cursor: pointer; }

.journal-detail pre {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: var(--r-s);
  background: var(--nuit);
  border: 1px solid var(--bord);
  font-size: 11px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Le logo UNIVERS, pose dans les pastilles et le cartouche de connexion
   ========================================================================== */

.logo-parcours img {
  width: 52%;
  height: auto;
  display: block;
}

.pastille img {
  width: 48%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Thème clair « blanc cassé » + bascule manuelle
   --------------------------------------------------------------------------
   Trois états : auto (on suit le téléphone), clair, sombre. Les deux derniers
   posent data-theme sur <html> et doivent l'emporter sur la préférence
   système — d'où la répétition des variables dans les trois blocs.
   ========================================================================== */

:root {
  --nuit:       #0A0A12;
  --surface:    #14141F;
  --surface-2:  #1D1D2B;
  --bord:       rgba(255, 255, 255, 0.09);
  --texte:      #F3F3F8;
  --texte-doux: #9695AE;
  --ombre:      0 8px 32px rgba(0, 0, 0, 0.4);
  --encre-postit: #1A1526;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="sombre"]) {
    --nuit:       #F7F4EE;
    --surface:    #FFFDF9;
    --surface-2:  #EFEAE0;
    --bord:       rgba(40, 30, 20, 0.12);
    --texte:      #221D2E;
    --texte-doux: #6B6478;
    --ombre:      0 8px 28px rgba(60, 45, 30, 0.10);
  }
}

:root[data-theme="clair"] {
  --nuit:       #F7F4EE;
  --surface:    #FFFDF9;
  --surface-2:  #EFEAE0;
  --bord:       rgba(40, 30, 20, 0.12);
  --texte:      #221D2E;
  --texte-doux: #6B6478;
  --ombre:      0 8px 28px rgba(60, 45, 30, 0.10);
}

:root[data-theme="sombre"] {
  --nuit:       #0A0A12;
  --surface:    #14141F;
  --surface-2:  #1D1D2B;
  --bord:       rgba(255, 255, 255, 0.09);
  --texte:      #F3F3F8;
  --texte-doux: #9695AE;
  --ombre:      0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Le halo coloré du fond est trop violent sur un fond crème. */
:root[data-theme="clair"] body::before { opacity: 0.35; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="sombre"]) body::before { opacity: 0.35; }
}

/* Les boutons ronds de l'en-tête : thème, anniversaires. */
.bascule-theme,
.bouton-rond {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--bord);
  background: var(--surface);
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.bascule-theme:active,
.bouton-rond:active { transform: scale(0.92); }

.connexion .bascule-theme {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 18px;
  z-index: 2;
}

/* ==========================================================================
   Panneaux : poignée franche, et plus de bouton « Fermer »
   ========================================================================== */

.poignee {
  width: 100%;
  padding: 10px 0 14px;
  margin: 0 0 6px;
  cursor: grab;
  touch-action: none;
  position: relative;
}

.poignee::after {
  content: '';
  display: block;
  width: 46px;
  height: 5px;
  margin: 0 auto;
  border-radius: 99px;
  background: var(--texte-doux);
  opacity: 0.45;
}

.poignee:active { cursor: grabbing; }

/* Le panneau ne monte jamais jusqu'en haut : c'est ce bandeau visible
   derrière lui qui dit « ça se referme en tirant ». */
.panneau { max-height: 88dvh; }

/* ---------- En-tête du panneau ---------- */

.panneau-entete {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.panneau-titres { flex: 1; min-width: 0; }
.panneau-entete h2 { font-size: 25px; margin: 8px 0 4px; }

.panneau-date {
  font-size: 14px;
  color: var(--texte-doux);
  font-weight: 500;
}

.bouton-agenda {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 9px 12px;
  border-radius: var(--r-m);
  background: var(--surface-2);
  border: 1px solid var(--bord);
  color: var(--texte);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.bouton-agenda span { font-size: 10px; font-weight: 600; letter-spacing: 0.02em; }
.bouton-agenda:hover { border-color: var(--violet); }

/* ==========================================================================
   Références bibliques : grandes, vertes, cliquables
   ========================================================================== */

.versets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 20px;
}

.verset {
  display: inline-block;
  padding: 10px 16px;
  border-radius: var(--r-m);
  background: color-mix(in srgb, var(--menthe) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--menthe) 45%, transparent);
  color: var(--menthe);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

a.verset:active { transform: scale(0.96); }
a.verset:hover  { background: color-mix(in srgb, var(--menthe) 26%, transparent); }

/* En thème clair, le vert menthe sur fond crème manque de contraste. */
:root[data-theme="clair"] .verset { color: #0E7A52; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="sombre"]) .verset { color: #0E7A52; }
}

/* ==========================================================================
   Retour à l'équipe
   ========================================================================== */

.mention-anonyme {
  display: inline-block;
  padding: 4px 12px;
  margin: -6px 0 14px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--violet) 16%, transparent);
  color: var(--violet);
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   Post-it : tous de la même taille, le trop-long se lit en grand
   ========================================================================== */

.postit {
  min-height: 150px;
  max-height: 150px;
  cursor: pointer;
}

.postit-texte {
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-clamp: 4;
}

.postit-plus {
  position: absolute;
  right: 10px;
  bottom: 34px;
  padding: 0 6px;
  border: none;
  border-radius: 6px;
  background: rgba(26, 21, 38, 0.12);
  color: var(--encre-postit);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.panneau-lecture .lecture-texte {
  font-size: 18px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0 18px;
}

.lecture-pied {
  font-size: 13px;
  color: var(--texte-doux);
  font-weight: 600;
  padding-top: 14px;
  border-top: 1px solid var(--bord);
}

/* ==========================================================================
   Invitation aux notifications, en haut du parcours
   ========================================================================== */

.invitation {
  padding: 18px;
  margin-bottom: 22px;
  border-radius: var(--r-l);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--violet) 45%, transparent);
  box-shadow: var(--ombre);
}

.invitation-titre { font-size: 17px; font-weight: 700; margin-bottom: 6px; }

.invitation-texte {
  font-size: 14px;
  color: var(--texte-doux);
  line-height: 1.5;
  margin-bottom: 14px;
}

.invitation-boutons { display: flex; gap: 10px; flex-wrap: wrap; }
.invitation-boutons .bouton { width: auto; flex: 1; min-width: 130px; }

/* ==========================================================================
   Événements sur le chemin
   ========================================================================== */

.jalon.evenement { opacity: 1; }

.jalon.evenement .bulle {
  background: var(--degrade-jaune);
  border-color: transparent;
  color: #3A2600;
  font-size: 26px;
  box-shadow: 0 6px 22px rgba(255, 209, 102, 0.32);
}

.jalon.evenement .num { color: var(--jaune); }

/* ==========================================================================
   Agenda, en pied de parcours
   ========================================================================== */

.aide-agenda {
  margin-top: 16px;
  font-size: 13px;
  color: var(--texte-doux);
}

.aide-agenda summary { cursor: pointer; font-weight: 600; }
.aide-agenda p { margin-top: 10px; line-height: 1.5; }

/* ==========================================================================
   Boutons occupés
   ========================================================================== */

.bouton.occupe {
  opacity: 0.75;
  cursor: progress;
}

/* Un poste sans personne, côté staff : le contour doit sauter aux yeux. */
.poste-staff.vide {
  border-color: var(--rose);
  border-width: 2px;
  background: color-mix(in srgb, var(--rose) 10%, transparent);
}

.poste-staff.vide .poste-liste { color: var(--rose); font-weight: 700; }

/* Quatre onglets : on peut respirer un peu plus. */
.onglet { padding: 9px 16px; }

@media (max-width: 400px) {
  .onglet { padding: 8px 12px; font-size: 10px; }
  .onglet .ic { font-size: 19px; }
}

/* Lignes de diagnostic dans l'administration */
.ligne-diag {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  font-size: 14px;
  line-height: 1.5;
  border-bottom: 1px solid var(--bord);
}

.ligne-diag:last-of-type { border-bottom: none; }
.ligne-diag.ko { color: var(--rose); }
.ligne-diag.ko strong { color: var(--rose); }

/* ==========================================================================
   Uni Dej : propositions de restos
   ========================================================================== */

#blocRestos[hidden] { display: none; }

.resto {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 13px 16px;
  margin-bottom: 10px;
  border-radius: var(--r-m);
  background: var(--surface-2);
  border: 1px solid var(--bord);
}

.resto-corps { flex: 1; min-width: 0; }
.resto-nom   { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }

.resto-adresse {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--bleu);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.resto-qui { margin-top: 6px; font-size: 12px; color: var(--texte-doux); }

.resto-retirer {
  flex: none;
  align-self: flex-start;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--texte-doux);
  cursor: pointer;
}

.form-resto { display: grid; gap: 10px; margin-top: 6px; }
.form-resto[hidden] { display: none; }

/* Bandeau de la copie de test (jamais affiche sur la vraie application) */
.bandeau-test {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 6px 12px;
  background: var(--jaune);
  color: #3A2600;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* Espace staff : choix des postes d'un événement */
.choix-postes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 8px;
  margin: 4px 0 12px;
}

.choix-poste {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-s);
  background: var(--surface-2);
  border: 1px solid var(--bord);
  font-size: 13px;
}

.choix-poste input[type="number"] {
  width: 52px;
  margin-left: auto;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--bord);
  background: var(--surface);
  color: var(--texte);
}

.postes-evenement { margin-top: 10px; }
.postes-evenement summary { cursor: pointer; font-size: 13px; color: var(--texte-doux); }

.choix-poste span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   Anniversaires
   ========================================================================== */

/* Trois boutons dans l'en-tête : sur un petit écran, on les resserre pour
   laisser de la place au titre. */
@media (max-width: 380px) {
  .entete { gap: 10px; }
  .entete .bascule-theme,
  .entete .bouton-rond { width: 36px; height: 36px; font-size: 16px; }
  .entete .pastille { width: 46px; height: 46px; font-size: 23px; }
}

/* Le bandeau d'accueil reprend la carte « Prochain rendez-vous », en rose. */
.anniv-bandeau .rappel-quand { color: var(--rose); }

.rappel.fete {
  border-color: color-mix(in srgb, var(--rose) 55%, transparent);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--rose) 22%, var(--surface)),
    color-mix(in srgb, var(--violet) 18%, var(--surface)));
}

.rappel.fete .rappel-emoji { background: var(--degrade-jaune); }
.rappel.fete:hover { border-color: var(--rose); }

/* ---------- Sa propre date ---------- */

.mon-anniv {
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--r-m);
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--violet) 40%, transparent);
}

.mon-anniv-titre { font-weight: 700; margin-bottom: 10px; }

.anniv-champs { display: flex; gap: 8px; }

.anniv-champs .champ {
  flex: 1;
  min-width: 0;
  padding-top: 11px;
  padding-bottom: 11px;
  font-size: 15px;
}

.mon-anniv .anniv-champs .champ { background-color: var(--surface); }

.anniv-champs .bouton { flex: none; }

.mon-anniv-retirer {
  display: block;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--rose);
  cursor: pointer;
}

/* ---------- La liste ---------- */

.liste-annivs {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.anniv {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border-radius: var(--r-m);
  background: var(--surface-2);
}

.anniv-date {
  flex: none;
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 0 6px;
  border-radius: var(--r-s);
  background: var(--surface);
  line-height: 1;
}

.anniv-jour { font-size: 20px; font-weight: 800; }

.anniv-mois {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

.anniv-qui {
  flex: 1;
  min-width: 0;
  display: grid;
  justify-items: start;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.anniv-quand {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--rose);
  text-align: right;
}

.anniv.fete { background: color-mix(in srgb, var(--rose) 14%, var(--surface-2)); }
.anniv.fete .anniv-date { background: var(--degrade-jaune); color: #3A2600; }

.anniv.moi { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--violet) 55%, transparent); }

.anniv-modifier {
  padding: 2px 0 0;
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--violet);
  cursor: pointer;
}

/* Côté admin : un petit champ par compte, à remplir d'une traite. */
.champ-anniv {
  width: 78px;
  padding: 7px 10px;
  font-size: 13px;
  text-align: center;
}

/* ---------- Invitation d'anniversaire, sur l'accueil ---------- */

.invitation-anniv { border-color: color-mix(in srgb, var(--rose) 45%, transparent); }

/* « J'y vais » depuis la liste : la carte s'illumine un instant. */
.invitation.appel { animation: appel 1.1s ease 2; }

@keyframes appel {
  50% {
    box-shadow: 0 0 0 3px var(--rose), 0 0 42px rgba(255, 92, 168, 0.55);
  }
}

/* ---------- La liste, tant qu'on n'a pas donné sa date ---------- */

.annivs-verrou {
  margin-top: 14px;
  padding: 20px 18px;
  border-radius: var(--r-m);
  background: var(--surface-2);
  text-align: center;
}

.annivs-verrou p {
  margin-bottom: 14px;
  color: var(--texte-doux);
  line-height: 1.5;
}

.annivs-verrou .bouton { margin-inline: auto; }

.annivs-manquants {
  margin-top: 14px;
  font-size: 12px;
  color: var(--texte-doux);
  text-align: center;
}

/* ==========================================================================
   Toute première ouverture : les invitations sous le projecteur
   --------------------------------------------------------------------------
   Le voile est posé DANS .app, qui forme son propre empilement (z-index 1) :
   posé dans body, il passerait par-dessus les cartes quel que soit leur
   z-index. La barre du bas vit hors de .app : on l'éteint à part.
   ========================================================================== */

.projecteur-voile {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(5, 5, 12, 0.8);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.projecteur-voile.visible { opacity: 1; }

.invitations.en-lumiere { position: relative; z-index: 21; }

.invitations.en-lumiere .invitation {
  border-color: transparent;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--violet) 20%, var(--surface)),
    color-mix(in srgb, var(--rose) 12%, var(--surface)));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--violet) 75%, transparent),
    0 18px 50px rgba(124, 92, 255, 0.45),
    0 0 90px rgba(255, 92, 168, 0.28);
  animation: surgir 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.invitations.en-lumiere .invitation + .invitation { animation-delay: 0.12s; }

@keyframes surgir {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
}

.projecteur-passer {
  display: block;
  margin: -4px auto 22px;
  padding: 8px 18px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

body.projecteur { overflow: hidden; }

body.projecteur .barre-nav {
  opacity: 0.12;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
