/* ==========================================================================
   Conception OB2i. Protégé par la loi n° 2-00 (droits d'auteur).
   Reproduction interdite sans accord écrit d'OB2i. Réf. OB2I-SITES-ADOUL
   ==========================================================================
   STYLE.CSS — L'APPARENCE DU SITE
   Les deux couleurs principales viennent de js/config.js.
   Les propriétés "inline-start / inline-end" s'adaptent toutes seules
   au sens de lecture : gauche à droite en français, droite à gauche en arabe.
   ========================================================================== */

/* Carlito : police libre (licence SIL OFL, voir fonts/LICENCE-Carlito.txt),
   utilisée seulement quand Calibri n'est pas installée sur l'appareil. */
@font-face { font-family: "Carlito"; src: url("../fonts/carlito-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Carlito"; src: url("../fonts/carlito-bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Variables ---------- */
:root {
  --principale: #0f3d33;
  --accent: #b8924a;
  /* Nuances de secours pour les anciens navigateurs */
  --principale-fonce: #0c3129;
  --accent-fonce: #97783d;
  --accent-pale: #f5efe4;
  --accent-ombre: rgba(184, 146, 74, 0.35);
  --accent-halo: rgba(184, 146, 74, 0.28);
  --entete-fond: rgba(250, 248, 243, 0.94);
  --fond: #faf8f3;
  --fond-teinte: #f1ece1;
  --carte: #ffffff;
  --texte: #1f2a27;
  --texte-doux: #5b6663;
  --bordure: #e3dccd;
  --rayon: 14px;
  --ombre: 0 10px 30px rgba(15, 61, 51, 0.08);
  /* Police du site : Calibri. Sur les appareils qui ne l'ont pas (la plupart
     des téléphones), le site charge Carlito, une police libre de mêmes
     proportions, rangée dans le dossier fonts/. Rien n'est
     téléchargé depuis un autre site. */
  --police-texte: Calibri, "Carlito", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-titre: Calibri, "Carlito", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-arabe: Calibri, "Carlito", "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", Arial, sans-serif;
}

/* Sur les navigateurs récents, les nuances sont calculées à partir des
   deux couleurs de config.js : elles suivent donc vos changements. */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --principale-fonce: color-mix(in srgb, var(--principale) 80%, black);
    --accent-fonce: color-mix(in srgb, var(--accent) 82%, black);
    --accent-pale: color-mix(in srgb, var(--accent) 14%, white);
    --accent-ombre: color-mix(in srgb, var(--accent) 35%, transparent);
    --accent-halo: color-mix(in srgb, var(--accent) 28%, transparent);
    --entete-fond: color-mix(in srgb, var(--fond) 94%, transparent);
  }
}

/* En arabe, on change de police pour tout le site */
html[lang="ar"] {
  --police-texte: var(--police-arabe);
  --police-titre: var(--police-arabe);
}

/* Un élément marqué « hidden » ne s'affiche jamais, quel que soit son style */
[hidden] { display: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--police-texte);
  font-size: 18px;
  line-height: 1.7;
  color: var(--texte);
  background: var(--fond);
}

h1, h2, h3 {
  font-family: var(--police-titre);
  color: var(--principale);
  line-height: 1.2;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 600; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-weight: 700; line-height: 1.45; }
html[lang="ar"] h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
a { color: inherit; }

.conteneur { width: min(1140px, 100% - 40px); margin-inline: auto; }
.conteneur-etroit { width: min(780px, 100% - 40px); }

