/* Emilie Nakad, sage-femme à Brignoles.
   Fil conducteur : le paravent du cabinet (motifs végétaux au pastel, panneaux articulés).
   Écrit pour le téléphone d'abord. Coins : 3 px partout, aucune ombre, filets fins. */

:root {
  --papier: #fbf8f2;
  --lin: #efe5d3;          /* bois clair du bureau */
  --blanc: #ffffff;
  --olive: #4a5419;        /* titres */
  --olive-clair: #8b8f45;
  --terracotta: #b4583c;   /* décor uniquement, jamais sur un bouton */
  --rose: #ecc9bd;
  --lavande: #c9c6e6;
  --encre-lavande: #46447f; /* boutons d'action */
  --encre-lavande-fonce: #34325f;
  --texte: #2f2b25;
  --doux: #645d53;
  --filet: #dcd2c0;
  --coin: 3px;
  --rail: 0px;
  --entete: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--entete) + 12px); }
body {
  margin: 0;
  background: var(--papier);
  color: var(--texte);
  font: 400 18px/1.6 'Source Serif 4', Georgia, serif;
  font-variant-ligatures: no-common-ligatures no-discretionary-ligatures;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3 {
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-weight: 600;
  font-style: normal;
  color: var(--olive);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}
h2 { font-size: clamp(30px, 7.4vw, 48px); }
h3 { font-size: 21px; }
:focus-visible { outline: 2px solid var(--encre-lavande); outline-offset: 3px; }
.evitement { position: absolute; left: -999px; top: 8px; z-index: 60; background: var(--blanc); padding: 8px 12px; }
.evitement:focus { left: 12px; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Liens soulignés d'un trait pastel qui glisse au survol */
.lien {
  color: var(--encre-lavande);
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(var(--rose), var(--rose)) 0 100% / 100% 2px no-repeat;
  transition: background-size 0.35s ease;
  padding-bottom: 1px;
}
.lien:hover { background-size: 100% 100%; }

/* Boutons : rectangulaires, coins de 3 px, deux styles seulement */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  border-radius: var(--coin);
  font: 600 16px/1.2 'Instrument Sans', system-ui, sans-serif;
  text-decoration: none; text-align: center;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.bouton-rdv { background: var(--encre-lavande); color: var(--blanc); }
.bouton-rdv:hover { background: var(--encre-lavande-fonce); }
.bouton-tel { border: 1.5px solid var(--olive); color: var(--olive); background: transparent; }
.bouton-tel:hover { background: var(--olive); color: var(--blanc); }
.actions { display: grid; gap: 10px; }

/* Statut « ouvert maintenant » (rempli par le script) */
.statut { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 600 15px/1.3 'Instrument Sans', system-ui, sans-serif; color: var(--doux); }
.statut::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--terracotta); }
.statut.ouvert { color: var(--olive); }
.statut.ouvert::before { background: var(--olive-clair); box-shadow: 0 0 0 4px rgba(139, 143, 69, 0.22); }
.statut[hidden] { display: none; }

/* ---------- En-tête (téléphone) / rail latéral (ordinateur) ---------- */
.rail {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  height: var(--entete); padding: 0 16px;
  background: rgba(251, 248, 242, 0.96);
  border-bottom: 1px solid var(--filet);
}
.marque { text-decoration: none; margin-right: auto; min-width: 0; }
.marque-nom { display: block; font: 700 18px/1.15 'Instrument Sans', system-ui, sans-serif; color: var(--olive); }
.marque-role { display: block; font: 500 13px/1.3 'Instrument Sans', system-ui, sans-serif; color: var(--doux); }
.rail-nav, .rail-tel, .rail .statut, .rail-frise, .rail-cache { display: none; }
.rail-contact { display: flex; }
.rail .bouton { min-height: 42px; padding: 0 14px; font-size: 15px; }

/* ---------- Ouverture ---------- */
.ouverture { padding: 28px 16px 8px; display: grid; gap: 28px; }
.ouverture h1 { font-size: clamp(34px, 9.4vw, 64px); font-weight: 700; }
.chapo { margin: 16px 0 22px; color: var(--doux); font-size: 18px; max-width: 34em; }
.repere { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 18px 0 0; font: 500 15px/1.3 'Instrument Sans', system-ui, sans-serif; }

