/* ============================================
   DENTAL OPUS — Système de design v4
   Vert profond #2E3B2E · Bronze #B8874E · Blanc cassé #F7F6F1
   Grands aplats colorés retirés — couleur en accent uniquement.
   Polices système — aucune requête externe.
   ============================================ */

:root {
  --identite: #2E3B2E;          /* couleur d'identité — actuellement vert profond */
  --identite-claire: #465245;
  --bronze: #B8874E;           /* accent décoratif uniquement — filets, puces, survols */
  --bronze-texte: #7a5a2e;     /* variante assombrie — seule autorisée pour du texte (contraste AA sur crème) */
  --creme: #F7F6F1;
  --creme-warm: #EFEDE6;
  --texte: #1E241E;
  --texte-doux: #55584f;       /* neutre chaud, contraste AA sur crème */
  --blanc: #ffffff;

  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --marge: clamp(1.25rem, 5vw, 6rem);
  --largeur-max: 1180px;
  --largeur-texte: 62ch;
}

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

body {
  margin: 0;
  background: var(--creme);
  color: var(--texte);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--identite);
  line-height: 1.16;
  margin: 0 0 0.55em 0;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); max-width: 780px; }
h2 { font-size: clamp(1.6rem, 3.1vw, 2.3rem); max-width: 640px; }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.4rem); }
p, li { max-width: var(--largeur-texte); }
p { margin: 0 0 1.1em 0; }
a { color: inherit; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--bronze-texte);
  font-weight: 700;
  display: block;
  margin-bottom: 0.9em;
}

img { max-width: 100%; display: block; }

/* --- Lien d'évitement (accessibilité clavier) --- */
.lien-evitement {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--identite);
  color: var(--creme);
  padding: 0.8rem 1.3rem;
  z-index: 1000;
  border-radius: 0 0 4px 0;
  text-decoration: none;
  font-weight: 600;
}
.lien-evitement:focus {
  left: 0;
}

/* --- Focus visible clavier --- */
:focus-visible {
  outline: 3px solid var(--bronze);
  outline-offset: 2px;
}
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--bronze);
  outline-offset: 2px;
}

.conteneur { max-width: var(--largeur-max); margin: 0 auto; padding: 0 var(--marge); }
section { padding: clamp(3rem, 7vw, 6rem) 0; }
.filet { width: 44px; height: 2px; background: var(--bronze); border: none; margin: 1.5rem 0; }

/* --- Header / Navigation --- */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: var(--creme);
  border-bottom: 1px solid rgba(79, 17, 39, 0.1);
}
.nav-barre {
  max-width: var(--largeur-max); margin: 0 auto;
  padding: 1rem var(--marge);
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--identite);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo small {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bronze-texte);
  font-weight: 600;
}
nav.principale { display: flex; align-items: center; gap: 1.8rem; }
nav.principale a:not(.bouton) {
  text-decoration: none; font-size: 0.92rem; color: var(--texte);
  font-weight: 500; position: relative; padding: 0.3rem 0.1rem;
}
nav.principale a:hover, nav.principale a.actif { color: var(--identite); }
nav.principale a.actif::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--bronze);
}
.menu-mobile-btn {
  display: none; background: none; border: none; cursor: pointer; padding: 0.5rem;
  position: relative; z-index: 110;
}
.menu-mobile-btn span {
  display: block; width: 22px; height: 2px; background: var(--identite); margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-mobile-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-mobile-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-mobile-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Boutons --- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--sans); font-weight: 600; font-size: 0.94rem;
  text-decoration: none; padding: 0.95rem 1.7rem; min-height: 48px;
  border-radius: 3px; transition: all 0.2s ease; border: 1px solid var(--identite);
  cursor: pointer;
  /* Marge basse systématique : un bouton est très souvent suivi d'une photo ou
     d'un autre bloc juste en dessous (bloc-visuel, section suivante...). Sans
     cette marge sur le composant lui-même, l'espacement dépend entièrement du
     contexte qui l'entoure et se retrouve oublié à chaque nouvel emplacement. */
  margin-bottom: 1rem;
}
.bouton-plein { background: var(--identite); color: var(--creme); }
.bouton-plein:hover { background: var(--identite-claire); }
.bouton-contour { background: transparent; color: var(--identite); }
.bouton-contour:hover { background: rgba(79,17,39,0.06); }
.bouton[disabled] { opacity: 0.6; cursor: not-allowed; }
/* Exceptions : boutons alignés horizontalement au centre d'une barre (nav du
   header, barre CTA fixe mobile) — la marge basse y décalerait l'alignement
   vertical au lieu d'espacer du contenu suivant. */