.surtitre {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-fonce);
  margin-bottom: 0.8em;
}
html[lang="ar"] .surtitre { letter-spacing: 0; font-size: 0.95rem; }
.surtitre-clair { color: var(--accent); }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8em 1.5em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.bouton:hover { transform: translateY(-2px); }
.bouton-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px var(--accent-ombre); }
.bouton-accent:hover { background: var(--accent-fonce); }
.bouton-contour { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.bouton-contour:hover { background: #fff; color: var(--principale); }
.bouton-sobre { background: transparent; border-color: var(--bordure); color: var(--principale); }
.bouton-sobre:hover { border-color: var(--principale); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--entete-fond);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.entete.defile { border-color: var(--bordure); box-shadow: 0 6px 24px rgba(15, 61, 51, 0.06); }

/* L'en-tête dispose d'un peu plus de largeur que le reste de la page */
.entete > .conteneur { width: min(1320px, 100% - 40px); }
.entete-contenu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.marque { display: flex; align-items: center; gap: 12px; flex: none; text-decoration: none; color: var(--principale); }
.marque-nom { white-space: nowrap; }
/* En mode compact, le nom peut passer sur deux lignes pour tenir sur un téléphone */
.entete-compacte .marque { flex: 1 1 auto; min-width: 0; }
.entete-compacte .marque-nom { white-space: normal; }
.marque-logo { width: 40px; height: 40px; color: var(--accent); flex: none; }
.marque-logo[hidden] { display: none; }
/* Le logo du cabinet (image) prend la place de l'emblème */
.marque-image { height: 48px; width: auto; max-width: 170px; object-fit: contain; flex: none; }
.marque-image[hidden] { display: none; }
.marque-texte { display: flex; flex-direction: column; line-height: 1.25; }
.marque-nom { font-family: var(--police-titre); font-size: 1.3rem; font-weight: 700; }
html[lang="ar"] .marque-nom { font-size: 1.15rem; }
.marque-metier { font-size: 0.72rem; color: var(--texte-doux); white-space: nowrap; }

.menu { display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.menu a {
  position: relative;
  padding: 6px 0;
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--texte);
}
.menu a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s;
}
.menu a:hover::after, .menu a.actif::after { transform: scaleX(1); }
.menu a.actif { color: var(--principale); }

/* Bouton du méga menu : même allure qu'un lien du menu */
.menu-bouton {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--texte);
  cursor: pointer;
}
.menu-bouton svg { width: 16px; height: 16px; transition: transform 0.25s; }
.menu-bouton[aria-expanded="true"] { color: var(--principale); }
.menu-bouton[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------- Méga menu ---------- */
.mega {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  padding-block: 30px 34px;
  background: var(--carte);
  border-top: 1px solid var(--bordure);
  border-bottom: 1px solid var(--bordure);
  box-shadow: 0 30px 50px rgba(15, 61, 51, 0.14);
  animation: mega-ouverture 0.22s ease;
}
.mega[hidden] { display: none; }
@keyframes mega-ouverture { from { opacity: 0; transform: translateY(-8px); } }
.mega-contenu { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.mega-actes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mega-acte {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  font: inherit;
  color: var(--texte);
  text-align: start;
  cursor: pointer;
  transition: background 0.2s;
}
.mega-acte:hover, .mega-acte:focus-visible { background: var(--fond-teinte); }
.mega-acte .icone { width: 40px; height: 40px; border-radius: 10px; }
.mega-acte .icone svg { width: 20px; height: 20px; }
.mega-acte strong { display: block; color: var(--principale); font-size: 0.95rem; }
.mega-acte small { display: block; margin-top: 2px; font-size: 0.8rem; line-height: 1.45; color: var(--texte-doux); }
.mega-avertissement { margin: 16px 0 0; padding-inline-start: 12px; font-size: 0.8rem; color: var(--texte-doux); }
.mega-aide {
  display: grid;
  gap: 10px;
  padding: 24px;
  border-radius: var(--rayon);
  background: var(--principale);
  color: rgba(255, 255, 255, 0.85);
}
.mega-aide h3 { margin: 0; color: #fff; }
.mega-aide p { margin: 0 0 6px; font-size: 0.9rem; }
.mega-aide a { font-size: 0.9rem; font-weight: 600; color: #fff; text-underline-offset: 4px; }

.entete-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }

.bouton-langue {
  padding: 0.5em 1em;
  border: 1.5px solid var(--bordure);
  border-radius: 999px;
  background: var(--carte);
  color: var(--principale);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.bouton-langue:hover { border-color: var(--accent); background: var(--fond-teinte); }
/* Le bouton affiche l'AUTRE langue : il utilise donc l'autre police */
html[lang="fr"] .bouton-langue { font-family: var(--police-arabe); }
html[lang="ar"] .bouton-langue { font-family: Calibri, "Carlito", "Segoe UI", system-ui, Arial, sans-serif; }

.burger { display: none; width: 44px; height: 44px; padding: 11px 9px; border: 0; background: none; cursor: pointer; }
.burger span { display: block; height: 2px; margin-bottom: 6px; background: var(--principale); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Accueil ---------- */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(ellipse at 85% 0%, var(--accent-halo), transparent 55%),
    linear-gradient(160deg, var(--principale), var(--principale-fonce));
  overflow: hidden;
}
/* Motif géométrique discret, inspiré du zellige */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2'%3E%3Crect x='22' y='22' width='36' height='36'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='7'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-contenu { position: relative; padding-block: clamp(70px, 12vw, 140px) clamp(100px, 14vw, 170px); }
/* Accueil avec photo de fond (config.js, « accueilPhoto ») */
.hero.hero-photo {
  background:
    linear-gradient(100deg, rgba(10, 38, 32, 0.95) 0%, rgba(10, 38, 32, 0.86) 42%, rgba(10, 38, 32, 0.45) 100%),
    var(--hero-image) center 35% / cover no-repeat;
}
html[dir="rtl"] .hero.hero-photo {
  background:
    linear-gradient(260deg, rgba(10, 38, 32, 0.95) 0%, rgba(10, 38, 32, 0.86) 42%, rgba(10, 38, 32, 0.45) 100%),
    var(--hero-image) center 35% / cover no-repeat;
}
.hero.hero-photo::before { opacity: 0.05; }
@media (max-width: 700px) {
  .hero.hero-photo, html[dir="rtl"] .hero.hero-photo {
    background:
      linear-gradient(180deg, rgba(10, 38, 32, 0.9), rgba(10, 38, 32, 0.92)),
      var(--hero-image) center / cover no-repeat;
  }
}
.hero h1 { color: #fff; max-width: 860px; }
.hero-numero { margin: -0.4em 0 1.2em; font-weight: 600; color: var(--accent); }
.hero-texte { font-size: 1.12rem; color: rgba(255, 255, 255, 0.86); max-width: 640px; }
.hero-boutons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2em; }

/* ---------- Atouts ---------- */
.atouts { position: relative; z-index: 2; margin-top: -46px; }
.atouts-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.atout {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}
.atout h3 { margin-bottom: 0.2em; font-size: 1.2rem; }
.atout p { margin: 0; font-size: 0.93rem; color: var(--texte-doux); }

.icone {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-pale);
  color: var(--accent-fonce);
}
.icone svg { width: 24px; height: 24px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 110px); }
.section-teintee { background: var(--fond-teinte); }
.section-tete { max-width: 680px; margin-bottom: 44px; }
.section-intro { color: var(--texte-doux); font-size: 1.05rem; }

/* ---------- Services ---------- */
.services-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service {
  padding: 30px 26px;
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.service:hover { transform: translateY(-6px); box-shadow: var(--ombre); border-color: var(--accent); }
.service .icone { margin-bottom: 18px; transition: background 0.3s, color 0.3s; }
.service:hover .icone { background: var(--principale); color: #fff; }
.service p { margin: 0; color: var(--texte-doux); font-size: 0.97rem; }

/* ---------- Présentation : photo de profil et parcours ---------- */
.profil-grille { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; }
.profil-grille.sans-photo { grid-template-columns: 1fr; max-width: 820px; }
.profil-photo { position: sticky; top: 100px; margin: 0; }
.profil-photo img { display: block; width: 100%; height: auto; border-radius: var(--rayon); box-shadow: var(--ombre); }
.profil-photo figcaption { display: grid; gap: 2px; margin-top: 14px; padding-inline-start: 14px; border-inline-start: 3px solid var(--accent); }
.profil-photo strong { font-family: var(--police-titre); font-size: 1.25rem; color: var(--principale); }
.profil-photo span { font-size: 0.88rem; color: var(--texte-doux); }
.profil-colonnes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-top: 28px; }
.profil-colonnes h3 { margin-bottom: 0.9em; }
/* Deux champs côte à côte (date et créneau du rendez-vous) */
.formulaire-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
@media (max-width: 520px) { .formulaire-duo { grid-template-columns: 1fr; } }
/* Photo d'une rubrique (config.js, « illustrations ») */
.illustration { margin-block: 44px 0; }
.illustration img { display: block; width: 100%; height: auto; max-height: 440px; object-fit: cover; object-position: center 30%; border-radius: var(--rayon); box-shadow: var(--ombre); }
.illustration figcaption { margin-top: 10px; font-size: 0.88rem; color: var(--texte-doux); text-align: center; }
/* Frise : une ligne verticale et un point par étape */
.frise { margin: 0; padding: 0; list-style: none; border-inline-start: 2px solid var(--bordure); }
.frise li { position: relative; padding: 0 0 20px; padding-inline-start: 22px; }
.frise li:last-child { padding-bottom: 0; }
.frise li::before {
  content: "";
  position: absolute;
  top: 7px;
  inset-inline-start: -7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--fond);
}
.frise-periode { display: block; font-size: 0.8rem; font-weight: 700; color: var(--accent-fonce); }
.frise-titre { display: block; font-weight: 600; color: var(--principale); }
.frise-detail { display: block; font-size: 0.93rem; color: var(--texte-doux); }

/* ---------- Parcours, domaines, mentions légales ---------- */
.texte-long p { font-size: 1.05rem; }
.domaines { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.domaines li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  font-weight: 500;
}
.domaines svg { width: 20px; height: 20px; flex: none; color: var(--accent-fonce); }
.mentions { margin: 0; display: grid; gap: 16px; }
.mentions dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-fonce); }
html[lang="ar"] .mentions dt { letter-spacing: 0; font-size: 0.9rem; }
.mentions dd { margin: 2px 0 0; }

