/* ===========================================================================
   Le mini-site d'un cabinet : `/c/<slug>/` (mini-sites, lot 1 riche)

   Chargée APRÈS tokens.css et vitrine-site.css. Le mini-site reprend du site
   public son monde : le papier blanc et la chaux (le neutre chaud), les
   encres neutres, les filets, l'angle de 3 px, Radio Canada Big en graisse
   400 pour la voix (« grande, jamais criée ») et Public Sans pour lire, le
   mouvement (`.v-reveal--photo`, la détente `--so-detente`, et la règle
   « moins de mouvement » qui coupe tout).

   CE QUE LA PAGE REFUSE (retour du propriétaire, 22/11/2026 : « pas mal de
   design IA… le design doit être humain ») : le trait de couleur au-dessus
   des titres, les pastilles et les puces colorées, les icônes dans des
   carrés arrondis, les grilles de cartes blanches à ombre douce, les bandes
   menthe alternées, le voile teinté sur toute la photo, les avatars à
   initiales, le gras massif. À la place : des compositions différentes d'une
   section à l'autre, du texte courant, des filets, de l'espace. Deux aplats
   de couleur au plus : la bande des créneaux et le pied.

   POURQUOI CETTE FEUILLE EST HORS DU MONDE « LE CARTON RÉGLÉ » : c'est un
   site public, comme vitrine-site.css, et la même décision du propriétaire
   l'en a sortie (`HORS_PERIMETRE`, ai_assistant/tests/test_le_monde_tient.py).
   Elle reste sous toutes les gardes de FORME : accolades, jetons morts ou
   sans plancher, voile opaque, texte invisible, les quatre bornes 640, 768,
   1024, 1280, mélange contre un jeton.

   LA COULEUR DU CABINET N'EST JAMAIS ÉCRITE ICI. Le gabarit la pose sur le
   corps de page, avec ses compagnes CALCULÉES par le serveur
   (`minisites/rendu.py::couleurs_du_cabinet`) :
     --ms-marque         l'aplat : le bouton principal, la bande des créneaux ;
     --ms-marque-sur     l'encre qui se lit SUR l'aplat (`encre_sur`) ;
     --ms-marque-encre   la couleur poussée pour se lire en encre sur le
                         papier : les liens, le bouton au survol ;
     --ms-profonde       la teinte assombrie (8:1 avec le blanc) : le pied ;
     --ms-profonde-sur   l'encre qui se lit sur la teinte profonde.
   C'est un ACCENT : liens, boutons, deux aplats. Pas une teinte déclinée en
   fond sur toute la page.
   =========================================================================== */

/* Le plancher des variables : la nuit du signe, si le gabarit n'en posait
   aucune. Le style du corps de page, posé par le gabarit, l'emporte. */
.ms-site {
  --ms-marque: var(--so-nuit);
  --ms-marque-sur: var(--so-sur-nuit);
  --ms-marque-encre: var(--so-nuit);
  --ms-pale: var(--so-chaux);
  --ms-profonde: var(--so-nuit-profonde);
  --ms-profonde-sur: var(--so-sur-nuit);
  --ms-haut-entete: 64px;
  --ms-section: 72px;
  background: var(--so-papier);
  /* La place de la barre d'appel, fixée en bas de l'écran sur téléphone. */
  padding-bottom: 76px;
}

@media (min-width: 1024px) {
  .ms-site { --ms-haut-entete: 76px; --ms-section: 104px; }
}

.ms-site a { color: var(--ms-marque-encre); text-underline-offset: 0.2em; }
.ms-site a:hover { color: var(--so-titre); }
.ms-site ::selection { background: var(--ms-marque); color: var(--ms-marque-sur); }
.ms-site :focus-visible { outline-color: var(--ms-marque-encre); }

.ms-site .ms-ico { flex: none; width: 1.2em; height: 1.2em; }

/* ----- L'annonce datée : une phrase, sur la chaux ----------------------- */

.ms-annonce {
  border-bottom: 1px solid var(--so-filet);
  background: var(--so-chaux);
  color: var(--so-titre);
  font-size: var(--so-t-petit);
}

.ms-annonce p { margin: 0; padding-block: 11px; text-align: center; }

