/* Pages publiques. Couleurs et polices : variables posées par /theme.css (réglages), jamais écrites ici.
   Deux ambiances :
   - claire (questionnaire, préparation) : fond crème, cartes ivoire, or en accent ;
   - encre (body.theme-encre : remerciement, messages) : fond encre, filet or.
   Lue par des personnes qui peuvent mal voir : texte de 17 px au moins partout, contraste fort, focus visible. */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

/* ---------- Ambiance claire (par défaut) ---------- */
body.page-entretien {
  --p-fond: var(--clair-fond);
  --p-carte: var(--clair-carte);
  --p-case: var(--clair-case);
  --p-texte: var(--clair-texte);
  --p-texte-doux: var(--clair-texte-doux);
  --p-titres: var(--clair-titres);
  --p-bordure: var(--clair-bordure);
  --p-alerte: var(--clair-alerte);
  --p-succes: var(--clair-succes);
  --p-focus: var(--clair-texte);
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: var(--police-texte); font-size: 19px; line-height: 1.6; color: var(--p-texte);
  background:
    radial-gradient(900px 480px at 50% -8%, color-mix(in srgb, var(--or) 30%, transparent), transparent 64%),
    radial-gradient(700px 520px at 100% 100%, color-mix(in srgb, var(--or) 14%, transparent), transparent 70%),
    var(--p-fond);
}

/* ---------- Ambiance encre ---------- */
body.page-entretien.theme-encre {
  --p-fond: var(--fond);
  --p-carte: var(--carte);
  --p-case: var(--fond);
  --p-texte: var(--texte);
  --p-texte-doux: var(--texte-doux);
  --p-titres: var(--or-clair);
  --p-bordure: var(--bordure);
  --p-alerte: var(--alerte);
  --p-succes: var(--succes);
  --p-focus: var(--or-clair);
  background:
    radial-gradient(800px 460px at 50% -12%, color-mix(in srgb, var(--or) 26%, transparent), transparent 62%),
    var(--p-fond);
}

.page { max-width: 820px; margin: 0 auto; padding: 36px 16px 64px; }
.page-message { max-width: 720px; text-align: center; padding-top: 14vh; }
.logo { width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 10px 30px var(--ombre); }

/* ---------- En-tête ---------- */
.en-tete-marque { display: flex; align-items: center; gap: 14px; margin-bottom: 44px; }
.en-tete-marque img { flex: none; animation: flotter 6s ease-in-out infinite; }
.en-tete-nom { font-family: var(--police-titres); font-weight: 600; font-size: 30px; line-height: 1.1; color: var(--p-texte); letter-spacing: 0.3em; }
.en-tete-accroche { font-size: 17px; line-height: 1.3; letter-spacing: 0.14em; text-transform: uppercase; color: var(--p-titres); }
.en-tete-simple { margin-bottom: 28px; }

/* ---------- Titres et textes ---------- */
h1 { font-family: var(--police-titres); font-weight: 600; font-size: clamp(36px, 6vw, 58px); line-height: 1.1; margin: 0 0 18px; color: var(--p-texte); overflow-wrap: break-word; }
h2 { font-family: var(--police-titres); font-weight: 600; font-size: 31px; line-height: 1.2; color: var(--p-titres); margin: 0 0 10px; }
h3 { font-size: 20px; margin: 22px 0 10px; }
.accroche { font-size: 22px; line-height: 1.5; color: var(--p-titres); margin: 0 0 18px; }
.introduction { font-size: 21px; color: var(--p-texte-doux); margin: 0 0 34px; }
.aide { font-size: 17px; color: var(--p-texte-doux); margin: 6px 0 0; }
.erreur { color: var(--p-alerte); font-weight: 600; margin: 6px 0 0; }
.succes { color: var(--p-succes); font-weight: 600; margin: 14px 0 0; }
.recap { font-size: 21px; font-weight: 600; color: var(--p-texte); margin: 22px 0 0; }
.sr-seul { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Blocs : ils se soulèvent au survol ---------- */
.carte {
  position: relative; background: var(--p-carte); border-radius: 20px; padding: 28px 24px;
  border: 1px solid color-mix(in srgb, var(--or) 55%, transparent);
  box-shadow: 0 18px 44px var(--ombre), 0 1px 0 color-mix(in srgb, var(--or) 40%, transparent) inset;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.carte::before {      /* filet or lumineux en haut du bloc */
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--or-clair), var(--or), transparent);
}
.carte:hover { transform: translateY(-4px); box-shadow: 0 28px 60px var(--ombre), 0 1px 0 color-mix(in srgb, var(--or) 40%, transparent) inset; }

