/* :DD — la grammaire du Programme commun et du hub : une seule police, très grands titres,
   commandes en pilule. Ici, l'accueil est un mur de bandes de couleur (une par envie),
   et la réservation un billet poinçonné, à la couleur de l'envie choisie (--teinte). */

@import url("/fonts/fonts.css");

:root {
  --fond: #FFFFFF;
  --bande: #F2F2F1;
  --encre: #111111;
  --encre-2: #4A4A48;
  --discret: #86867F;
  --filet: #D6D6D3;
  --sapin: #23894F;
  --vive: #D63F22;
  --teinte: #111111;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--fond);
  color: var(--encre);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ——— La mise en page : le mur seul au téléphone, le mur et le billet côte à côte sur ordinateur ——— */
.ecran { min-height: 100vh; display: flex; }
.mur { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.panneau { min-width: 0; background: var(--bande); padding: 24px 16px 32px; display: flex; flex-direction: column; gap: 18px; }

@media (max-width: 899px) {
  /* Au téléphone, le billet prend tout l'écran à la place du mur. */
  .ecran.billet-ouvert .mur { display: none; }
  .panneau { flex: 1 1 auto; min-height: 100vh; }
}
@media (min-width: 900px) {
  .mur { flex: 999 1 560px; }
  .panneau { flex: 0 0 min(520px, 42vw); padding: 36px 40px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}

/* ——— Le mur ——— */
.mur-entete { display: flex; justify-content: space-between; align-items: baseline; padding: 20px 16px 14px; }
.logo { font-weight: 900; font-size: 30px; letter-spacing: -0.035em; text-decoration: none; }
.envie-de { font-weight: 900; font-size: 22px; letter-spacing: -0.02em; color: var(--discret); }
.bandes { flex: 1 1 auto; display: flex; flex-direction: column; }
.bande { background: var(--couleur); color: #fff; padding: 14px 16px; }
.bande.ouverte { flex: 1 1 auto; padding: 22px 16px 26px; }
.bande .mot {
  display: block; width: 100%; text-align: left; border: 0; background: none; color: inherit; padding: 0;
  font-weight: 900; font-size: 44px; line-height: 0.86; letter-spacing: -0.045em;
  transition: font-size 0.25s ease;
}
.bande.ouverte .mot { font-size: clamp(64px, 19vw, 76px); }
.bande .phrase { margin-top: 16px; font-weight: 500; font-size: 17px; line-height: 1.4; max-width: 34em; }
.bande .sorties { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bande .sortie { text-align: left;
  min-height: 44px; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 15px;
  background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.75);
}
.bande .sortie[aria-pressed="true"] { background: #fff; color: var(--encre); border-color: #fff; }
@media (min-width: 900px) {
  .mur-entete { padding: 20px 28px; }
  .logo { font-size: 34px; }
  .envie-de { font-size: 24px; }
  .bande { padding: 12px 28px; }
  .bande.ouverte { padding: 30px 28px 32px; }
  .bande .mot { font-size: 46px; }
  .bande.ouverte .mot { font-size: 110px; }
  .bande .phrase { font-size: 18px; margin-top: 22px; }
  .bande .sortie { text-align: left; font-size: 16px; padding: 8px 16px; }
}
@media (prefers-reduced-motion: reduce) { .bande .mot { transition: none; } }

/* ——— Sur ordinateur : le grand champ qui répond (à la place du mur). La page prend la couleur
   de l'envie trouvée, répond par une phrase et tend le billet prêt à réserver. ——— */
.recherche { display: none; }
@media (min-width: 900px) {
  .mur { background: var(--fond-mur, var(--fond)); color: var(--encre-mur, var(--encre)); transition: background 0.3s ease, color 0.3s ease; }
  .mur-entete, .bandes { display: none; }
  .recherche { display: block; flex: 1 1 auto; }
  .recherche-entete { padding: 24px 40px; }
  .recherche-entete .logo { color: inherit; }
  .recherche-corps { max-width: 1120px; margin: 0 auto; padding: 24px 40px 48px; display: flex; flex-direction: column; gap: 26px; }
  .grand-mot { font-weight: 900; font-size: clamp(72px, 8.4vw, 120px); line-height: 0.86; letter-spacing: -0.045em; }
  .champ {
    flex-direction: row; align-items: center; gap: 14px; background: #fff; color: var(--encre);
    border: 2px solid var(--encre); border-radius: 999px; padding: 0 10px 0 26px; min-height: 72px;
  }
  .champ input { flex: 1 1 auto; min-width: 0; border: 0; padding: 0; font-weight: 700; font-size: 24px; }
  .champ input::placeholder { color: var(--discret); }
  #effacer { width: 50px; height: 50px; border-radius: 999px; border: 0; background: var(--bande); font-weight: 900; font-size: 20px; }
  .envies-rapides { display: flex; flex-wrap: wrap; gap: 8px; }
  .envies-rapides:empty { display: none; }
  .envie-rapide { min-height: 48px; border: 0; border-radius: 999px; padding: 8px 20px; background: var(--couleur); color: #fff; font-weight: 900; font-size: 19px; }
  .mur.colore .envie-rapide { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8); }
  .reponse { display: flex; gap: 36px; align-items: flex-start; }
  .reponse-texte { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
  .phrase-reponse { font-weight: 900; font-size: 40px; line-height: 1.05; letter-spacing: -0.025em; }
  .ou-bien-titre { font-weight: 700; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }
  .ou-bien { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  .ou-bien button { min-height: 44px; border: 1px solid rgba(255, 255, 255, 0.8); background: transparent; color: inherit; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 16px; }
  .apercu { flex: 0 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
  .apercu:empty { display: none; }
  .apercu .billet { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); transform: rotate(-1.5deg); }
  .apercu .bouton { background: #fff; color: var(--encre); }
  /* Quand le vrai billet est ouvert à droite, l'aperçu s'efface. */
  .billet-ouvert .apercu { display: none; }
  .mur .mes-billets { padding: 0 40px 40px; max-width: 1120px; margin: 0 auto; width: 100%; }
  .mur .mes-billets h2 { border-color: currentColor; }
  .mur .mes-billets a { color: var(--encre); }
}
@media (min-width: 900px) and (prefers-reduced-motion: reduce) { .mur { transition: none; } }

.mes-billets { padding: 18px 16px 28px; }
.mes-billets ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mes-billets a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--bande); text-decoration: none; font-weight: 700; }
.mes-billets a span:last-child { font-weight: 500; color: var(--encre-2); }

/* ——— Le panneau ——— */
.retour { align-self: flex-start; border: 0; background: none; padding: 0; font-weight: 700; font-size: 15px; }
.titre-panneau { font-weight: 700; font-size: 13px; letter-spacing: 0.1em; color: var(--encre-2); text-transform: uppercase; }
h2 { font-weight: 900; font-size: 22px; letter-spacing: -0.015em; border-bottom: 1px solid var(--encre); padding-bottom: 4px; margin-bottom: 12px; }
#reservation, #suivi { display: flex; flex-direction: column; min-width: 0; }
.pilules { display: flex; flex-wrap: wrap; gap: 8px; }
.pilules.defile { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pilules.defile::-webkit-scrollbar { display: none; }
.pilules.heures { margin-top: 10px; }
.pilule {
  border: 1px solid var(--filet); background: var(--fond); border-radius: 999px;
  padding: 8px 14px; font-weight: 700; font-size: 15px; white-space: nowrap; min-height: 40px;
}
.pilule[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: #fff; }
.vide { color: var(--discret); font-weight: 500; }

/* ——— Le billet : deux parties séparées par des pointillés, deux poinçons sur les côtés ——— */
.billet { background: var(--teinte); color: #fff; position: relative; transition: background 0.25s ease; }
.billet .haut { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.billet .entete { display: flex; justify-content: space-between; font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.billet .nom { font-weight: 900; font-size: clamp(40px, 12vw, 52px); line-height: 0.88; letter-spacing: -0.04em; }
.billet .texte { font-weight: 500; font-size: 15px; }
.billet .perforation { position: relative; height: 0; }
.billet .perforation::before { content: ""; display: block; border-top: 2px dashed rgba(255, 255, 255, 0.7); margin: 0 24px; }
.billet .poincon { position: absolute; top: -14px; width: 28px; height: 28px; border-radius: 999px; background: var(--fond-poincon, var(--bande)); }
.billet .poincon.gauche { left: -14px; }
.billet .poincon.droite { right: -14px; }
.billet .bas { padding: 16px 20px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.billet .case { display: flex; flex-direction: column; }
.billet .case span:first-child { font-weight: 700; font-size: 12px; letter-spacing: 0.1em; opacity: 0.85; text-transform: uppercase; }
.billet .case span:last-child { font-weight: 900; font-size: 20px; line-height: 1.2; }
.billet .case.vide-case span:last-child { opacity: 0.6; }
.billet .tampon {
  position: absolute; right: 16px; top: 76px; transform: rotate(-13deg);
  border: 3px solid #fff; border-radius: 8px; padding: 6px 12px;
  font-weight: 900; font-size: 18px; letter-spacing: 0.08em; line-height: 1.05; text-align: center; text-transform: uppercase;
}
.billet.valide { background: #fff; color: var(--encre); }
.billet.valide .nom { color: var(--teinte); }
.billet.valide .perforation::before { border-color: var(--filet); }
.billet.valide .tampon { border-color: var(--teinte); color: var(--teinte); background: rgba(255, 255, 255, 0.85); }
.billet.eteint { background: var(--discret); }
@media (prefers-reduced-motion: reduce) { .billet { transition: none; } }

/* ——— Le formulaire, écrit sur le billet ——— */
form { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
input { border: 0; border-bottom: 2px solid var(--filet); background: transparent; padding: 6px 0; font-weight: 500; font-size: 20px; border-radius: 0; }
input:focus { border-bottom-color: var(--encre); outline: none; }
input.grand { font-weight: 900; font-size: 26px; }
textarea { border: 1px solid var(--filet); border-radius: 12px; padding: 10px 12px; min-height: 84px; font-weight: 500; font-size: 16px; resize: vertical; background: var(--fond); }
.piege { position: absolute; left: -9999px; }

.bouton {
  border: 0; border-radius: 999px; background: var(--encre); color: #fff; text-decoration: none;
  font-weight: 900; font-size: 19px; padding: 14px 24px; min-height: 56px;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.bouton.teinte { background: var(--teinte); }
.bouton.cerne { background: var(--fond); color: var(--encre); border: 1px solid var(--filet); font-weight: 700; font-size: 16px; }
.bouton:disabled { background: var(--filet); color: var(--discret); cursor: default; }
.aide { font-weight: 500; font-size: 14px; color: var(--encre-2); text-align: center; }
#suivi .aide { text-align: left; font-size: 16px; margin-top: 18px; }
.erreur { color: var(--vive); font-weight: 700; }
.mot { margin-top: 18px; font-weight: 900; font-size: 22px; line-height: 1.3; }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }

/* ——— Le tableau de bord de Dédé (/admin/) ——— */
.page { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.titre { font-weight: 900; font-size: clamp(64px, 18vw, 120px); line-height: 0.88; letter-spacing: -0.035em; }
.sous-titre { font-weight: 900; font-size: 22px; color: var(--discret); letter-spacing: -0.015em; margin-top: 10px; }
.page h2 { margin: 36px 0 14px; }
.statut { display: inline-block; white-space: nowrap; border-radius: 999px; padding: 6px 14px; font-weight: 900; color: #fff; background: var(--encre); }
.statut.attente { background: var(--encre-2); }
.statut.acceptee { background: var(--sapin); }
.statut.refusee, .statut.annulee { background: var(--discret); }
.bouton.noir { background: var(--encre); }
.page .bouton { display: inline-flex; }
.page .bouton:not(.noir):not(.cerne) { background: var(--vive); }
.page input { border: 1px solid var(--filet); border-radius: 12px; padding: 10px 12px; font-size: 16px; background: var(--fond); }

/* ——— Le back-office du catalogue (/admin/catalogue.html) ——— */
.onglets { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.onglets .pilule { text-decoration: none; display: inline-flex; align-items: center; }
.onglets .pilule[aria-current="page"] { background: var(--encre); border-color: var(--encre); color: #fff; }
.aide-catalogue { margin: 24px 0 20px; color: var(--encre-2); font-weight: 500; }
.envie-admin { margin-bottom: 18px; }
.bande-admin { background: var(--couleur, var(--encre)); color: #fff; padding: 16px 18px 18px; cursor: pointer; }
.bande-admin.ouverte { cursor: default; }
.bande-admin.nouvelle { margin-bottom: 18px; }
.bande-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mot-admin { font-weight: 900; font-size: clamp(40px, 10vw, 56px); line-height: 0.9; letter-spacing: -0.04em; }
.phrase-admin { margin-top: 10px; font-weight: 500; font-size: 15px; }
.fleches { display: inline-flex; gap: 4px; flex-shrink: 0; }
.fleches button { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--filet); background: var(--fond); font-weight: 900; font-size: 17px; }
.fleches.clair button { border-color: rgba(255, 255, 255, 0.75); background: transparent; color: #fff; }
.fleches button:disabled { opacity: 0.3; cursor: default; }
.lignes { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.ligne { background: var(--bande); padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 60px; }
.ligne.ouverte { display: block; cursor: default; padding: 16px 18px; }
.ligne.masquee .nom-ligne { color: var(--discret); text-decoration: line-through; }
.point { width: 12px; height: 12px; border-radius: 999px; flex-shrink: 0; }
.nom-ligne { flex: 1 1 auto; min-width: 0; font-weight: 700; }
.infos-ligne { color: var(--encre-2); font-weight: 500; font-size: 15px; white-space: nowrap; }
.ajout { border: 1px dashed var(--discret); background: var(--fond); border-radius: 999px; padding: 10px 18px; min-height: 48px; font-weight: 900; font-size: 17px; width: 100%; margin-top: 2px; }
.ajout.petit { font-weight: 700; font-size: 15px; border-radius: 0; }
.fiche { margin: 0; gap: 14px; }
.bande-admin .fiche label { color: #fff; }
.bande-admin .fiche input, .bande-admin .fiche textarea { background: #fff; color: var(--encre); border: 0; border-radius: 12px; padding: 10px 12px; }
.page.catalogue .fiche input { border: 1px solid var(--filet); }
.page.catalogue .bande-admin .fiche input { border: 0; }
.aide-champ { font-weight: 500; font-size: 13px; opacity: 0.8; }
.deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
select { font: inherit; font-weight: 700; font-size: 17px; border: 1px solid var(--filet); border-radius: 12px; padding: 10px 12px; background: var(--fond); color: var(--encre); }
.case-a-cocher { flex-direction: row; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.case-a-cocher input { width: 22px; height: 22px; accent-color: var(--encre); }
.champ-nuancier { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.nuancier { display: flex; flex-wrap: wrap; gap: 6px; }
.teinte-choix { min-height: 40px; border-radius: 999px; border: 2px solid #fff; background: var(--couleur); color: #fff; padding: 6px 14px; font-weight: 700; font-size: 14px; }
.teinte-choix[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--encre); font-weight: 900; }
.actions-fiche { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions-fiche .bouton { min-height: 48px; font-size: 17px; }
.page .actions-fiche .bouton.cerne { background: var(--fond); }
.bande-admin .actions-fiche .bouton.noir { background: #fff; color: var(--encre); }
.lien-danger { border: 0; background: none; color: var(--vive); font-weight: 700; text-decoration: underline; margin-left: auto; }
.bande-admin .lien-danger { color: #fff; }
.note-programme { font-weight: 700; opacity: 0.9; }
.bande-admin .case-a-cocher { color: #fff; }
.bande-admin .case-a-cocher input { accent-color: #fff; }
.page.catalogue input[type="time"] { font-weight: 700; font-size: 17px; }