nav.principale .bouton, .cta-mobile-fixe .bouton { margin-bottom: 0; }

/* --- Hero (repensé : plus architectural, moins "vide") --- */
.hero {
  padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid rgba(79,17,39,0.1);
}
.hero .conteneur {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}
.hero-texte .eyebrow { margin-bottom: 1.1em; }
.badge-ouverture {
  display: inline-block; background: var(--identite); color: var(--creme);
  font-family: var(--sans); font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0.03em; padding: 0.5rem 1rem; border-radius: 3px;
  margin-bottom: 1.2em;
}
.hero h1 { max-width: 10ch; margin-bottom: 0.25em; }
.hero .signature {
  font-family: var(--serif); font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  color: var(--texte-doux); margin: 0 0 0.7em 0; max-width: 30ch;
}
.hero .intro { font-size: 1.02rem; max-width: 40ch; color: var(--texte-doux); }
.hero .cta-groupe { margin-top: 1.8rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-visuel { align-self: stretch; }
.hero-visuel .photo-reelle { aspect-ratio: 16/10; min-height: 220px; }

/* --- Photos --- */
.photo-reelle { border-radius: 3px; overflow: hidden; aspect-ratio: 4/3; }
.photo-reelle img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-reelle.ratio-large { aspect-ratio: 16/9; }
.photo-reelle.ratio-portrait { aspect-ratio: 3/4; }
.photo-reelle.ratio-carre { aspect-ratio: 1/1; }

/* --- Rythme éditorial : variantes de section pour casser la répétition --- */
.section-texte-seul { max-width: var(--largeur-texte); }
/* .section-texte-large n'impose plus de largeur : le titre (h1/h2) et les
   paragraphes (p) gèrent désormais chacun leur propre largeur de lecture
   confortable, indépendamment l'un de l'autre. */

.section-decalee .conteneur {
  display: grid; grid-template-columns: 0.9fr 1.3fr; gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.section-decalee.inverse .conteneur { grid-template-columns: 1.3fr 0.9fr; }
.section-decalee.inverse .bloc-texte { order: 2; }
.section-decalee.inverse .bloc-visuel { order: 1; }

.section-pleine-largeur { max-width: none; }

/* --- Grille des soins : liste éditoriale plutôt que cartes catalogue --- */
.liste-soins { margin-top: 2.2rem; border-top: 1px solid rgba(79,17,39,0.14); }
.item-soin {
  display: grid; grid-template-columns: 2.5rem 1fr auto;
  gap: 1.2rem; align-items: baseline;
  padding: 1.4rem 0; border-bottom: 1px solid rgba(79,17,39,0.14);
}
.item-soin .numero { font-family: var(--serif); color: var(--bronze-texte); font-size: 1rem; }
.item-soin h3 { margin-bottom: 0.25em; }
.item-soin p { margin-bottom: 0; font-size: 0.95rem; color: var(--texte-doux); }
.item-soin a.lien-discret {
  font-size: 0.86rem; font-weight: 600; color: var(--identite); text-decoration: none;
  border-bottom: 1px solid var(--bronze); padding-bottom: 2px; white-space: nowrap;
}

/* --- Équipement / technologie --- */
.grille-technologie {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.6rem;
  margin-top: 2.4rem;
}
.carte-techno { max-width: 320px; }
.icone-techno {
  width: 48px; height: 48px;
  color: var(--identite);
  margin-bottom: 1.1rem;
}
.carte-techno h3 { margin-bottom: 0.4em; }
.carte-techno p { font-size: 0.93rem; color: var(--texte-doux); margin-bottom: 0; }

/* --- Équipe --- */
.grille-equipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.4rem; margin-top: 2.2rem; }
.carte-praticien h3 { margin-top: 1.1rem; margin-bottom: 0.15em; }
.carte-praticien .role { color: var(--bronze-texte); font-size: 0.84rem; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 0.7em; display: block; }
.carte-praticien .lien-profil { color: var(--identite); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--bronze); }

/* --- Section teintée --- */
.section-teintee { background: var(--blanc); border-top: 1px solid rgba(0,0,0,0.07); border-bottom: 1px solid rgba(0,0,0,0.07); }
.section-teintee h2 { color: var(--identite); }
.section-teintee .eyebrow { color: var(--bronze-texte); }
.section-teintee p { color: var(--texte-doux); }
.section-teintee .bouton-contour { border-color: var(--identite); color: var(--identite); }
.section-teintee .bouton-contour:hover { background: rgba(46,59,46,0.06); }