/* ---------- Pièces à fournir ---------- */
.actes-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.acte {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  background: var(--carte);
  font: inherit;
  color: var(--texte);
  text-align: start;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.acte:hover { transform: translateY(-4px); box-shadow: var(--ombre); border-color: var(--accent); }
.acte strong { display: block; font-family: var(--police-titre); font-size: 1.2rem; color: var(--principale); }
.acte small { display: block; margin: 4px 0 10px; font-size: 0.9rem; color: var(--texte-doux); }
.acte em { font-style: normal; font-size: 0.85rem; font-weight: 600; color: var(--accent-fonce); }
.pieces-bas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: var(--rayon);
  background: var(--accent-pale);
}
.pieces-bas p { margin: 0; font-size: 0.93rem; }

/* Liste des pièces dans la fenêtre */
.liste-pieces { margin: 0 0 1.2em; padding: 0; list-style: none; display: grid; gap: 10px; }
.liste-pieces li { display: flex; gap: 12px; align-items: flex-start; }
.liste-pieces svg { flex: none; width: 20px; height: 20px; margin-top: 4px; color: var(--accent-fonce); }
.lecteur-avertissement { padding: 12px 14px; border-radius: 10px; background: var(--fond-teinte); font-size: 0.88rem; color: var(--texte-doux); }