/* Le paravent : trois volets articulés qui se déplient au chargement */
.paravent {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  perspective: 1100px;
  max-width: 560px;
}
.volet { transform-origin: 50% 50%; transform: rotateY(var(--angle, 0deg)); }
.volet:nth-child(1) { --angle: 9deg; }
.volet:nth-child(2) { --angle: -9deg; }
.volet:nth-child(3) { --angle: 9deg; }
.volet img { width: 100%; aspect-ratio: 3 / 5; object-fit: cover; border-radius: var(--coin); background: var(--lin); }
.volet:nth-child(1) img { object-position: 50% 30%; }
@keyframes deplie {
  from { transform: rotateY(calc(var(--angle) * 6)); opacity: 0.35; }
  to { transform: rotateY(var(--angle)); opacity: 1; }
}
.volet { animation: deplie 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.volet:nth-child(2) { animation-delay: 0.09s; }
.volet:nth-child(3) { animation-delay: 0.18s; }

/* Frise végétale qui pousse depuis le sol quand elle entre à l'écran */
.frise { overflow: hidden; height: 72px; margin-top: 8px; }
.frise img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.js .frise img { clip-path: inset(100% 0 0 0); transition: clip-path 1.1s cubic-bezier(0.3, 0.6, 0.2, 1); }
.js .frise.vue img { clip-path: inset(0 0 0 0); }

/* En-têtes de sections : alignés à gauche, sans surtitre */
.tete p { max-width: 40em; color: var(--doux); margin: 12px 0 0; }

/* ---------- Consultations, en onglets ---------- */
.consultations { padding: 48px 16px 56px; background: var(--blanc); border-top: 1px solid var(--filet); }
.onglets {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 26px -16px 0; padding: 0 16px;
  border-bottom: 1px solid var(--filet);
}
.onglets::-webkit-scrollbar { display: none; }
.onglets[hidden] { display: none; }
.onglets button {
  flex: none; position: relative;
  min-height: 48px; padding: 0 14px;
  border: 0; background: none; cursor: pointer;
  font: 600 16px/1.2 'Instrument Sans', system-ui, sans-serif; color: var(--doux);
}
.onglets button::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px;
  background: var(--olive); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.3s ease;
}
.onglets button[aria-selected='true'] { color: var(--olive); }
.onglets button[aria-selected='true']::after { transform: scaleX(1); }
.onglets button:hover { color: var(--olive); }
.panneau { padding-top: 26px; }
.panneau + .panneau { border-top: 1px solid var(--filet); margin-top: 26px; }
.js .panneau + .panneau { border-top: 0; margin-top: 0; }
.js .panneau[hidden] { display: none; }
.js .panneau:not([hidden]) { animation: apparait 0.35s ease both; }
@keyframes apparait { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
.js .panneau-intro h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.panneau-intro p { margin: 8px 0 0; color: var(--doux); }
.js .panneau-intro p { margin-top: 0; }
.actes { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--filet); }
.actes li {
  position: relative; padding: 13px 0 13px 28px;
  border-bottom: 1px solid var(--filet);
  font: 500 17px/1.35 'Instrument Sans', system-ui, sans-serif;
}
.actes li::before {
  content: ''; position: absolute; left: 4px; top: 50%; width: 11px; height: 11px; margin-top: -6px;
  border-radius: 0 100% 0 100%; background: var(--olive-clair); opacity: 0.8;
}
.actes li:nth-child(3n + 2)::before { background: var(--rose); opacity: 1; }
.actes li:nth-child(3n)::before { background: var(--lavande); opacity: 1; }
.urgence-note { margin: 28px 0 0; padding: 16px 18px; background: var(--papier); border-left: 3px solid var(--lavande); font-size: 17px; }