/* ---------- Questionnaire ---------- */
.champ { margin: 22px 0 0; border: 0; padding: 0; min-width: 0; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
label, legend { display: block; font-weight: 600; margin: 0 0 6px; padding: 0; }
input[type="text"], input[type="email"], textarea {
  width: 100%; font: inherit; color: var(--p-texte); background: var(--p-case);
  border: 1px solid var(--p-bordure); border-radius: 12px; padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input[type="text"]:hover, input[type="email"]:hover, textarea:hover { border-color: var(--p-titres); }
input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  border-color: var(--p-titres); box-shadow: 0 0 0 4px color-mix(in srgb, var(--or) 22%, transparent);
}
input[aria-invalid="true"] { border: 2px solid var(--p-alerte); }
textarea { resize: vertical; min-height: 130px; line-height: 1.5; }

.choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.choix label {
  display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 500; cursor: pointer;
  border: 1px solid var(--p-bordure); border-radius: 12px; padding: 12px 14px; background: var(--p-case);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.choix label:hover { transform: translateY(-2px); border-color: var(--p-titres); box-shadow: 0 10px 22px var(--ombre); }
.choix input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--p-titres); }
.choix label:has(input:checked) {
  border: 2px solid var(--p-titres); padding: 11px 13px; font-weight: 700;
  background: color-mix(in srgb, var(--or) 16%, var(--p-case));
}

/* ---------- Boutons : dorés, pleins, ils foncent et se soulèvent au survol ---------- */
.bouton {
  display: inline-block; margin-top: 28px; font: inherit; font-weight: 700; font-size: 20px; line-height: 1.3; cursor: pointer;
  color: var(--clair-texte); background: var(--or); border: 0; border-radius: 999px; padding: 15px 36px;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--or) 38%, transparent);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.bouton:hover { background: var(--or-survol); transform: translateY(-2px); box-shadow: 0 16px 32px color-mix(in srgb, var(--or) 45%, transparent); }
a.bouton { text-decoration: none; }
.bouton:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- Créneaux ---------- */
.heures { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 0 0 18px; }
/* Calendrier des jours : une ligne par semaine, 5 colonnes alignées (lundi à vendredi) ; 7 seulement si le fuseau du visiteur
   fait tomber un créneau un week-end. */
.jours { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.jours.jours-sept { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.jour-entete { font-size: 17px; font-weight: 700; line-height: 1.2; text-align: center; color: var(--p-texte-doux); }
.jours .jour-case { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 68px; padding: 8px 2px; text-align: center; line-height: 1.15; }
.jour-numero { font-size: 24px; font-weight: 700; }
.jour-mois { font-size: 17px; white-space: nowrap; }
/* Jour sans créneau : pointillés et texte graphite (lisible), numéro barré, fond grisé : visiblement indisponible, sans clair-obscur. */
.jours .jour-vide { border: 2px dashed var(--p-texte-doux); border-radius: 12px; color: var(--p-texte-doux); font-weight: 500;
  background: color-mix(in srgb, var(--p-texte-doux) 12%, var(--p-case)); }
.jour-vide .jour-numero { font-weight: 500; text-decoration: line-through; }
/* Repli à 7 colonnes (fuseau lointain) sur téléphone : le mois est gardé dans le nom complet du bouton, pas affiché. */
@media (max-width: 600px) {
  .jours.jours-sept { gap: 2px; margin-left: -14px; margin-right: -14px; }
  .jours-sept .jour-mois { display: none; }
  .jours-sept .jour-case { min-height: 56px; }
  .jours-sept .jour-entete { font-size: 17px; letter-spacing: -0.02em; }
}
.choix-creneau {
  font: inherit; font-weight: 600; color: var(--p-texte); cursor: pointer;
  background: color-mix(in srgb, var(--or) 12%, var(--p-case));
  border: 1px solid var(--p-bordure); border-radius: 12px; padding: 12px 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.choix-creneau:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--or) 26%, var(--p-case)); box-shadow: 0 10px 22px var(--ombre); }