/* L'aperçu du brouillon (« Mon site », lot 2) : la teinte profonde du
   cabinet, pour qu'on ne le prenne jamais pour la page en ligne. */
.ms-apercu {
  background: var(--ms-profonde);
  color: var(--ms-profonde-sur);
  font-size: var(--so-t-petit);
}

.ms-apercu p { margin: 0; padding-block: 8px; text-align: center; }

/* ----- L'en-tête --------------------------------------------------------- */

.ms-entete {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--so-filet);
  background: var(--so-papier);
}

.ms-entete__ligne {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--ms-haut-entete);
}

.ms-site a.ms-entete__marque {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--so-titre);
  text-decoration: none;
}

.ms-site img.ms-entete__logo {
  width: auto;
  max-width: 120px;
  height: 40px;
  object-fit: contain;
}

.ms-entete__nom {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-family: var(--so-fam-titre);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.15;
}

.ms-entete__metier {
  overflow: hidden;
  color: var(--so-encre-2);
  font-family: var(--so-fam-texte);
  font-size: var(--so-t-mini);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-nav { display: none; }

.ms-nav ul {
  display: flex;
  gap: 24px;
  margin: 0 12px 0 0;
  padding: 0;
  list-style: none;
}

.ms-site .ms-nav a {
  color: var(--so-encre);
  font-size: var(--so-t-petit);
  text-decoration: none;
}

.ms-site .ms-nav a:hover { color: var(--so-titre); text-decoration: underline; }

.ms-entete__gestes { flex: none; }
.ms-court { display: none; }

@media (max-width: 639.98px) {
  .ms-long { display: none; }
  .ms-court { display: inline; }
  .ms-site .ms-entete__rdv { min-height: 40px; padding: 8px 14px; font-size: var(--so-t-petit); }
  .ms-entete__nom { font-size: 0.9375rem; }
}

@media (min-width: 1024px) {
  .ms-entete__nom { font-size: 1.25rem; }
  .ms-nav { display: block; }
}

/* ----- Les boutons : l'angle de 3 px du site public ---------------------- */

.ms-bouton,
.ms-site a.ms-bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--so-r);
  font-family: var(--so-fam-texte);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ms-bouton--marque,
.ms-site a.ms-bouton--marque {
  border-color: var(--ms-marque);
  background: var(--ms-marque);
  color: var(--ms-marque-sur);
}

.ms-site .ms-bouton--marque:hover,
.ms-site a.ms-bouton--marque:hover {
  border-color: var(--ms-profonde);
  background: var(--ms-profonde);
  color: var(--ms-profonde-sur);
}

.ms-bouton--trait,
.ms-site a.ms-bouton--trait {
  border-color: var(--so-filet-fort);
  background: var(--so-papier);
  color: var(--so-titre);
}

.ms-site .ms-bouton--trait:hover,
.ms-site a.ms-bouton--trait:hover {
  border-color: var(--so-titre);
  color: var(--so-titre);
}

/* Sur la photo du haut de page : du papier, plein. */
.ms-bouton--clair,
.ms-site a.ms-bouton--clair {
  border-color: var(--so-papier);
  background: var(--so-papier);
  color: var(--so-titre);
}

.ms-site a.ms-bouton--clair:hover { background: var(--so-chaux); color: var(--so-titre); }

.ms-bouton--plein,
.ms-site a.ms-bouton--plein { width: 100%; }

.ms-bouton:disabled { cursor: default; opacity: 0.55; }

/* ----- « Ouvert maintenant » : une ligne de texte ------------------------ */

.ms-etat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 22px 0 0;
  font-size: var(--so-t-petit);
  line-height: 1.4;
}

.ms-etat__point {
  flex: none;
  align-self: center;
  width: 9px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.ms-etat--ouvert .ms-etat__point { border-color: var(--so-vert); background: var(--so-vert); }
.ms-etat__mot { font-weight: 500; }
.ms-etat__phrase { opacity: 0.85; }
.ms-etat--grand { font-size: 1.125rem; }

/* ----- Le haut de page ---------------------------------------------------- */

.ms-heros { position: relative; isolation: isolate; }

.ms-heros--photo {
  display: flex;
  align-items: flex-end;
  min-height: max(560px, calc(100svh - var(--ms-haut-entete)));
  overflow: hidden;
  background: var(--so-titre);
  color: var(--so-papier);
}

.ms-site img.ms-heros__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 35%;
}