/* --- Formulaire --- */
form.contact-form { display: grid; gap: 1.4rem; max-width: 640px; margin-top: 1.8rem; }
.ligne-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--identite); margin-bottom: 0.45rem; }
.label-optionnel { font-weight: 400; color: var(--texte-doux); }
input, select, textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; padding: 0.85rem 1rem;
  border: 1px solid rgba(79,17,39,0.3); border-radius: 3px; background: var(--blanc); color: var(--texte);
}
input:invalid, select:invalid { box-shadow: none; } /* on gère nous-mêmes l'affichage d'erreur */
fieldset { border: none; padding: 0; margin: 0; }
legend { font-size: 0.85rem; font-weight: 600; color: var(--identite); padding: 0; margin-bottom: 0.6rem; }
.radio-groupe { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.radio-groupe label {
  font-weight: 500; color: var(--texte); border: 1px solid rgba(79,17,39,0.3); border-radius: 20px;
  padding: 0.6rem 1.1rem; cursor: pointer; margin: 0; font-size: 0.9rem; transition: all 0.15s;
  min-height: 44px; display: inline-flex; align-items: center;
}
.radio-groupe input {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0);
}
.radio-groupe input:focus-visible + label,
.radio-groupe label:has(input:focus-visible) { outline: 3px solid var(--bronze); outline-offset: 2px; }
.radio-groupe input:checked + label { background: var(--identite); color: var(--creme); border-color: var(--identite); }
.champ-note { font-size: 0.82rem; color: var(--texte-doux); margin-top: 0.6rem; }
.champ-erreur {
  font-size: 0.85rem; color: #6b2626; margin-top: 0.4rem; font-weight: 600;
}
.champ-invalide input, .champ-invalide select, .champ-invalide textarea {
  border-color: #a33; background: #fdf3f3;
}
.resume-erreurs {
  background: #f6e6e6; border: 1px solid #e0b7b7; color: #6b2626;
  padding: 1.1rem 1.3rem; border-radius: 3px; margin-bottom: 1.6rem;
}
.resume-erreurs a { color: #6b2626; text-decoration: underline; }
.message-etat { padding: 1rem 1.3rem; border-radius: 3px; margin-bottom: 1.5rem; font-size: 0.95rem; }
.message-etat.succes { background: #e8f0e6; color: #2f5233; border: 1px solid #b7d0b2; }
.message-etat.erreur { background: #f6e6e6; color: #6b2626; border: 1px solid #e0b7b7; }
.encart-urgence {
  background: var(--creme-warm); border-left: 3px solid var(--bronze);
  padding: 1rem 1.3rem; font-size: 0.92rem; margin: 1.6rem 0; color: var(--texte-doux);
}

/* --- Infos pratiques --- */
.grille-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.2rem; margin-top: 2rem; }
.bloc-info .eyebrow { margin-bottom: 0.5em; }
.avis-preouverture {
  background: var(--creme-warm); border: 1px solid rgba(79,17,39,0.12); border-radius: 4px;
  padding: 1.6rem 1.8rem; margin-top: 2rem;
}

/* --- Footer --- */
footer.site { background: var(--creme-warm); border-top: 1px solid rgba(79,17,39,0.1); padding: 2.8rem 0 2rem; margin-top: 3rem; }
.footer-grille { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer-grille h4 { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--bronze-texte); margin-bottom: 1em; font-family: var(--sans); }
.footer-grille a { display: block; text-decoration: none; color: var(--texte-doux); font-size: 0.92rem; margin-bottom: 0.5em; }
.footer-grille a:hover { color: var(--identite); }
.footer-bas {
  border-top: 1px solid rgba(79,17,39,0.1); padding-top: 1.3rem; font-size: 0.8rem; color: var(--texte-doux);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.footer-bas a { color: var(--texte-doux); }

/* --- Barre CTA mobile fixe --- */
.cta-mobile-fixe {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--creme); border-top: 1px solid rgba(79,17,39,0.14);
  padding: 0.7rem var(--marge); padding-bottom: max(0.7rem, env(safe-area-inset-bottom));
}
.cta-mobile-fixe a { width: 100%; text-align: center; }
/* Masquée tant que le premier bouton "contact" de la page est déjà visible à l'écran —
   évite d'afficher deux boutons identiques en même temps en haut de page. Sans JS, elle
   reste visible en permanence (comportement de base, toujours utilisable). */
html.js .cta-mobile-fixe { opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
html.js .cta-mobile-fixe.visible { opacity: 1; pointer-events: auto; }
/* Le menu plein écran contient déjà son propre bouton de contact : la barre fixe ne
   doit jamais s'afficher par-dessus tant qu'il est ouvert. */
body.menu-ouvert .cta-mobile-fixe { display: none !important; }

/* --- Reveal au scroll : AMÉLIORATION PROGRESSIVE.
   Par défaut (pas de JS) : tout est visible. Un petit script inline dans
   <head> ajoute la classe "js" sur <html> seulement si JS s'exécute ;
   c'est CETTE classe qui active l'état masqué initial. --- */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Responsive : mobile-first, points de rupture explicites --- */
@media (max-width: 860px) {
  nav.principale { display: none; }
  .menu-mobile-btn { display: block; }
  nav.principale.ouvert {
    display: flex; position: fixed; inset: 0; z-index: 90; background: var(--creme);
    flex-direction: column; align-items: stretch; padding: 5.5rem var(--marge) 1.6rem; gap: 0.9rem;
    overflow-y: auto;
  }
  nav.principale.ouvert a:not(.bouton) { padding: 0.6rem 0; }
  .hero .conteneur { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .hero-visuel { order: -1; }
  .hero-visuel .photo-reelle { min-height: 200px; aspect-ratio: 16/10; }
  .section-decalee .conteneur, .section-decalee.inverse .conteneur { grid-template-columns: 1fr; gap: 1rem 0; }
  .section-decalee .bloc-visuel, .section-decalee.inverse .bloc-visuel { margin-top: 1.5rem; }
  .section-decalee.inverse .bloc-texte, .section-decalee.inverse .bloc-visuel { order: initial; }
  .footer-grille { grid-template-columns: 1fr; gap: 1.6rem; }
  .ligne-champs { grid-template-columns: 1fr; }
  .item-soin { grid-template-columns: 2rem 1fr; }
  .item-soin a.lien-discret { grid-column: 2; }
  .cta-mobile-fixe { display: flex; }
  body { padding-bottom: 4.4rem; }
  .hero .cta-groupe .bouton { width: 100%; }
}
@media (min-width: 861px) {
  .cta-mobile-fixe { display: none !important; }
}

/* --- Comparateur avant / après (curseur glissant) --- */
.comparateur-av {
  position: relative; max-width: 560px; margin: 0 auto;
  aspect-ratio: 4/3; border-radius: 3px; overflow: hidden;
  background: var(--creme-warm); user-select: none;
}
.comparateur-av .comparateur-face {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--creme-warm);
}
.comparateur-av .comparateur-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comparateur-av .comparateur-face-avant { clip-path: inset(0 50% 0 0); }
.comparateur-av .comparateur-placeholder {
  color: var(--texte-doux); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  text-align: center; padding: 0 1rem;
}
.comparateur-av .comparateur-legende {
  position: absolute; top: 0.7rem; z-index: 2;
  background: rgba(255,255,255,0.9); color: var(--identite);
  padding: 0.3rem 0.7rem; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; border-radius: 2px;
}
.comparateur-av .comparateur-legende-avant { left: 0.7rem; }
.comparateur-av .comparateur-legende-apres { right: 0.7rem; }
.comparateur-av .comparateur-ligne {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: var(--blanc); transform: translateX(-50%); pointer-events: none; z-index: 1;
}
.comparateur-av .comparateur-poignee {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--blanc);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25); pointer-events: none; z-index: 1;
  font-size: 0.9rem; color: var(--identite);
}
.comparateur-av input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; z-index: 2;
}