.choix-creneau::first-letter { text-transform: uppercase; }     /* « Vendredi 4 décembre » : seule la 1re lettre */
.choix-creneau[aria-pressed="true"] { background: var(--or); border-color: var(--or); color: var(--clair-texte); box-shadow: 0 10px 22px color-mix(in srgb, var(--or) 40%, transparent); }

/* ---------- Focus clavier : toujours visible ---------- */
input:focus-visible, textarea:focus-visible, .bouton:focus-visible, .choix-creneau:focus-visible, a:focus-visible, h2[tabindex]:focus-visible {
  outline: 3px solid var(--p-focus); outline-offset: 3px;
}
.choix label:has(input:focus-visible) { outline: 3px solid var(--p-focus); outline-offset: 3px; }

/* ---------- Pied de page ---------- */
.pied { margin-top: 48px; padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--or) 55%, transparent); font-size: 17px; color: var(--p-texte-doux); }
.pied h2 { font-size: 25px; }

/* ---------- Remerciement et messages : filet or ---------- */
.filet {
  width: 140px; height: 2px; margin: 26px auto 30px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--or), var(--or-clair), var(--or), transparent);
}
.page-message .logo { width: 72px; height: 72px; }
.page-message h1 { margin: 26px 0 0; }
.page-message .accroche { font-size: 24px; }
.page-message .aide { font-size: 18px; margin-top: 14px; }
.page-message .bouton { margin: 0 0 10px; }

/* Sortie « pas le temps » : lien doré, souligné, zone de 44 px de haut au moins. */
.page-message .aide-sortie { font-size: 19px; }
.lien-sortie {
  display: inline; padding: 12px 0; font-weight: 700;      /* le padding vertical donne 44 px cliquables sans agrandir la ligne */
  color: var(--or-clair); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.lien-sortie:hover { color: var(--or); }

/* ---------- Mouvement discret : apparition douce, emblème qui flotte ---------- */
@keyframes apparaitre { from { opacity: 0; transform: translateY(14px); } }
@keyframes flotter { 50% { transform: translateY(-4px); } }
.presentation, .carte, .pied, .page-message > * { animation: apparaitre 0.6s ease-out backwards; }
.carte { animation-delay: 0.08s; }
.pied { animation-delay: 0.16s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 600px) {
  body.page-entretien { font-size: 18px; }
  .page { padding-top: 24px; }
  .en-tete-marque { margin-bottom: 30px; }
  .en-tete-nom { font-size: 26px; letter-spacing: 0.22em; }
  .carte { padding: 24px 16px; border-radius: 16px; }
  .carte::before { left: 16px; right: 16px; }
  .deux-colonnes { grid-template-columns: 1fr; }
  .choix { grid-template-columns: 1fr 1fr; }
  .heures { grid-template-columns: 1fr 1fr; }
  .jours { gap: 4px; }
  .bouton { width: 100%; text-align: center; padding: 15px 20px; }
  .page-message { padding-top: 10vh; }
}
@media (max-width: 360px) {
  .choix { grid-template-columns: 1fr; }
  .en-tete-accroche { letter-spacing: 0.06em; }
}

/* Case piège : invisible pour une personne (hors écran), mais présente pour un robot qui remplit tout. */
.piege { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
