/*
  FICHIER 2/3 : style.css  →  l'APPARENCE de la page.

  Comment ça marche : chaque bloc ressemble à ceci
      .nom-du-bloc {  propriété: valeur;  }
  Exemple : "color: red;" met le texte en rouge.

  Astuce : pour changer les couleurs du site, modifie uniquement la partie
  "COULEURS" juste en dessous. Tout le reste s'adapte tout seul.

  SI QUELQUE CHOSE S'AFFICHE MAL :
   1. Vérifie qu'il ne manque aucune accolade { ou } et aucun point-virgule ;
   2. Dans le navigateur : clic droit > Inspecter, pour voir quelle règle s'applique.
*/

/* ================= COULEURS (à modifier ici) ================= */
:root {
  --bg:     #f5f0f4;  /* fond de la page */
  --card:   #ffffff;  /* fond des blocs blancs */
  --ink:    #2e1d2a;  /* couleur du texte */
  --mute:   #7a6676;  /* texte secondaire (gris) */
  --line:   #e3d6df;  /* couleur des bordures */
  --acc:    #7b3a5e;  /* couleur principale (boutons, choix sélectionné) */
  --acc-ink:#ffffff;  /* texte placé sur la couleur principale */
  --soft:   #efe2ea;  /* fond du récapitulatif */

  /* Marges de sécurité sur téléphone (encoche, barre du bas). Ne pas toucher. */
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Mode sombre : utilisé automatiquement si le téléphone est en mode sombre */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:#1e1420; --card:#2a1d2b; --ink:#f3e8f0; --mute:#b79fb2;
    --line:#47334a; --acc:#d9a0c0; --acc-ink:#2a1020; --soft:#3a2a3d;
  }
}

/* ================= BASE DE LA PAGE ================= */
* { box-sizing: border-box; }   /* les tailles incluent les marges internes */

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 Jost, system-ui, sans-serif;   /* police, taille, interligne */
}

main {
  max-width: 640px;      /* largeur maximale du contenu */
  margin: 0 auto;        /* centre le contenu */
  padding: 36px 20px 56px;
}

/* ================= TITRES ET TEXTES ================= */
h1 {
  font: 600 clamp(2.4rem, 9vw, 3.4rem)/1.05 "Cormorant Garamond", Georgia, serif;
  margin: 0 0 10px;
  text-align: center;
}
h2 {
  font: 600 1.5rem/1.2 "Cormorant Garamond", Georgia, serif;
  margin: 0 0 12px;
  text-align: center;
}

.lead {
  color: var(--mute);
  margin: 0 auto 28px;   /* "auto" à gauche et à droite = bloc centré */
  max-width: 50ch;
  text-align: center;    /* texte centré dans le bloc */
}  /* phrase d'intro */
.hint { color: var(--mute); margin: 0; }                          /* petits messages gris */
.info { color: var(--mute); font-size: .9rem; text-align: center; margin-top: 24px; }
.info a { color: var(--acc); }                                       /* lien Instagram */

/* ================= BLOCS BLANCS ================= */
section {
  background: var(--card);
  border: 1px solid var(--line);

  border-radius: 14px;   /* arrondi des coins */
  padding: 20px;
  margin-bottom: 16px;
}

/* ================= LA PRESTATION ================= */
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px; text-align: left;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.opt small { display: block; color: var(--mute); }
.opt b { font-weight: 500; white-space: nowrap; }

/* ================= LES JOURS ================= */
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; }
.day {
  flex: 0 0 auto; min-width: 64px; padding: 8px 6px; text-align: center;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.day span { display: block; font-size: .8rem; opacity: .8; }
.day strong { font-weight: 500; font-size: 1.15rem; }

/* ================= LES HORAIRES ================= */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot {
  padding: 10px 0;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
}

/* Élément choisi (service, jour ou horaire) : il prend la couleur principale */
.opt[aria-pressed="true"],
.day[aria-pressed="true"],
.slot[aria-pressed="true"] {
  background: var(--acc); border-color: var(--acc); color: var(--acc-ink);
}
.opt[aria-pressed="true"] small { color: inherit; opacity: .85; }

/* ================= FORMULAIRE ================= */
label { display: block; font-weight: 500; margin: 0 0 14px; }
input, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: inherit;
}
textarea { min-height: 76px; resize: vertical; }

/* Cadre visible quand on navigue au clavier (accessibilité) */
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--acc); outline-offset: 2px;
}

.recap { background: var(--soft); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }

/* ================= BOUTON D'ENVOI ================= */
.go {
  display: block; width: 100%; padding: 15px; border: 0; border-radius: 999px;
  background: var(--acc); color: var(--acc-ink);
  font: 500 1.05rem Jost, sans-serif; cursor: pointer;
}
.go:disabled { opacity: .45; cursor: not-allowed; }   /* bouton grisé tant que c'est incomplet */

/* Message de confirmation : caché tant que script.js ne l'affiche pas */
.done { display: none; }