/* --- Ligne du temps (étapes d'un traitement) --- */
.ligne-temps { display: flex; margin: 2.6rem 0 1rem; }
.etape-temps { flex: 1; position: relative; padding: 0 0.9rem; text-align: center; }
.etape-temps::before {
  content: ''; position: absolute; top: 1.3rem; left: -50%; width: 100%; height: 2px;
  background: var(--bronze); z-index: 1;
}
.etape-temps:first-child::before { display: none; }
.etape-numero {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--identite);
  color: var(--creme); display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 700; font-size: 1.05rem;
  margin: 0 auto 1rem; position: relative; z-index: 2;
}
.etape-texte h3 { font-family: var(--sans); font-size: 0.9rem; font-weight: 700; color: var(--identite); margin-bottom: 0.35em; }
.etape-texte p { font-size: 0.8rem; color: var(--texte-doux); line-height: 1.45; margin: 0; }

@media (max-width: 860px) {
  .ligne-temps { flex-direction: column; gap: 1.7rem; margin: 2rem 0 0.5rem; }
  .etape-temps { text-align: left; padding: 0 0 0 3.5rem; }
  .etape-numero { position: absolute; left: 0; top: 0; margin: 0; }
  .etape-temps::before { display: none; }
  .etape-temps:not(:last-child)::after {
    content: ''; position: absolute; left: 1.3rem; top: 2.9rem;
    width: 2px; height: calc(100% + 1.7rem - 1.3rem); background: var(--bronze);
  }
}