/* Formulaire placé directement dans une fenêtre (sans cadre) */
.formulaire.formulaire-nu { padding: 0; border: 0; box-shadow: none; background: none; }

/* ---------- Le cabinet ---------- */
.cabinet-grille { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.cabinet-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cabinet-points li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-inline-start: 4px solid var(--accent);
  border-radius: 10px;
  font-weight: 500;
}
.cabinet-points svg { width: 22px; height: 22px; flex: none; color: var(--accent-fonce); }

/* ---------- Message de bienvenue ---------- */
.bienvenue {
  position: fixed;
  top: 92px;
  left: 50%;
  z-index: 90;
  width: min(560px, 100% - 32px);
  transform: translateX(-50%);
  padding: 18px 52px 18px 24px;
  border: 1px solid var(--accent);
  border-radius: var(--rayon);
  background: var(--principale);
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  animation: bienvenue-arrivee 0.5s ease-out;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.bienvenue.bienvenue-sortie { opacity: 0; transform: translate(-50%, -12px); }
.bienvenue-texte p { margin: 0; line-height: 1.45; font-weight: 700; }
.bienvenue-texte p[lang="fr"] { font-size: 1.12rem; }
.bienvenue-texte p[lang="ar"] { font-family: var(--police-arabe); font-size: 1.2rem; margin-top: 6px; }
.bienvenue-texte p[hidden] { display: none; }
.bienvenue-fermer {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
.bienvenue-fermer svg { width: 18px; height: 18px; }
.bienvenue-fermer:hover, .bienvenue-fermer:focus-visible { background: rgba(255, 255, 255, 0.25); }
@keyframes bienvenue-arrivee { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .bienvenue { animation: none; transition: none; } }
/* Petit écran : le message se place en bas, pour ne pas recouvrir l'en-tête */
@media (max-width: 600px) { .bienvenue { top: auto; bottom: 16px; } }
.choix-langue .bienvenue-texte { margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--bordure); color: var(--principale); }

/* ---------- Choix de la langue (première visite) ---------- */
.choix-langue {
  width: min(460px, 100% - 32px);
  padding: 44px 32px 40px;
  border: 0;
  border-radius: 20px;
  background: var(--carte);
  color: var(--texte);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.choix-langue::backdrop { background: rgba(12, 49, 41, 0.96); }
.choix-langue .marque-logo { width: 56px; height: 56px; margin: 0 auto 18px; display: block; }
.choix-langue .marque-logo[hidden] { display: none; }
.choix-langue .marque-image { height: 72px; max-width: 220px; margin: 0 auto 18px; display: block; }
.choix-langue .marque-image[hidden] { display: none; }
.choix-langue-titre { display: grid; gap: 6px; margin: 0 0 26px; font-size: 1.15rem; font-weight: 600; color: var(--principale); }
.choix-langue-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choix-langue-boutons .bouton { padding: 1em; font-size: 1.05rem; }
.choix-langue [lang="ar"] { font-family: var(--police-arabe); }
.choix-langue [lang="fr"] { font-family: Calibri, "Carlito", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; }

/* ---------- Galerie ---------- */
.galerie { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.photo {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--fond-teinte);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.photo:hover img, .photo:focus-visible img { transform: scale(1.06); }
.photo-legende {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
  color: #fff;
  font-family: var(--police-texte);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: start;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.photo:hover .photo-legende, .photo:focus-visible .photo-legende { opacity: 1; transform: none; }
/* Sur écran tactile, il n'y a pas de survol : la légende reste visible */
@media (hover: none) { .photo-legende { opacity: 1; transform: none; } }

/* ---------- Visionneuse (photo en grand) ---------- */
.visionneuse {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(10, 20, 17, 0.94);
  color: #fff;
}
.visionneuse[open] { display: grid; place-items: center; }
.visionneuse::backdrop { background: rgba(10, 20, 17, 0.94); }
.visionneuse-cadre { margin: 0; display: grid; justify-items: center; gap: 12px; }
.visionneuse-cadre img { max-width: min(92vw, 1400px); max-height: 80vh; border-radius: 8px; }
.visionneuse-cadre figcaption { font-size: 1rem; color: rgba(255, 255, 255, 0.9); text-align: center; }
.visionneuse-bouton {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.visionneuse-bouton:hover { background: rgba(255, 255, 255, 0.28); }
.visionneuse-bouton svg { width: 24px; height: 24px; }
.visionneuse-fermer { top: 16px; inset-inline-end: 16px; }
.visionneuse-fleche { top: 50%; margin-top: -24px; }
.visionneuse-precedente { inset-inline-start: 16px; }
.visionneuse-suivante { inset-inline-end: 16px; }
/* En arabe, les flèches changent de sens */
html[dir="rtl"] .visionneuse-fleche svg { transform: scaleX(-1); }

/* ---------- Publications ---------- */
.articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article {
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-top: 4px solid var(--accent);
  border-radius: var(--rayon);
  transition: transform 0.3s, box-shadow 0.3s;
}
.article:hover { transform: translateY(-5px); box-shadow: var(--ombre); }
.article-date { margin: 0 0 0.6em; font-size: 0.82rem; font-weight: 600; color: var(--accent-fonce); }
.article p { color: var(--texte-doux); font-size: 0.97rem; }
.article .bouton { align-self: flex-start; margin-top: auto; padding: 0.6em 1.2em; font-size: 0.88rem; }

/* Lecteur d'article */
.lecteur {
  width: min(760px, 100% - 32px);
  max-height: 86vh;
  padding: clamp(26px, 5vw, 48px);
  border: 0;
  border-radius: var(--rayon);
  background: var(--carte);
  color: var(--texte);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.lecteur::backdrop { background: rgba(10, 20, 17, 0.7); }
.lecteur-fermer {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--fond-teinte);
  color: var(--principale);
  cursor: pointer;
}
.lecteur-fermer svg { width: 20px; height: 20px; }
.lecteur h2 { font-size: clamp(1.5rem, 3vw, 2rem); padding-inline-end: 40px; }
.lecteur-liens { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.4em; }

/* ---------- Avis ---------- */
.avis-grille { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.etoiles { color: var(--accent); letter-spacing: 2px; font-size: 1.1rem; font-family: "Segoe UI Symbol", "Apple Symbols", sans-serif; }
.avis-resume { display: flex; align-items: center; gap: 16px; margin: 22px 0; }
.avis-resume[hidden] { display: none; }
.avis-moyenne { font-family: var(--police-titre); font-size: 3rem; font-weight: 700; line-height: 1; color: var(--principale); }
.avis-resume p { margin: 0; font-size: 0.9rem; color: var(--texte-doux); }
.avis-vide { margin-top: 22px; padding: 20px 22px; background: var(--carte); border: 1px dashed var(--bordure); border-radius: 12px; color: var(--texte-doux); }
.avis-liste { display: grid; gap: 14px; }
.avis-carte { padding: 20px 22px; background: var(--carte); border: 1px solid var(--bordure); border-radius: 12px; }
.avis-carte p { margin: 8px 0; }
.avis-entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.avis-auteur { font-weight: 600; color: var(--principale); }
.avis-date { font-size: 0.82rem; color: var(--texte-doux); }
.formulaire h3 { margin: 0; }
.champ-note { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 600; color: var(--principale); }
.etoiles-choix { display: flex; gap: 4px; }
.etoile {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #cfc6b4;
  font-size: 2rem;
  line-height: 1;
  font-family: "Segoe UI Symbol", "Apple Symbols", sans-serif;
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
}
.etoile:hover { transform: scale(1.15); }
.etoile.active { color: var(--accent); }

/* ---------- Démarche ---------- */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: etape; }
.etape { position: relative; padding-top: 22px; border-top: 2px solid var(--bordure); counter-increment: etape; }
.etape::before {
  content: counter(etape);
  position: absolute;
  top: -19px;
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--principale);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}
.etape h3 { margin-top: 0.7em; }
.etape p { margin: 0; color: var(--texte-doux); font-size: 0.96rem; }

/* ---------- Questions ---------- */
.faq { display: grid; gap: 12px; }
.rdv-bloc { margin: 28px 0; padding: 22px 24px; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--fond-teinte); }
.rdv-bloc h3 { margin: 0 0 6px; }
.rdv-bloc p { margin: 0 0 16px; }
.question-liste { margin: 0; padding-inline-start: 1.2em; }
.question-liste li { margin: 0.25em 0; line-height: 1.55; }
.question { background: var(--carte); border: 1px solid var(--bordure); border-radius: 12px; overflow: hidden; }
.question-titre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 22px;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--principale);
  text-align: start;
  cursor: pointer;
}
.question-signe { position: relative; flex: none; width: 16px; height: 16px; }
.question-signe::before, .question-signe::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--accent-fonce);
  transition: transform 0.3s;
}
.question-signe::after { transform: rotate(90deg); }
.question.ouverte .question-signe::after { transform: rotate(0deg); }
.question-reponse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
.question.ouverte .question-reponse { grid-template-rows: 1fr; }
.question-reponse > div { overflow: hidden; }
.question-reponse p { margin: 0; padding: 0 22px 20px; color: var(--texte-doux); }