/* L'OMBRE : neutre, discrète, seulement derrière le texte. La photo garde ses
   couleurs ; rien ne la teinte. Un élément à part, pas un pseudo-élément. */
.ms-heros__ombre {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg,
    color-mix(in srgb, var(--so-titre) 82%, transparent) 0%,
    color-mix(in srgb, var(--so-titre) 60%, transparent) 40%,
    color-mix(in srgb, var(--so-titre) 26%, transparent) 64%,
    transparent 82%);
}

/* Sur une photo claire, une ombre portée très douce tient le texte lisible. */
.ms-heros--photo .ms-heros__texte { text-shadow: 0 1px 14px color-mix(in srgb, var(--so-titre) 45%, transparent); }
.ms-heros--photo .ms-bouton { text-shadow: none; }

.ms-heros--photo .ms-etat--ouvert .ms-etat__point { border-color: var(--so-vert-clair); background: var(--so-vert-clair); }

.ms-heros--texte {
  border-bottom: 1px solid var(--so-filet);
  background: var(--so-chaux);
  color: var(--so-titre);
}

.ms-heros__texte {
  position: relative;
  padding-top: 112px;
  padding-bottom: 88px;
}

.ms-heros--texte .ms-heros__texte { padding-top: 72px; padding-bottom: 104px; }

.ms-heros__metier {
  margin: 0;
  font-size: var(--so-t-petit);
  opacity: 0.9;
}

