/* =============================================================
   Réservation des salles — Saint-Branchs
   Palette reprise du site communal :
   orange #eb5f3e · bleu clair #59c1ef · bleu nuit #011c40 · gris #f4f2f2
   ============================================================= */

:root {
  --orange:      #eb5f3e;
  --orange-fonce:#d24d2d;
  --bleu:        #59c1ef;
  --bleu-nuit:   #011c40;
  --gris:        #f4f2f2;
  --gris-bord:   #e2dede;
  --texte:       #011c40;
  --texte-doux:  #5b6472;
  --blanc:       #ffffff;
  --succes:      #1f7a4d;
  --alerte:      #b3341f;
  --rayon:       4px;
  --conteneur:   1280px;
  --ombre:       0 2px 10px rgba(1, 28, 64, .07);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font: 400 16px/1.65 Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--texte);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .titre-section { font-family: Raleway, Roboto, Arial, sans-serif; font-weight: 800; line-height: 1.2; margin: 0; }

a { color: var(--orange); }
a:hover { color: var(--orange-fonce); }

:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }

.conteneur { width: min(var(--conteneur), 90%); margin-inline: auto; }
.conteneur--etroit { width: min(820px, 90%); }

.lien-evitement {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--bleu-nuit); color: #fff; padding: 12px 20px;
}
.lien-evitement:focus { left: 0; }