/* ---------- Contact ---------- */
.contact-grille { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.coordonnees { display: grid; gap: 18px; margin: 30px 0 0; }
/* Plan de situation */
.plan { margin-top: 30px; padding: 22px; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--carte); }
.plan h3 { margin-bottom: 0.4em; }
.plan-gps { margin-bottom: 14px; font-size: 0.95rem; color: var(--texte-doux); }
.plan-gps span[dir="ltr"] { font-weight: 600; color: var(--texte); unicode-bidi: isolate; }
.plan-carte { margin-bottom: 14px; border-radius: 10px; overflow: hidden; border: 1px solid var(--bordure); }
.plan-carte iframe { display: block; width: 100%; height: 320px; border: 0; }
.plan .formulaire-note { margin-top: 12px; }

/* Sans formulaire, les coordonnées occupent toute la largeur, sur deux colonnes */
.contact-grille.sans-formulaire { grid-template-columns: 1fr; }
.contact-grille.sans-formulaire .coordonnees { grid-template-columns: repeat(2, 1fr); }
.coordonnees dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-fonce); }
html[lang="ar"] .coordonnees dt { letter-spacing: 0; font-size: 0.9rem; }
.coordonnees dd { margin: 2px 0 0; font-size: 1.05rem; }
.coordonnees a { text-decoration: none; border-bottom: 1px solid var(--bordure); unicode-bidi: plaintext; }
.coordonnees a:hover { border-color: var(--accent); }
/* Deux numéros de téléphone : l'un sous l'autre */
#lien-telephone, #lien-telephone-2 { display: table; }
#lien-telephone-2 { margin-top: 4px; }