.ms-heros__titre {
  max-width: 16ch;
  margin: 12px 0 0;
  font-family: var(--so-fam-titre);
  font-size: clamp(2.625rem, 1.6rem + 4.2vw, 5.25rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.ms-heros__accroche {
  max-width: 40ch;
  margin: 18px 0 0;
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.375rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.ms-heros__jour { margin: 8px 0 0; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }

.ms-heros__gestes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.ms-heros__prochain { margin: 18px 0 0; font-size: var(--so-t-petit); }

.ms-site .ms-heros--photo a:not(.ms-bouton) { color: var(--so-papier); text-decoration: underline; }
.ms-site .ms-heros--photo :focus-visible { outline-color: var(--so-papier); }

@media (max-width: 639.98px) {
  .ms-heros__gestes .ms-bouton { flex: 1 1 auto; }
  .ms-heros__texte { padding-top: 96px; padding-bottom: 76px; }
}

@media (min-width: 1024px) {
  .ms-heros--photo { min-height: min(860px, max(620px, calc(100svh - var(--ms-haut-entete)))); }
  .ms-heros__ombre {
    background:
      linear-gradient(90deg,
        color-mix(in srgb, var(--so-titre) 68%, transparent) 0%,
        color-mix(in srgb, var(--so-titre) 40%, transparent) 38%,
        transparent 62%),
      linear-gradient(0deg,
        color-mix(in srgb, var(--so-titre) 45%, transparent) 0%,
        transparent 50%);
  }
  /* La fiche se pose à droite, sur le bas de la photo : le texte lui laisse la place. */
  .ms-heros__texte { padding-right: calc(340px + 64px); padding-bottom: 120px; }
}

/* L'UNIQUE ENTRÉE de la page : la photo se pose, le texte monte, une fois. */
@media (prefers-reduced-motion: no-preference) {
  .js .ms-heros__photo { animation: ms-pose 1.8s var(--so-detente) both; }
  .js .ms-heros__texte { animation: ms-monte 1s 0.1s var(--so-detente) both; }
}

@keyframes ms-pose {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

@keyframes ms-monte {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ----- La page : la fiche à droite, les sections à gauche ---------------- */

.ms-fiche {
  position: relative;
  z-index: 3;
  margin-top: -40px;
  padding: 22px 24px 24px;
  border: 1px solid var(--so-filet);
  border-top: 3px solid var(--ms-marque);
  border-radius: var(--so-r);
  background: var(--so-papier);
  color: var(--so-encre);
  font-size: var(--so-t-petit);
}

.ms-fiche .ms-etat { margin: 0; color: var(--so-titre); }

.ms-fiche__faits { margin: 16px 0 0; }

.ms-fiche__faits div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 9px;
  border-top: 1px solid var(--so-filet);
}

.ms-fiche__faits dt { flex: none; color: var(--so-encre-2); }
.ms-fiche__faits .ms-fiche__long { display: block; }
.ms-fiche__faits .ms-fiche__long dd { margin-top: 2px; text-align: left; }
.ms-fiche__faits dd { margin: 0; color: var(--so-titre); font-variant-numeric: tabular-nums; text-align: right; }

.ms-fiche__gestes { display: grid; gap: 8px; margin-top: 16px; }

.ms-fiche__adresse {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--so-filet);
  line-height: 1.5;
}

@media (min-width: 1024px) {
  .ms-corps__grille {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 64px;
    align-items: start;
  }
  .ms-sections { grid-row: 1; grid-column: 1; }
  .ms-fiche {
    position: sticky;
    top: calc(var(--ms-haut-entete) + 24px);
    grid-row: 1;
    grid-column: 2;
    margin-top: -200px;
  }
}

/* ----- Les sections : du papier, des filets, de l'espace ----------------- */

.ms-section {
  position: relative;
  padding-block: var(--ms-section);
  scroll-margin-top: calc(var(--ms-haut-entete) + 12px);
}

/* Un filet entre deux sections sur le papier ; autour d'un fond (la chaux,
   l'aplat), le changement de fond suffit. */
.ms-sections > .ms-section:not(.ms-section--calme):not(.ms-section--marque)
  + .ms-section:not(.ms-section--calme):not(.ms-section--marque) {
  border-top: 1px solid var(--so-filet);
}

/* La chaux d'un bord à l'autre de l'écran : le fond déborde de la colonne
   par une ombre pleine, rognée en hauteur, et passe sous la fiche. */
.ms-section--calme {
  background: var(--so-chaux);
  box-shadow: 0 0 0 100vmax var(--so-chaux);
  clip-path: inset(-1px -100vmax);
}

.ms-section__titre {
  max-width: 22ch;
  margin: 0 0 36px;
  color: var(--so-titre);
  font-family: var(--so-fam-titre);
  font-size: clamp(2rem, 1.5rem + 1.7vw, 2.875rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.ms-sous-titre {
  margin: 0 0 12px;
  color: var(--so-titre);
  font-family: var(--so-fam-titre);
  font-size: 1.375rem;
  font-weight: 400;
}

/* ----- Les créneaux : le tableau d'affichage, premier aplat -------------- */

.ms-section--marque {
  background: var(--ms-marque);
  box-shadow: 0 0 0 100vmax var(--ms-marque);
  clip-path: inset(-1px -100vmax);
  color: var(--ms-marque-sur);
}

.ms-section--marque .ms-section__titre { margin-bottom: 14px; color: var(--ms-marque-sur); }
.ms-creneaux__tete p { max-width: 54ch; margin: 0 0 32px; opacity: 0.9; }

.ms-tableau {
  margin: 0;
  padding: 0;
  border-top: 1px solid color-mix(in srgb, var(--ms-marque-sur) 35%, transparent);
  list-style: none;
}

.ms-tableau__ligne {
  display: grid;
  gap: 6px 24px;
  padding-block: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--ms-marque-sur) 35%, transparent);
}

.ms-tableau__jour { font-family: var(--so-fam-titre); font-size: 1.25rem; }

.ms-tableau__heures {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}

.ms-site .ms-tableau__heures a {
  color: var(--ms-marque-sur);
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

.ms-site .ms-tableau__heures a:hover { text-decoration-thickness: 3px; }

.ms-creneaux__suite { margin: 22px 0 0; }
.ms-site .ms-section--marque a { color: var(--ms-marque-sur); }
.ms-site .ms-section--marque :focus-visible { outline-color: var(--ms-marque-sur); }

@media (min-width: 640px) {
  .ms-tableau__ligne { grid-template-columns: 200px minmax(0, 1fr); align-items: baseline; }
}

/* ----- Les services : une carte de soins --------------------------------- */

.ms-carte-de-soins {
  max-width: 780px;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--so-titre);
  list-style: none;
}

.ms-soin {
  display: grid;
  gap: 6px 32px;
  padding-block: 18px;
  border-bottom: 1px solid var(--so-filet);
}

.ms-soin__nom {
  margin: 0;
  color: var(--so-titre);
  font-family: var(--so-fam-titre);
  font-size: 1.3125rem;
  font-weight: 400;
  line-height: 1.25;
}

.ms-soin__desc { margin: 4px 0 0; color: var(--so-encre-2); font-size: var(--so-t-petit); }

.ms-soin__valeurs {
  display: flex;
  gap: 20px;
  margin: 0;
  color: var(--so-encre);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ms-soin__duree { color: var(--so-encre-2); font-size: var(--so-t-petit); }
.ms-service__prix { color: var(--so-titre); }

@media (min-width: 640px) {
  .ms-soin { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .ms-soin__valeurs { justify-content: flex-end; }
}

/* ----- L'équipe : des fiches typographiques ------------------------------ */

.ms-equipe {
  display: grid;
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ms-membre {
  padding-block: 20px 22px;
  border-top: 1px solid var(--so-titre);
}

.ms-membre p { margin: 0; }

.ms-site img.ms-membre__photo {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 4 / 5;
  margin-bottom: 16px;
  object-fit: cover;
}

.ms-membre__nom {
  color: var(--so-titre);
  font-family: var(--so-fam-titre);
  font-size: 1.5rem;
  line-height: 1.2;
}

.ms-membre .ms-membre__titre { margin-top: 4px; color: var(--so-encre); }
.ms-membre .ms-membre__langues { margin-top: 10px; color: var(--so-encre-2); font-size: var(--so-t-petit); }
.ms-membre .ms-membre__rdv { margin-top: 12px; font-size: var(--so-t-petit); }

@media (min-width: 640px) {
  .ms-equipe { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

/* ----- La présentation : un chapeau, puis le texte ----------------------- */

.ms-texte { max-width: 64ch; }
.ms-texte p { margin: 0 0 1em; color: var(--so-encre); font-size: 1.0625rem; line-height: 1.7; }
.ms-texte p:first-child {
  max-width: 34ch;
  margin-bottom: 0.9em;
  color: var(--so-titre);
  font-family: var(--so-fam-titre);
  font-size: clamp(1.4375rem, 1.2rem + 0.9vw, 1.875rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.ms-texte p:last-child { margin-bottom: 0; }

/* ----- La galerie : la mosaïque, sans trou -------------------------------- */

.ms-galerie {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 150px;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ms-galerie li:first-child { grid-row: span 2; grid-column: span 2; }
.ms-galerie li:last-child:nth-child(even) { grid-column: span 2; }
.ms-galerie--2 li:first-child,
.ms-galerie--2 li:last-child { grid-row: span 2; grid-column: span 1; }

.ms-galerie__lien { display: block; height: 100%; overflow: hidden; }

.ms-site .ms-galerie img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--so-detente);
}

.ms-galerie__lien:hover img,
.ms-galerie__lien:focus-visible img { transform: scale(1.03); }

@media (min-width: 768px) {
  .ms-galerie { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 170px; }
  .ms-galerie li:last-child:nth-child(even) { grid-column: auto; }
  .ms-galerie--1 li:first-child { grid-column: 1 / -1; }
  .ms-galerie--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-galerie--3 li:not(:first-child),
  .ms-galerie--4 li:last-child,
  .ms-galerie--7 li:nth-child(n+6),
  .ms-galerie--8 li:last-child { grid-column: span 2; }
  .ms-galerie--6 li:last-child { grid-column: 1 / -1; }
}

/* La visionneuse : plein écran, l'image entière, trois boutons. */
.ms-visionneuse {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: color-mix(in srgb, var(--so-titre) 94%, transparent);
  color: var(--so-papier);
}

.ms-visionneuse::backdrop { background: transparent; }

.ms-visionneuse__cadre {
  display: grid;
  place-items: center;
  height: 100%;
  margin: 0;
  padding: 72px 16px 56px;
}

.ms-site img.ms-visionneuse__image {
  max-width: min(1200px, 100%);
  max-height: calc(100vh - 160px);
  object-fit: contain;
}

.ms-visionneuse__legende { margin-top: 14px; font-size: var(--so-t-petit); text-align: center; }

.ms-visionneuse__bouton {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: var(--so-r);
  background: var(--so-papier);
  color: var(--so-titre);
  cursor: pointer;
}

.ms-visionneuse__bouton--fermer { top: 16px; right: 16px; }
.ms-visionneuse__bouton--precedent { top: 50%; left: 16px; transform: translateY(-50%); }
.ms-visionneuse__bouton--suivant { top: 50%; right: 16px; transform: translateY(-50%); }
.ms-visionneuse__bouton:focus-visible { outline: 2px solid var(--so-papier); outline-offset: 3px; }

/* ----- Les horaires : un tableau à filets, sur la chaux ------------------- */

.ms-horaires { display: grid; gap: 36px; align-items: start; }

.ms-semaine {
  width: 100%;
  max-width: 520px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.ms-semaine th,
.ms-semaine td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--so-filet);
  text-align: left;
  vertical-align: baseline;
}

.ms-semaine tr:first-child th,
.ms-semaine tr:first-child td { border-top: 1px solid var(--so-titre); }

.ms-semaine th { color: var(--so-titre); font-weight: 400; }
.ms-semaine td { color: var(--so-encre); text-align: right; white-space: nowrap; }
.ms-semaine td.ms-semaine__ferme { color: var(--so-encre-2); }

.ms-semaine__aujourdhui th,
.ms-semaine__aujourdhui td { background: var(--so-papier); color: var(--so-titre); }

.ms-semaine__marque { margin-left: 6px; color: var(--ms-marque-encre); font-size: var(--so-t-mini); }

.ms-fermetures { margin: 0; padding: 0; list-style: none; }
.ms-fermetures li { padding-block: 10px; border-bottom: 1px solid var(--so-filet); color: var(--so-titre); }
.ms-fermetures li:first-child { border-top: 1px solid var(--so-titre); }

@media (min-width: 768px) {
  .ms-horaires:has(.ms-horaires__cote) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

/* ----- Informations pratiques : du texte courant -------------------------- */

.ms-faits { max-width: 820px; margin: 0; }

.ms-faits__ligne {
  display: grid;
  gap: 4px 32px;
  padding-block: 16px;
  border-bottom: 1px solid var(--so-filet);
}

.ms-faits__ligne:first-child { border-top: 1px solid var(--so-titre); }
.ms-faits dt { color: var(--so-encre-2); font-size: var(--so-t-petit); }
.ms-faits dd { margin: 0; color: var(--so-titre); line-height: 1.6; }

@media (min-width: 768px) {
  .ms-faits__ligne { grid-template-columns: 240px minmax(0, 1fr); align-items: baseline; }
}

/* ----- L'accès ----------------------------------------------------------- */

.ms-acces p { margin: 0; }

.ms-acces__adresse {
  max-width: 26ch;
  color: var(--so-titre);
  font-family: var(--so-fam-titre);
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2rem);
  line-height: 1.25;
}

.ms-acces .ms-acces__repere { max-width: 56ch; margin-top: 12px; color: var(--so-encre); }
.ms-acces .ms-acces__faits { margin-top: 8px; color: var(--so-encre-2); }

.ms-acces .ms-acces__gestes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.ms-carte { margin-top: 20px; }

.ms-carte__cadre {
  display: block;
  width: 100%;
  height: 380px;
  border: 1px solid var(--so-filet);
}

.ms-acces .ms-note { margin-top: 12px; color: var(--so-encre-2); font-size: var(--so-t-mini); }

/* ----- Les questions fréquentes : des filets ----------------------------- */

.ms-faq { max-width: 780px; border-top: 1px solid var(--so-titre); }

.ms-faq__item { border-bottom: 1px solid var(--so-filet); }

.ms-faq__question {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-block: 18px;
  color: var(--so-titre);
  font-size: 1.0625rem;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
}

.ms-faq__question::-webkit-details-marker { display: none; }
.ms-faq__question:hover { color: var(--ms-marque-encre); }

.ms-faq__signe {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}

.ms-faq__signe::before,
.ms-faq__signe::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--so-detente);
}

.ms-faq__signe::after { transform: rotate(90deg); }
.ms-faq__item[open] .ms-faq__signe::after { transform: rotate(0deg); }

.ms-faq__reponse { max-width: 64ch; padding-bottom: 20px; color: var(--so-encre); }
.ms-faq__reponse p { margin: 0 0 0.8em; line-height: 1.65; }
.ms-faq__reponse p:last-child { margin-bottom: 0; }

/* ----- Les urgences : une phrase, un numéro ------------------------------ */

.ms-urgence { display: grid; gap: 12px 48px; align-items: baseline; }

.ms-urgence__phrase { max-width: 46ch; margin: 0; color: var(--so-titre); font-size: var(--so-t-chapo); line-height: 1.5; }

.ms-urgence__numero { margin: 0; }

.ms-site .ms-urgence__numero a {
  color: var(--ms-marque-encre);
  font-family: var(--so-fam-titre);
  font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  line-height: 1.1;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .ms-urgence { grid-template-columns: minmax(0, 1fr) auto; }
}

/* ----- Contactez-nous, sur la chaux --------------------------------------- */

.ms-contact { display: grid; gap: 40px; align-items: start; }

.ms-coordonnees { margin: 0; border-top: 1px solid var(--so-titre); }

.ms-coordonnees div {
  display: grid;
  gap: 2px;
  padding-block: 12px;
  border-bottom: 1px solid var(--so-filet);
}

.ms-coordonnees dt { color: var(--so-encre-2); font-size: var(--so-t-mini); }
.ms-coordonnees dd { margin: 0; color: var(--so-titre); overflow-wrap: anywhere; }

.ms-formulaire {
  padding: 28px 24px;
  border: 1px solid var(--so-filet);
  border-radius: var(--so-r);
  background: var(--so-papier);
}

.ms-formulaire__avertissement,
.ms-formulaire__envoye {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--so-filet);
  border-radius: var(--so-r);
  font-size: var(--so-t-petit);
  line-height: 1.5;
}

.ms-formulaire__avertissement { background: var(--so-chaux); color: var(--so-titre); }
.ms-formulaire__envoye { border-color: var(--so-vert); color: var(--so-titre); }

.ms-formulaire__erreurs {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--so-bissap);
  border-radius: var(--so-r);
  color: var(--so-titre);
}

.ms-formulaire__erreurs p { margin: 0; }

.ms-champs { position: relative; display: grid; gap: 16px; }

.ms-champ label {
  display: block;
  margin-bottom: 6px;
  color: var(--so-titre);
  font-size: var(--so-t-petit);
}

.ms-champ__facultatif { color: var(--so-encre-2); }

.ms-champ input,
.ms-champ textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--so-filet-fort);
  border-radius: var(--so-r);
  background: var(--so-papier);
  color: var(--so-titre);
  font: inherit;
}

.ms-champ textarea { min-height: 136px; resize: vertical; }

.ms-champ input:focus,
.ms-champ textarea:focus {
  border-color: var(--ms-marque-encre);
  outline: 2px solid var(--ms-marque-encre);
  outline-offset: 0;
}

.ms-champ__erreur { margin: 6px 0 0; color: var(--so-bissap); font-size: var(--so-t-petit); }

/* Le champ piège : hors de l'écran, jamais atteint au clavier. */
.ms-champ-piege {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ms-formulaire__pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 20px;
}

.ms-formulaire__pied small { color: var(--so-encre-2); font-size: var(--so-t-mini); }

@media (min-width: 640px) {
  .ms-champs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-champ--plein { grid-column: 1 / -1; }
  .ms-formulaire { padding: 32px; }
}

@media (min-width: 1280px) {
  .ms-contact:not(.ms-contact--seul) { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
}

/* ----- Les mentions légales ---------------------------------------------- */

.ms-mentions { padding-block: var(--ms-section); }
.ms-mentions__corps { max-width: 820px; }
.ms-mentions .ms-sous-titre { margin-top: 36px; }
.ms-mentions p { max-width: 66ch; line-height: 1.65; }
.ms-mentions__retour { margin-top: 36px; }

.ms-definitions { margin: 0; border-top: 1px solid var(--so-titre); }
.ms-definitions div { display: grid; gap: 2px; padding-block: 12px; border-bottom: 1px solid var(--so-filet); }
.ms-definitions dt { color: var(--so-encre-2); font-size: var(--so-t-petit); }
.ms-definitions dd { margin: 0; color: var(--so-titre); }

/* ----- Le pied : le second aplat ----------------------------------------- */

.ms-pied {
  padding-block: 64px 28px;
  background: var(--ms-profonde);
  color: color-mix(in srgb, var(--ms-profonde-sur) 82%, transparent);
  font-size: var(--so-t-petit);
}

.ms-pied p { margin: 0 0 4px; }
.ms-pied__grille { display: grid; gap: 36px; }

.ms-pied .ms-pied__nom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ms-profonde-sur);
  font-family: var(--so-fam-titre);
  font-size: 1.375rem;
}

.ms-site img.ms-pied__logo {
  width: auto;
  max-width: 120px;
  height: 40px;
  padding: 4px;
  border-radius: var(--so-r);
  background: var(--so-papier);
  object-fit: contain;
}

.ms-pied .ms-pied__titre { margin-bottom: 10px; color: var(--ms-profonde-sur); }

.ms-pied__liste {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ms-site .ms-pied a { color: var(--ms-profonde-sur); text-decoration: none; }
.ms-site .ms-pied a:hover { color: var(--ms-profonde-sur); text-decoration: underline; }
.ms-site .ms-pied :focus-visible { outline-color: var(--ms-profonde-sur); }

.ms-pied__bas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--ms-profonde-sur) 20%, transparent);
  font-size: var(--so-t-mini);
}

