/* ==========================================================================
   Lyôba — inscriptions bénévoles
   Charte reprise des logos : bleu pétrole #124B5D / or #C19E70
   ========================================================================== */

:root {
  --bleu: #124B5D;
  --bleu-fonce: #0C3543;
  --bleu-clair: #1E6B83;
  --or: #C19E70;
  --or-clair: #DFC9A6;
  --or-pale: #F3E9DA;

  --creme: #FBF7F0;
  --papier: #FFFFFF;
  --encre: #1B2A30;
  --encre-douce: #5A6B72;
  --trait: #E4DACA;

  --vert: #2E7D58;
  --vert-pale: #E6F2EB;
  --ambre: #A9741A;
  --ambre-pale: #FBF0DA;
  --rouge: #A93226;
  --rouge-pale: #FAE9E7;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --ombre: 0 1px 2px rgba(18, 75, 93, .06), 0 8px 24px rgba(18, 75, 93, .07);
  --ombre-forte: 0 12px 40px rgba(18, 75, 93, .18);

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* L'attribut hidden doit primer sur nos règles display (.connexion, .vue…). */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--encre);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }

/* Cormorant utilise des chiffres elzéviriens par défaut : le « 1 » y ressemble
   à un I. On force les chiffres bas de casse alignés partout où l'on affiche
   des nombres en serif (dates, compteurs, statistiques). */
.jour__date, .avancement__titre, .stat__valeur, .panier__texte b, .modale__titre,
.jour-separateur td, .admin-entete__marque {
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

a { color: var(--bleu); }

.conteneur { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* ---------- En-tête public ---------- */

.entete {
  position: relative;
  background:
    radial-gradient(1200px 400px at 50% -160px, rgba(193, 158, 112, .28), transparent 70%),
    linear-gradient(180deg, #FFFDF9 0%, var(--creme) 100%);
  border-bottom: 1px solid var(--trait);
  padding: 40px 0 34px;
  text-align: center;
  overflow: hidden;
}
.entete::after {
  content: "";
  position: absolute; inset-inline: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--or), transparent);
}

.entete__logo { width: min(280px, 62vw); height: auto; display: block; margin: 0 auto 8px; }
.entete__soustitre {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3.4vw, 1.75rem);
  color: var(--bleu);
  margin: 0;
}
.entete__orga {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 14px; font-size: .84rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--encre-douce);
}
.entete__orga img { height: 44px; width: auto; }

/* ---------- Bandeau de progression ---------- */

.avancement {
  margin-top: 26px;
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: var(--r-l);
  padding: 20px 24px;
  box-shadow: var(--ombre);
  text-align: left;
}
.avancement__ligne { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: baseline; justify-content: space-between; }
.avancement__titre { font-family: var(--serif); font-size: 1.3rem; color: var(--bleu); }
.avancement__chiffre { font-variant-numeric: tabular-nums; font-weight: 600; }
.avancement__chiffre b { font-size: 1.5rem; color: var(--bleu); }
.jauge { height: 10px; border-radius: 99px; background: var(--or-pale); overflow: hidden; margin-top: 14px; }
.jauge__barre { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--bleu-clair), var(--bleu)); transition: width .5s ease; }
.avancement__note { margin: 10px 0 0; font-size: .9rem; color: var(--encre-douce); }

/* ---------- Corps ---------- */

.intro { max-width: 68ch; margin: 34px auto 0; text-align: center; color: var(--encre-douce); }