.formulaire {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 36px);
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}
.formulaire label { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 600; color: var(--principale); }
.formulaire input, .formulaire select, .formulaire textarea {
  width: 100%;
  padding: 0.8em 1em;
  border: 1.5px solid var(--bordure);
  border-radius: 10px;
  background: var(--fond);
  font: inherit;
  font-weight: 400;
  color: var(--texte);
  transition: border-color 0.2s, background 0.2s;
}
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.formulaire input[dir="ltr"] { text-align: start; }
.formulaire textarea { resize: vertical; }
.formulaire-boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.formulaire-erreur { margin: 0; padding: 10px 14px; border-radius: 8px; background: #fbeaea; color: #9a2b2b; font-size: 0.92rem; }
.formulaire-note { margin: 0; font-size: 0.82rem; color: var(--texte-doux); }

/* ---------- Pied de page ---------- */
.pied { padding-block: 40px; background: var(--principale-fonce); color: rgba(255, 255, 255, 0.78); font-size: 0.92rem; }
.pied p { margin: 0; }
.pied-contenu { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.pied-nom { font-family: var(--police-titre); font-size: 1.4rem; font-weight: 700; color: #fff; }
.pied-droite { max-width: 520px; text-align: end; }
.pied-ordre { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.pied-ordre img { width: 56px; height: 56px; border-radius: 50%; flex: none; background: #fff; }
.pied-ordre p { font-size: 0.85rem; opacity: 0.9; }
.pied-mention { margin-top: 6px !important; font-size: 0.82rem; opacity: 0.75; }
.pied-liens { margin-top: 8px !important; font-size: 0.85rem; }
.pied-liens a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Bouton WhatsApp ---------- */
.whatsapp {
  position: fixed;
  bottom: 22px;
  inset-inline-end: 22px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1faf54;
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 175, 84, 0.4);
  transition: transform 0.2s;
}
.whatsapp:hover { transform: scale(1.08); }
.whatsapp svg { width: 28px; height: 28px; }

/* ---------- Bandeaux d'alerte (coordonnées provisoires, erreur) ---------- */
.alerte { margin: 0; padding: 10px 20px; font-size: 0.9rem; font-weight: 600; text-align: center; }
.alerte-attention { background: #fff3cd; color: #6b4e00; border-bottom: 1px solid #e6cf85; }
.alerte-erreur { background: #fbeaea; color: #8f2323; border-bottom: 1px solid #e3b4b4; }

/* ---------- Page de vérification (verification.html) ---------- */
.verif-page { padding-block: 48px 64px; }
.verif-titre { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.verif code { padding: 2px 6px; border-radius: 6px; background: var(--fond-teinte); font-size: 0.92em; }
.verif-bilan { margin: 24px 0; padding: 18px 22px; border-radius: var(--rayon); border: 1px solid var(--bordure); background: var(--carte); font-weight: 600; }
.verif-bilan.verif-ok { background: #e8f5ec; border-color: #b7dcc2; color: #1d5a33; }
.verif-bilan.verif-attention { background: #fff3cd; border-color: #e6cf85; color: #6b4e00; }
.verif-bilan.verif-erreur { background: #fbeaea; border-color: #e3b4b4; color: #8f2323; }
.verif-groupe { margin: 34px 0 12px; font-size: 1.35rem; }
.verif-liste { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.verif-ligne { display: flex; gap: 14px; align-items: flex-start; padding: 12px 16px; border: 1px solid var(--bordure); border-radius: 10px; background: var(--carte); }
.verif-ligne p { margin: 4px 0 0; font-size: 0.9rem; color: var(--texte-doux); overflow-wrap: anywhere; }
.verif-etiquette { flex: none; min-width: 74px; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; text-align: center; }
.verif-ligne.verif-ok .verif-etiquette { background: #e8f5ec; color: #1d5a33; }
.verif-ligne.verif-attention .verif-etiquette { background: #fff3cd; color: #6b4e00; }
.verif-ligne.verif-erreur .verif-etiquette { background: #fbeaea; color: #8f2323; }
.verif-ligne.verif-erreur { border-color: #e3b4b4; }

/* ---------- Animation d'apparition au défilement ---------- */
/* La classe "js" est ajoutée par main.js : si le script ne se charge pas,
   rien n'est masqué et le contenu reste lisible. */
.js .reveler { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveler.visible { opacity: 1; transform: none; }

/* Respecte le réglage « réduire les animations » du système */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveler { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- En-tête compact : menu à trois barres ---------- */
/* main.js mesure l'en-tête : dès que le menu complet ne tient plus sur une
   ligne (écran étroit, menu long, autre langue), il ajoute la classe
   « entete-compacte » et le menu passe derrière le bouton à trois barres. */
.entete-compacte .burger { display: block; }
.entete-compacte .bouton-rdv { display: none; }
.entete-compacte .menu {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 8px 20px 18px;
  background: var(--fond);
  border-bottom: 1px solid var(--bordure);
  box-shadow: 0 20px 30px rgba(15, 61, 51, 0.08);
  white-space: normal;
  display: none;
}
.entete-compacte .menu.ouvert { display: flex; }
.entete-compacte .menu a, .entete-compacte .menu-bouton { padding: 13px 0; border-bottom: 1px solid var(--bordure); }
.entete-compacte .menu a::after { display: none; }
.entete-compacte .menu-bouton { justify-content: space-between; width: 100%; font-size: 0.93rem; }
.entete-compacte .menu-bouton svg { transform: rotate(-90deg); }
html[dir="rtl"].entete-compacte .menu-bouton svg { transform: rotate(90deg); }
.entete-compacte .mega { display: none; }

/* ---------- Tablette ---------- */
@media (max-width: 1080px) {
  .actes-grille { grid-template-columns: repeat(2, 1fr); }
  .services-grille { grid-template-columns: repeat(2, 1fr); }
  .galerie { grid-template-columns: repeat(3, 1fr); }
  .articles { grid-template-columns: repeat(2, 1fr); }
  .avis-grille { grid-template-columns: 1fr; gap: 36px; }
  .etapes { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .cabinet-grille, .contact-grille { grid-template-columns: 1fr; gap: 36px; }
  .profil-grille { grid-template-columns: 240px 1fr; gap: 36px; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .marque-metier { display: none; }
  .atouts-grille, .services-grille, .etapes, .articles, .actes-grille, .domaines { grid-template-columns: 1fr; }
  .profil-grille, .profil-colonnes { grid-template-columns: 1fr; }
  .profil-photo { position: static; max-width: 260px; }
  .contact-grille.sans-formulaire .coordonnees { grid-template-columns: 1fr; }
  .atouts { margin-top: -30px; }
  .galerie { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .photo-legende { font-size: 0.78rem; padding: 22px 10px 8px; }
  .visionneuse-fleche { top: auto; bottom: 16px; }
  .pied-droite { text-align: start; }
  .formulaire-boutons .bouton { width: 100%; }
}

/* ---------- Barre d'accès rapide (téléphone) ---------- */
.barre-mobile { display: none; }
@media (max-width: 760px) {
  .barre-mobile:not([hidden]) {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 45;
    display: flex;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--principale); box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.18);
  }
  .barre-mobile a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 4px; border-radius: 10px;
    color: #fff; font-size: 0.78rem; font-weight: 600; text-decoration: none;
  }
  .barre-mobile a[hidden] { display: none; }
  .barre-mobile a.barre-rdv { background: var(--accent); color: #fff; }
  .barre-mobile svg { width: 22px; height: 22px; }
  body.avec-barre-mobile { padding-bottom: 72px; }
  body.avec-barre-mobile .bienvenue { bottom: 84px; }
  body.avec-barre-mobile .whatsapp { bottom: 88px; }
}

/* Signature OB2i (ne pas retirer) */
.ob2i-signature { display: none; }
.alerte-copie { font-size: 0.95rem; }
.alerte-copie span { display: block; }

/* Case d'acceptation de l'envoi des informations (loi 09-08) */
.formulaire label.consentement { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 0.86rem; line-height: 1.5; color: var(--texte); cursor: pointer; }
.formulaire label.consentement input { width: 20px; height: 20px; min-width: 20px; margin: 2px 0 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