/* ---------------------------------------------------------- bandeau */
.bandeau { background: var(--bleu-nuit); color: rgba(255,255,255,.85); font-size: 14px; }
.bandeau__interieur { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 46px; flex-wrap: wrap; }
.bandeau a { color: rgba(255,255,255,.85); text-decoration: none; }
.bandeau a:hover { color: #fff; text-decoration: underline; }
.bandeau__retour { font-weight: 500; }
.bandeau .sep { padding: 0 8px; opacity: .5; }

/* ---------------------------------------------------------- héros */
.hero {
  background: linear-gradient(180deg, var(--bleu-nuit) 0%, #05264f 100%);
  color: #fff;
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -80px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(89,193,239,.22) 0%, transparent 70%);
}
.hero__interieur { position: relative; z-index: 1; max-width: 720px; }
.hero__sur { margin: 0 0 10px; color: var(--bleu); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.hero h1 { font-size: clamp(30px, 4.4vw, 48px); }
.hero__texte { margin: 18px 0 30px; font-size: 18px; color: rgba(255,255,255,.86); max-width: 62ch; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------------------------------------------------------- boutons */
.bouton {
  display: inline-block; border: 2px solid transparent; border-radius: var(--rayon);
  padding: 13px 26px; font: 700 15px/1 Raleway, Roboto, sans-serif;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.bouton--principal { background: var(--orange); color: #fff; border-color: var(--orange); }
.bouton--principal:hover:not(:disabled) { background: var(--orange-fonce); border-color: var(--orange-fonce); color: #fff; }
.bouton--principal:disabled { opacity: .55; cursor: progress; }
.bouton--fantome { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.bouton--fantome:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }

.lien-action {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--orange); font: 700 15px/1.4 Raleway, Roboto, sans-serif; text-align: left;
}
.lien-action:hover { color: var(--orange-fonce); text-decoration: underline; }

/* ---------------------------------------------------------- sections */
.section { padding: 64px 0; }
.section--grise { background: var(--gris); }
.titre-section { font-size: clamp(24px, 3vw, 34px); }
.titre-section::after {
  content: ""; display: block; width: 56px; height: 4px;
  background: var(--orange); margin-top: 14px;
}
.chapo { margin: 18px 0 32px; color: var(--texte-doux); font-size: 17px; max-width: 70ch; }
.mention { color: var(--texte-doux); font-size: 13px; }

/* ---------------------------------------------------------- salles */
.grille-salles { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.carte-salle {
  background: #fff; border: 1px solid var(--gris-bord); border-top: 4px solid var(--couleur, var(--orange));
  border-radius: var(--rayon); padding: 22px 22px 20px; box-shadow: var(--ombre);
  display: flex; flex-direction: column;
}
.carte-salle__entete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.carte-salle h3 { font-size: 19px; }
.pastille-capacite {
  background: var(--gris); color: var(--texte-doux); font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}
.carte-salle__desc { color: var(--texte-doux); font-size: 15px; margin: 12px 0 14px; }
.equipements { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.equipements li {
  font-size: 12.5px; color: var(--texte-doux);
  border: 1px solid var(--gris-bord); border-radius: 20px; padding: 3px 10px;
}
.carte-salle .lien-action { margin-top: auto; }

/* ---------------------------------------------------------- filtres */
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filtre {
  background: #fff; border: 1px solid var(--gris-bord); border-radius: 20px;
  padding: 7px 15px; font: 500 14px/1 Roboto, sans-serif; color: var(--texte);
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.filtre:hover { border-color: var(--bleu-nuit); }
.filtre--actif { background: var(--bleu-nuit); border-color: var(--bleu-nuit); color: #fff; }
.filtre .puce { width: 10px; height: 10px; border-radius: 50%; background: var(--couleur, var(--orange)); }

/* ---------------------------------------------------------- calendrier */
.calendrier { background: #fff; border: 1px solid var(--gris-bord); border-radius: var(--rayon); box-shadow: var(--ombre); }
.calendrier__barre {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 16px; border-bottom: 1px solid var(--gris-bord);
}
.calendrier__barre h3 { font-size: 20px; min-width: 12ch; text-align: center; text-transform: capitalize; }
.nav {
  width: 38px; height: 38px; border: 1px solid var(--gris-bord); background: #fff;
  border-radius: var(--rayon); font-size: 22px; line-height: 1; color: var(--bleu-nuit); cursor: pointer;
}
.nav:hover:not(:disabled) { background: var(--gris); }
.nav:disabled { opacity: .35; cursor: default; }

.calendrier__jours, .calendrier__grille { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendrier__jours {
  padding: 10px 0; background: var(--gris); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); text-align: center;
}
.calendrier__grille { gap: 1px; background: var(--gris-bord); border-top: 1px solid var(--gris-bord); }

.jour {
  background: #fff; min-height: 96px; padding: 8px; border: 0; text-align: left;
  font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 5px; position: relative;
}
.jour:hover { background: #fbfaf9; }
.jour--hors { background: #fafafa; color: #b9bec7; cursor: default; }
.jour--passe { background: #fafafa; color: #b9bec7; cursor: default; }
.jour--aujourdhui .jour__numero { background: var(--bleu-nuit); color: #fff; }
.jour--selection { box-shadow: inset 0 0 0 2px var(--orange); }
.jour__numero {
  font-weight: 700; font-size: 14px; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.jour__barres { display: flex; flex-direction: column; gap: 3px; }
.barre {
  font-size: 11px; line-height: 1.35; color: #fff; padding: 2px 6px; border-radius: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--couleur, var(--orange));
}
.jour__plus { font-size: 11px; color: var(--texte-doux); }
.jour--libre::after {
  content: "Libre"; position: absolute; bottom: 8px; left: 8px;
  font-size: 11px; color: var(--succes); font-weight: 500;
}
.calendrier__etat { margin: 0; padding: 12px 16px; font-size: 13.5px; color: var(--texte-doux); border-top: 1px solid var(--gris-bord); }
.calendrier__etat--erreur { color: var(--alerte); }

.detail-jour {
  margin-top: 20px; background: #fff; border: 1px solid var(--gris-bord);
  border-left: 4px solid var(--bleu-nuit); border-radius: var(--rayon); padding: 20px 22px;
}
.detail-jour h3 { font-size: 18px; margin-bottom: 12px; text-transform: capitalize; }
.detail-ligne { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--gris-bord); font-size: 15px; }
.detail-ligne:last-of-type { border-bottom: 0; }
.detail-ligne .puce { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.detail-ligne .horaire { margin-left: auto; color: var(--texte-doux); font-size: 14px; }
.detail-jour .bouton { margin-top: 14px; }

/* ---------------------------------------------------------- formulaire */
form fieldset { border: 0; padding: 0; margin: 0 0 32px; }
form legend {
  font: 800 18px/1.3 Raleway, Roboto, sans-serif; padding: 0 0 14px;
  color: var(--bleu-nuit); width: 100%; border-bottom: 1px solid var(--gris-bord); margin-bottom: 20px;
}
.ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.champ { margin-bottom: 18px; display: flex; flex-direction: column; }
.champ--court { max-width: 100%; }
.champ label { font-weight: 500; font-size: 14.5px; margin-bottom: 6px; }
.obligatoire { color: var(--orange); }
.facultatif { color: var(--texte-doux); font-weight: 400; font-size: 13px; }

input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=number], select, textarea {
  font: inherit; font-size: 15px; color: var(--texte); background: #fff;
  border: 1px solid #c9c5c5; border-radius: var(--rayon); padding: 11px 12px; width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--bleu); outline: 2px solid rgba(89,193,239,.35); outline-offset: 0; }
.champ--erreur input, .champ--erreur select, .champ--erreur textarea { border-color: var(--alerte); background: #fff7f6; }
.message-erreur { color: var(--alerte); font-size: 13px; margin-top: 5px; }

.cases { border: 1px solid var(--gris-bord); border-radius: var(--rayon); padding: 18px 20px 6px; background: #fff; }
.cases legend { border: 0; margin: 0; padding: 0 8px; width: auto; font-size: 15px; }
.cases label { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; margin-bottom: 12px; cursor: pointer; }
.cases input { margin-top: 3px; flex: none; width: 17px; height: 17px; accent-color: var(--orange); }
.cases--consentement { background: var(--gris); }

.aide { margin: -6px 0 18px; color: var(--texte-doux); font-size: 13.5px; line-height: 1.5; }

.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.verdict { padding: 12px 15px; border-radius: var(--rayon); font-size: 14.5px; margin: 0 0 18px; }
.verdict--libre { background: #eaf6ef; color: var(--succes); border: 1px solid #bfe3ce; }
.verdict--occupe { background: #fdf0ed; color: var(--alerte); border: 1px solid #f3cabf; }
.verdict--info { background: #eef8fd; color: #14618c; border: 1px solid #c3e5f6; }

.erreur-globale { background: #fdf0ed; border: 1px solid #f3cabf; color: var(--alerte); padding: 13px 16px; border-radius: var(--rayon); }
.actions-formulaire { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.confirmation {
  background: #eaf6ef; border: 1px solid #bfe3ce; border-left: 4px solid var(--succes);
  border-radius: var(--rayon); padding: 26px 28px;
}
.confirmation h3 { color: var(--succes); font-size: 21px; margin-bottom: 10px; }

/* ---------------------------------------------------------- infos + pied */
.grille-infos { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grille-infos h3 { font-size: 18px; margin-bottom: 10px; }
.grille-infos ol { margin: 0; padding-left: 20px; color: var(--texte-doux); }
.grille-infos li { margin-bottom: 7px; }
.grille-infos p { color: var(--texte-doux); }

.pied { background: var(--bleu-nuit); color: rgba(255,255,255,.75); padding: 24px 0; font-size: 14px; }
.pied__interieur { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.pied a { color: rgba(255,255,255,.85); text-decoration: none; margin-left: 20px; }
.pied a:first-child { margin-left: 0; }
.pied a:hover { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 720px) {
  .section { padding: 44px 0; }
  .ligne { grid-template-columns: 1fr; gap: 0; }
  .jour { min-height: 70px; padding: 5px; }
  .barre { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
  .jour--libre::after { display: none; }
  .calendrier__barre h3 { font-size: 17px; }
  .pied__interieur { flex-direction: column; align-items: flex-start; }
  .pied a { margin: 0 16px 0 0; }
}

@media print {
  .hero__actions, .filtres, form, .bandeau, .pied { display: none; }
}