.barre-outils {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin: 30px 0 18px;
}
.legende { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .85rem; color: var(--encre-douce); }
.legende span { display: inline-flex; align-items: center; gap: 7px; }
.pastille { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.pastille--libre { background: var(--vert); }
.pastille--presque { background: var(--ambre); }
.pastille--complet { background: var(--encre-douce); }

/* ---------- Journées ---------- */

.jour { margin-bottom: 26px; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--r-l); box-shadow: var(--ombre); overflow: hidden; }
.jour__entete {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  padding: 16px 22px; background: linear-gradient(180deg, #FFFDF9, var(--or-pale));
  border-bottom: 1px solid var(--trait);
}
.jour__date { font-family: var(--serif); font-size: 1.45rem; color: var(--bleu); }
.jour__date::first-letter { text-transform: uppercase; }
.jour__resume { font-size: .85rem; color: var(--encre-douce); margin-left: auto; font-variant-numeric: tabular-nums; }

.creneaux { list-style: none; margin: 0; padding: 0; }
.creneaux li + li { border-top: 1px solid var(--trait); }

/* ---------- Carte créneau ---------- */

.creneau {
  display: grid;
  grid-template-columns: 26px minmax(130px, auto) 1fr auto;
  gap: 4px 18px;
  align-items: center;
  width: 100%;
  padding: 16px 22px;
  background: none; border: 0; text-align: left;
  font: inherit; color: inherit;
  cursor: pointer;
  transition: background .15s ease;
}
.creneau:hover:not(:disabled) { background: #FCFAF6; }
.creneau:focus-visible { outline: 3px solid var(--bleu-clair); outline-offset: -3px; }
.creneau:disabled { cursor: not-allowed; background: #FAFAF8; }
.creneau:disabled .creneau__heure, .creneau:disabled .creneau__poste { color: var(--encre-douce); }

.creneau__case {
  width: 24px; height: 24px; border-radius: 7px;
  border: 2px solid var(--trait); background: var(--papier);
  display: grid; place-items: center; flex: none;
  transition: all .15s ease;
}
.creneau__case svg { width: 14px; height: 14px; opacity: 0; transform: scale(.6); transition: all .15s ease; }
.creneau[aria-pressed="true"] { background: #F2F8FA; }
.creneau[aria-pressed="true"] .creneau__case { background: var(--bleu); border-color: var(--bleu); }
.creneau[aria-pressed="true"] .creneau__case svg { opacity: 1; transform: scale(1); stroke: #fff; }
.creneau:disabled .creneau__case { border-style: dashed; background: transparent; }

.creneau__heure { font-size: 1.12rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--bleu); white-space: nowrap; }
.creneau__lendemain { font-size: .72rem; font-weight: 500; color: var(--encre-douce); margin-left: 4px; }
.creneau__poste { font-size: .92rem; color: var(--encre-douce); }
.creneau__etiquette {
  display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 99px;
  background: var(--or-pale); color: #7A5B2C; font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; vertical-align: 2px;
}
.creneau__notes { grid-column: 3; font-size: .84rem; color: var(--encre-douce); font-style: italic; }

.creneau__etat { display: flex; align-items: center; gap: 12px; justify-self: end; }
.points { display: flex; gap: 5px; }
.point { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--or); background: transparent; }
.point--pris { background: var(--bleu); border-color: var(--bleu); }
.point--requis { border-style: dashed; }

.badge {
  font-size: .78rem; font-weight: 600; padding: 4px 11px; border-radius: 99px; white-space: nowrap;
  border: 1px solid transparent;
}
.badge--libre { background: var(--vert-pale); color: var(--vert); border-color: #C9E3D5; }
.badge--presque { background: var(--ambre-pale); color: var(--ambre); border-color: #EEDCB6; }
.badge--complet { background: #EEF0F1; color: var(--encre-douce); border-color: #DDE1E3; }
.badge--ferme { background: #EEF0F1; color: var(--encre-douce); border-color: #DDE1E3; }

/* ---------- Panier flottant ---------- */

.panier {
  position: sticky; bottom: 0; z-index: 40;
  margin: 26px 0 0;
  transform: translateY(150%); transition: transform .28s cubic-bezier(.2,.8,.3,1), visibility .28s;
  visibility: hidden; /* au repos, la barre ne doit pas rester dessinée */
}
.panier--visible { transform: translateY(0); visibility: visible; }
.panier__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: var(--bleu); color: #fff;
  border-radius: var(--r-l); padding: 14px 18px;
  box-shadow: var(--ombre-forte);
  margin-bottom: 18px;
}
.panier__texte { font-weight: 500; }
.panier__texte b { font-family: var(--serif); font-size: 1.35rem; }
.panier__actions { margin-left: auto; display: flex; gap: 10px; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem;
  padding: 11px 20px; border-radius: 99px; border: 1px solid transparent;
  cursor: pointer; transition: all .15s ease; text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--or { background: var(--or); color: #2A1F0E; }
.btn--or:hover:not(:disabled) { background: var(--or-clair); }
.btn--bleu { background: var(--bleu); color: #fff; }
.btn--bleu:hover:not(:disabled) { background: var(--bleu-clair); }
.btn--fantome { background: transparent; color: inherit; border-color: currentColor; opacity: .85; }
.btn--fantome:hover:not(:disabled) { opacity: 1; }
.btn--contour { background: var(--papier); color: var(--bleu); border-color: var(--trait); }
.btn--contour:hover:not(:disabled) { border-color: var(--bleu); }
.btn--danger { background: var(--rouge-pale); color: var(--rouge); border-color: #EBC9C4; }
.btn--petit { padding: 6px 13px; font-size: .84rem; }

/* ---------- Modale ---------- */

.modale {
  position: fixed; inset: 0; z-index: 60;
  display: none; align-items: flex-start; justify-content: center;
  background: rgba(12, 53, 67, .55); backdrop-filter: blur(3px);
  padding: 24px 16px; overflow-y: auto;
}
.modale--ouverte { display: flex; }
.modale__boite {
  background: var(--creme); border-radius: var(--r-l); width: min(620px, 100%);
  box-shadow: var(--ombre-forte); overflow: hidden; margin: auto;
  animation: monte .25s cubic-bezier(.2,.8,.3,1);
}
@keyframes monte { from { opacity: 0; transform: translateY(18px); } }
.modale__entete {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px 26px 18px; background: var(--papier); border-bottom: 1px solid var(--trait);
}
.modale__titre { font-size: 1.6rem; color: var(--bleu); }
.modale__soustitre { font-size: .9rem; color: var(--encre-douce); margin: 4px 0 0; }
.modale__fermer {
  margin-left: auto; background: none; border: 0; cursor: pointer; font-size: 1.6rem;
  line-height: 1; color: var(--encre-douce); padding: 4px 8px; border-radius: 8px;
}
.modale__fermer:hover { background: var(--or-pale); color: var(--encre); }
.modale__corps { padding: 22px 26px; }
.modale__pied { padding: 18px 26px; background: var(--papier); border-top: 1px solid var(--trait); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.recap { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.recap li {
  display: flex; align-items: center; gap: 12px;
  background: var(--papier); border: 1px solid var(--trait); border-radius: var(--r-m);
  padding: 10px 14px; font-size: .93rem;
}
.recap__jour { font-weight: 600; color: var(--bleu); }
.recap__jour::first-letter { text-transform: uppercase; }
.recap__heure { font-variant-numeric: tabular-nums; margin-left: auto; color: var(--encre-douce); }
.recap__retirer { background: none; border: 0; cursor: pointer; color: var(--encre-douce); font-size: 1.1rem; padding: 0 4px; border-radius: 6px; }
.recap__retirer:hover { color: var(--rouge); }

/* ---------- Formulaires ---------- */

.champs { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ--large { grid-column: 1 / -1; }
.champ label { font-size: .86rem; font-weight: 600; color: var(--bleu); }
.champ small { font-size: .78rem; color: var(--encre-douce); font-weight: 400; }
.champ input, .champ textarea, .champ select {
  font: inherit; font-size: .95rem; padding: 10px 13px;
  border: 1px solid var(--trait); border-radius: var(--r-s); background: var(--papier); color: var(--encre);
  width: 100%;
}
.champ input:focus, .champ textarea:focus, .champ select:focus {
  outline: none; border-color: var(--bleu-clair); box-shadow: 0 0 0 3px rgba(30, 107, 131, .15);
}
.champ textarea { resize: vertical; min-height: 78px; }
.champ--case { flex-direction: row; align-items: center; gap: 9px; }
.champ--case input { width: auto; }
.champ--case label { font-weight: 500; }

/* ---------- Messages ---------- */

.message { padding: 12px 16px; border-radius: var(--r-m); font-size: .9rem; margin-bottom: 16px; border: 1px solid; }
.message--erreur { background: var(--rouge-pale); color: var(--rouge); border-color: #EBC9C4; }
.message--info { background: var(--ambre-pale); color: var(--ambre); border-color: #EEDCB6; }
.message--succes { background: var(--vert-pale); color: var(--vert); border-color: #C9E3D5; }
.message:empty { display: none; }

/* ---------- Confirmation ---------- */

.succes { text-align: center; padding: 8px 0 4px; }
.succes__icone {
  width: 62px; height: 62px; border-radius: 50%; background: var(--vert-pale);
  display: grid; place-items: center; margin: 0 auto 16px; color: var(--vert);
}
.lien-perso {
  display: flex; gap: 8px; align-items: center; margin-top: 8px;
  background: var(--papier); border: 1px dashed var(--or); border-radius: var(--r-m); padding: 10px 12px;
}
.lien-perso input { flex: 1; border: 0; background: none; font: inherit; font-size: .84rem; color: var(--encre-douce); min-width: 0; }
.lien-perso input:focus { outline: none; }

/* ---------- Pied ---------- */

.pied { margin-top: 48px; padding: 30px 0 40px; border-top: 1px solid var(--trait); text-align: center; color: var(--encre-douce); font-size: .87rem; }
.pied a { color: var(--bleu); }

/* ---------- Squelette de chargement ---------- */

.squelette { border-radius: var(--r-l); height: 130px; margin-bottom: 20px; background: linear-gradient(90deg, #F2ECE2 25%, #F8F4EC 50%, #F2ECE2 75%); background-size: 200% 100%; animation: brille 1.4s infinite; }
@keyframes brille { to { background-position: -200% 0; } }

.vide { text-align: center; padding: 50px 20px; color: var(--encre-douce); background: var(--papier); border: 1px dashed var(--trait); border-radius: var(--r-l); }

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  .creneau { grid-template-columns: 24px 1fr; gap: 6px 14px; padding: 14px 16px; }
  .creneau__poste { grid-column: 2; }
  .creneau__notes { grid-column: 2; }
  .creneau__etat { grid-column: 2; justify-self: start; margin-top: 4px; }
  .jour__entete { padding: 14px 16px; }
  .jour__resume { margin-left: 0; width: 100%; }
  .champs { grid-template-columns: 1fr; }
  .panier__actions { margin-left: 0; width: 100%; }
  .panier__actions .btn { flex: 1; }
  .modale__boite { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Postes multiples, sociétés et places multiples
   ========================================================================== */

/* Sous-bloc de poste à l'intérieur d'une journée */
.poste-bloc + .poste-bloc { border-top: 1px solid var(--trait); }
.poste-entete {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 12px 22px 6px;
}
.poste-entete__nom {
  font-weight: 600; font-size: .95rem; color: var(--bleu);
  display: inline-flex; align-items: center; gap: 8px;
}
.poste-puce { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.poste-entete__besoin {
  font-size: .78rem; color: var(--encre-douce);
  background: var(--or-pale); border-radius: 99px; padding: 2px 10px;
}
.poste-entete__resume { margin-left: auto; font-size: .82rem; color: var(--encre-douce); font-variant-numeric: tabular-nums; }
.poste-entete__desc { flex-basis: 100%; font-size: .82rem; color: var(--encre-douce); margin: 2px 0 0; }

/* Sur une journée, le poste remplace la colonne « poste » de la ligne */
.creneau__places { font-size: .92rem; color: var(--encre-douce); font-variant-numeric: tabular-nums; }

/* Jauge compacte quand la capacité est grande (6 personnes) */
.points--compact { align-items: center; }
.points--compact .point { width: 9px; height: 9px; }

/* ---------- Choix du type d'inscription ---------- */

.choix-type { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.choix-type input { position: absolute; opacity: 0; pointer-events: none; }
.choix-type label {
  display: block; cursor: pointer; text-align: left;
  border: 2px solid var(--trait); border-radius: var(--r-m); padding: 12px 14px;
  background: var(--papier); transition: all .15s ease;
}
.choix-type label:hover { border-color: var(--or); }
.choix-type input:checked + label { border-color: var(--bleu); background: #F2F8FA; box-shadow: 0 0 0 3px rgba(30,107,131,.12); }
.choix-type input:focus-visible + label { outline: 3px solid var(--bleu-clair); outline-offset: 2px; }
.choix-type__titre { font-weight: 600; color: var(--bleu); font-size: .95rem; display: block; }
.choix-type__note { font-size: .8rem; color: var(--encre-douce); display: block; margin-top: 2px; }

/* ---------- Récapitulatif avec compteur de places ---------- */

.recap li { flex-wrap: wrap; }
.recap__ligne1 { display: flex; align-items: center; gap: 12px; width: 100%; }
.recap__poste { font-size: .8rem; color: var(--encre-douce); }
.recap__compteur {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--trait);
}
.recap__compteur label { font-size: .84rem; color: var(--encre-douce); }
.recap__compteur input {
  width: 68px; font: inherit; font-size: .92rem; text-align: center;
  padding: 5px 6px; border: 1px solid var(--trait); border-radius: var(--r-s);
  font-variant-numeric: tabular-nums;
}
.recap__compteur input:focus { outline: none; border-color: var(--bleu-clair); box-shadow: 0 0 0 3px rgba(30,107,131,.15); }
.recap__libre { font-size: .8rem; color: var(--encre-douce); margin-left: auto; }
.recap__tout {
  font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer;
  background: var(--or-pale); color: #7A5B2C; border: 0; border-radius: 99px; padding: 4px 11px;
}
.recap__tout:hover { background: var(--or-clair); }

/* ---------- Membres d'une société ---------- */

.membres-champ { margin-top: 18px; }
.membres-champ textarea { min-height: 88px; }

.etiquette-societe {
  display: inline-block; padding: 1px 9px; border-radius: 99px;
  background: var(--bleu); color: #fff; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
}

@media (max-width: 720px) {
  .choix-type { grid-template-columns: 1fr; }
  .poste-entete { padding: 12px 16px 4px; }
  .poste-entete__resume { margin-left: 0; width: 100%; }
}


/* ---------- Encart de présentation des postes ---------- */

.postes-resume {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px; margin: 26px 0 4px;
}
.poste-carte {
  background: var(--papier); border: 1px solid var(--trait); border-radius: var(--r-m);
  padding: 16px 18px; box-shadow: var(--ombre);
}
.poste-carte__titre {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-weight: 600; color: var(--bleu); font-size: 1rem;
}
.poste-carte__desc { margin: 8px 0 0; font-size: .86rem; color: var(--encre-douce); line-height: 1.5; }
.poste-carte__chiffre { margin: 10px 0 0; font-size: .84rem; color: var(--encre-douce); font-variant-numeric: tabular-nums; }
.poste-carte__chiffre b { color: var(--bleu); font-size: 1.05rem; }

/* ---------- Conflit d'horaire ---------- */

.recap--conflit { border-color: var(--rouge) !important; background: var(--rouge-pale); }
.recap__alerte {
  width: 100%; margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed #EBC9C4;
  font-size: .83rem; color: var(--rouge); line-height: 1.45;
}
.creneau__etiquette--simultane { background: var(--rouge-pale); color: var(--rouge); }


/* ---------- Effectif annoncé ---------- */

.effectif {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--papier); border: 1px solid var(--trait); border-radius: var(--r-m);
  padding: 14px 16px; margin-bottom: 20px;
}
.effectif label { font-weight: 600; color: var(--bleu); font-size: .95rem; }
.effectif input {
  width: 76px; font: inherit; font-size: 1.05rem; font-weight: 600; text-align: center;
  padding: 7px 8px; border: 1px solid var(--trait); border-radius: var(--r-s);
  font-variant-numeric: tabular-nums;
}
.effectif input:focus { outline: none; border-color: var(--bleu-clair); box-shadow: 0 0 0 3px rgba(30,107,131,.15); }
.effectif__aide { flex-basis: 100%; font-size: .84rem; color: var(--encre-douce); }

.recap__total {
  margin: 10px 0 24px; padding-top: 10px; border-top: 1px solid var(--trait);
  font-size: .88rem; color: var(--encre-douce);
  text-align: right; font-variant-numeric: tabular-nums;
}
.recap__total:empty { display: none; }
.recap__total b { color: var(--bleu); }