/* ---------- Parcours : un paravent de sept panneaux ---------- */
.parcours { padding: 56px 0 48px; background: var(--lin); }
.parcours .tete { padding: 0 16px; }
.etapes {
  list-style: none; margin: 28px 0 0; padding: 4px 16px 8px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 6px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  scrollbar-width: none;
}
.etapes::-webkit-scrollbar { display: none; }
.etape {
  scroll-snap-align: start;
  position: relative;
  display: flex; flex-direction: column;
  min-height: 250px; padding: 18px 16px 90px;
  border-radius: var(--coin);
  background: var(--fond-etape, var(--papier)) url('img/frise.svg') no-repeat;
  background-size: auto 78px;
  background-position: var(--motif, 0%) 100%;
}
.etape:nth-child(1) { --fond-etape: #f3dcd3; --motif: 2%; }
.etape:nth-child(2) { --fond-etape: #e4e3c9; --motif: 38%; }
.etape:nth-child(3) { --fond-etape: #e2e0f1; --motif: 55%; }
.etape:nth-child(4) { --fond-etape: #f6ebdb; --motif: 18%; }
.etape:nth-child(5) { --fond-etape: #f1d8d0; --motif: 76%; }
.etape:nth-child(6) { --fond-etape: #e8e8d3; --motif: 92%; }
.etape-annee { font: 600 14px/1.3 'Instrument Sans', system-ui, sans-serif; color: var(--doux); }
.etape-lieu { margin-top: 6px; font: 700 26px/1.1 'Instrument Sans', system-ui, sans-serif; color: var(--olive); }
.etape-quoi { margin-top: 10px; font-size: 16px; line-height: 1.45; }
.etape-ici { --fond-etape: var(--encre-lavande); --motif: 64%; color: var(--blanc); }
.etape-ici .etape-annee { color: var(--lavande); }
.etape-ici .etape-lieu { color: var(--blanc); }
.avance { height: 2px; margin: 16px 16px 0; background: rgba(74, 84, 25, 0.18); }
.avance span { display: block; height: 100%; width: 100%; background: var(--olive); transform-origin: 0 50%; transform: scaleX(var(--p, 0.14)); transition: transform 0.12s linear; }

/* ---------- Cabinet ---------- */
.cabinet { padding: 56px 16px; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.photo { overflow: hidden; }
.photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--coin); }
.photo-a { grid-column: 1 / -1; }
.photo-a img { aspect-ratio: 4 / 5; }
figcaption { margin-top: 8px; font: 500 14px/1.35 'Instrument Sans', system-ui, sans-serif; color: var(--doux); }

/* ---------- Remboursement ---------- */
.remboursement { padding: 56px 16px; background: var(--blanc); border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); }
.colonnes { display: grid; gap: 28px; margin-top: 28px; }
.bloc { padding-top: 16px; border-top: 3px solid var(--rose); }
.bloc:nth-child(2) { border-top-color: var(--lavande); }
.bloc:nth-child(3) { border-top-color: var(--olive-clair); }
.bloc p { margin: 10px 0 0; color: var(--texte); }

/* ---------- Horaires et accès ---------- */
.horaires { padding: 56px 16px; }
.statut-grand { margin-top: 14px; font-size: 17px; }
.semaine { width: 100%; border-collapse: collapse; font: 500 16px/1.3 'Instrument Sans', system-ui, sans-serif; }
.semaine th { width: 42%; text-align: left; font-weight: 600; color: var(--olive); padding: 12px 8px 12px 10px; }
.semaine td { padding: 12px 8px; color: var(--texte); white-space: nowrap; }
.semaine tr { border-bottom: 1px solid var(--filet); }
.semaine tr.ferme td, .semaine tr.ferme th { color: var(--doux); font-weight: 500; }
.semaine tr.aujourdhui { background: var(--lin); }
.semaine tr.aujourdhui th::after { content: ' · aujourd’hui'; font-weight: 500; color: var(--doux); font-size: 13px; }
.adresse { margin: 0; font: 600 19px/1.45 'Instrument Sans', system-ui, sans-serif; color: var(--olive); }
.acces-liste { margin: 12px 0 20px; padding-left: 20px; color: var(--texte); }
.acces-liste li::marker { color: var(--terracotta); }
.urgence { margin: 18px 0 0; font-size: 16px; color: var(--doux); }

/* ---------- Fin ---------- */
.fin { background: var(--lin); padding: 0 16px 48px; }
.fin .frise { margin: 0 -16px; padding-top: 24px; height: 96px; }
.fin-int { display: grid; gap: 22px; padding-top: 28px; }
.fin-portrait { width: 112px; aspect-ratio: 1; object-fit: cover; border-radius: var(--coin); }
.fin h2 { font-size: clamp(28px, 6.6vw, 42px); }
.fin p { color: var(--doux); margin: 12px 0 22px; }

.pied { padding: 24px 16px 32px; background: var(--olive); color: #eef0dc; font: 500 14px/1.5 'Instrument Sans', system-ui, sans-serif; }
.pied p { margin: 0 0 6px; }
.pied strong { color: var(--blanc); }
.pied .lien { color: var(--blanc); background-image: linear-gradient(rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.35)); }

/* ---------- Grands téléphones et tablettes ---------- */
@media (min-width: 640px) {
  .actions { display: flex; flex-wrap: wrap; gap: 12px; }
  .etapes { grid-auto-columns: 38%; }
  .photos { grid-template-columns: 1.3fr 1fr 1fr; align-items: start; }
  .photo-a { grid-column: auto; }
  .photo-a img { aspect-ratio: 3 / 4; }
  .fin-int { grid-template-columns: 140px 1fr; align-items: start; }
  .fin-portrait { width: 140px; }
  .rail-cache { display: inline; }
}

/* ---------- Ordinateur : rail latéral ---------- */
@media (min-width: 1024px) {
  :root { --rail: 264px; --entete: 0px; }
  body { font-size: 18px; }
  .rail {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail); height: auto;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 36px 28px 0;
    background: var(--papier);
    border-bottom: 0; border-right: 1px solid var(--filet);
    overflow: hidden;
  }
  .marque { margin: 0; }
  .marque-nom { font-size: 24px; }
  .marque-role { font-size: 15px; margin-top: 4px; }
  .rail-nav { display: flex; flex-direction: column; margin-top: 40px; border-top: 1px solid var(--filet); }
  .rail-nav a {
    position: relative; padding: 11px 0 11px 0; border-bottom: 1px solid var(--filet);
    font: 500 16px/1.3 'Instrument Sans', system-ui, sans-serif; color: var(--doux); text-decoration: none;
    transition: color 0.2s, padding-left 0.25s ease;
  }
  .rail-nav a::before {
    content: ''; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px;
    border-radius: 0 100% 0 100%; background: var(--olive-clair);
    transform: scale(0); transition: transform 0.25s ease;
  }
  .rail-nav a:hover, .rail-nav a.actif { color: var(--olive); padding-left: 16px; }
  .rail-nav a:hover::before, .rail-nav a.actif::before { transform: scale(1); }
  .rail-contact { flex-direction: column; gap: 12px; margin-top: 28px; }
  .rail .statut { display: inline-flex; font-size: 14px; }
  .rail .statut[hidden] { display: none; }
  .rail-tel { display: block; font: 700 21px/1.2 'Instrument Sans', system-ui, sans-serif; color: var(--olive); text-decoration: none; }
  .rail-tel:hover { color: var(--encre-lavande); }
  .rail .bouton { min-height: 50px; font-size: 16px; }
  .rail-cache { display: none; }
  .rail-frise { display: block; margin: auto -28px 0; width: calc(100% + 56px); max-width: none; height: 90px; object-fit: cover; object-position: 30% 100%; }

  main, .pied { margin-left: var(--rail); }
  .ouverture { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 44px; align-items: center; padding: 72px 56px 24px; min-height: 86vh; }
  .ouverture h1 { font-size: clamp(40px, 3.7vw, 60px); }
  .chapo { font-size: 20px; margin: 22px 0 30px; }
  .ouverture .repere .statut { display: none; }
  .paravent { gap: 8px; max-width: none; }
  .volet:nth-child(1) { --angle: 12deg; }
  .volet:nth-child(2) { --angle: -12deg; }
  .volet:nth-child(3) { --angle: 12deg; }
  .frise { height: 110px; margin-top: 0; }
  .consultations, .cabinet, .remboursement, .horaires { padding: 96px 56px; }
  .consultations { display: grid; grid-template-columns: 1fr; }
  .onglets { margin: 40px 0 0; padding: 0; gap: 10px; }
  .onglets button { font-size: 17px; padding: 0 18px; }
  .panneau { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; padding-top: 36px; }
  .actes { margin-top: 0; }
  .urgence-note { max-width: 40em; }
  .parcours { padding: 96px 0 88px; }
  .parcours .tete { padding: 0 56px; }
  .etapes {
    margin-top: 48px; padding: 8px 56px; overflow: visible;
    grid-auto-flow: row; grid-template-columns: repeat(7, 1fr); gap: 6px;
    perspective: 1400px;
  }
  .etape {
    min-height: 380px; padding: 20px 14px 100px;
    transform: rotateY(var(--pli, 0deg));
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .etape:nth-child(odd) { --pli: 7deg; }
  .etape:nth-child(even) { --pli: -7deg; }
  .etape:hover { --pli: 0deg; }
  .etape-lieu { font-size: clamp(19px, 1.6vw, 24px); }
  .etape-quoi { font-size: 15px; }
  .avance { display: none; }
  .photos { gap: 14px; margin-top: 40px; max-width: 1120px; }
  .photo img { transition: transform 0.6s ease; }
  .photo:hover img { transform: scale(1.03); }
  .colonnes { grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 40px; }
  .colonnes-acces { grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: start; max-width: 1000px; }
  .fin { padding: 0 56px 88px; }
  .fin .frise { margin: 0 -56px; height: 130px; }
  .fin-int { grid-template-columns: 180px 1fr; gap: 40px; padding-top: 48px; max-width: 900px; }
  .fin-portrait { width: 180px; }
  .pied { padding: 28px 56px 36px; display: flex; flex-wrap: wrap; gap: 4px 28px; }
  .pied p:last-child { margin-left: auto; }
}

@media (min-width: 1400px) {
  .ouverture, .consultations, .cabinet, .remboursement, .horaires { padding-left: 88px; padding-right: 88px; }
  .parcours .tete { padding: 0 88px; }
  .etapes { padding: 8px 88px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .frise img { clip-path: none; }
}