.ms-site .ms-pied__bas span a { text-decoration: underline; }

@media (min-width: 768px) {
  .ms-pied__grille { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
}

/* ----- WhatsApp, flottant ------------------------------------------------ */

.ms-site a.ms-wa-flottant {
  position: fixed;
  right: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 52px;
  height: 52px;
  padding: 0 14px;
  border-radius: var(--so-r);
  background: var(--so-vert);
  color: var(--so-papier);
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.3s ease, transform 0.35s var(--so-detente);
}

.ms-site a.ms-wa-flottant .ms-ico { width: 24px; height: 24px; }
.ms-site a.ms-wa-flottant:hover { color: var(--so-papier); }
.ms-wa-flottant__texte { display: none; }

/* Avec le script, il entre une fois le haut de page passé (ses propres
   boutons WhatsApp sont alors hors de vue). */
.js .ms-wa-flottant { visibility: hidden; opacity: 0; transform: translateY(12px); }
.ms-a-defile .ms-wa-flottant { visibility: visible; opacity: 1; transform: none; }

@media (min-width: 768px) {
  .ms-site a.ms-wa-flottant { right: 24px; bottom: 24px; padding: 0 20px 0 16px; }
  .ms-wa-flottant__texte { display: inline; }
}

/* ----- La barre d'appel, sur téléphone ----------------------------------- */

.ms-barre {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 44;
  display: flex;
  gap: 8px;
  padding: 10px var(--so-gouttiere) calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--so-filet);
  background: var(--so-papier);
}

.ms-barre .ms-bouton,
.ms-site .ms-barre a.ms-bouton { flex: 1 1 0; min-height: 46px; padding-inline: 12px; white-space: nowrap; }

/* Avec le script, la barre attend que les gestes du haut de page soient
   passés : elle ne double jamais des boutons déjà sous les yeux. */
.js .ms-barre {
  visibility: hidden;
  transform: translateY(110%);
  transition: transform 0.35s var(--so-detente), visibility 0s linear 0.35s;
}

.ms-a-defile .ms-barre {
  visibility: visible;
  transform: none;
  transition: transform 0.35s var(--so-detente), visibility 0s;
}

@media (min-width: 768px) {
  .ms-site { padding-bottom: 0; }
  .ms-barre { display: none; }
}
