:root {
  --primary: #4c6b5c;
  --primary-dark: #2f493d;
  --accent: #f2f7f4;
  --soft: #fafcfb;
  --text: #2d2d2d;
  --gray: #5a5a5a;
  --border: #e1e1e1;
  --white: #fff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid #e0a94a; outline-offset: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; background: var(--white); padding: 8px 12px; z-index: 1000; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

/* En-tête */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: var(--primary-dark);
  padding: 10px 0;
}
.menu { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 24px; }
.logo { line-height: 0; }
.logo img { height: 50px; width: auto; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; }
.nav a { color: #e6efe9; text-decoration: none; font-size: 15px; padding: 4px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); text-decoration: underline; text-underline-offset: 5px; }
.nav a.nav-cta { background: var(--white); color: var(--primary-dark); padding: 8px 14px; border-radius: 6px; font-weight: bold; text-decoration: none; }
.nav a.nav-cta:hover { background: var(--accent); }

/* Titres et sections */
h1, h2, h3 { color: var(--primary-dark); line-height: 1.25; }
h1 { font-size: 36px; margin-bottom: 14px; }
h2 { font-size: 27px; margin-bottom: 16px; }
h3 { font-size: 20px; margin-bottom: 10px; }
section { padding: 52px 0; }
section.alt { background: var(--soft); border-top: 1px solid #eef1ef; border-bottom: 1px solid #eef1ef; }
p { margin-bottom: 14px; }
ul { padding-left: 22px; margin: 10px 0 16px; }
li { margin-bottom: 4px; }
.lead { font-size: 19px; color: var(--gray); }
.cols { columns: 2 260px; column-gap: 40px; }
.cols li { break-inside: avoid; }

/* Bandeau de page */
.page-hero { background: var(--accent); padding: 46px 0 40px; }
.page-hero p { max-width: 760px; color: var(--gray); font-size: 18px; margin-bottom: 0; }
.breadcrumb { font-size: 14px; color: var(--gray); margin-bottom: 8px; }
.breadcrumb a { color: var(--gray); }

/* Accueil */
.hero { background: var(--accent); padding: 60px 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; }
.hero .subtitle { font-size: 21px; color: var(--primary); margin-bottom: 16px; }
.hero p { font-size: 18px; color: var(--gray); }
.hours { font-weight: bold; color: var(--primary-dark) !important; font-size: 16px !important; }
.photo { border-radius: 12px; box-shadow: 0 10px 30px rgba(47, 73, 61, .18); }
figure figcaption { font-size: 13px; color: var(--gray); margin-top: 8px; text-align: center; }

.trust { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 30px 0 0; padding: 0; font-size: 14px; color: var(--gray); }
.trust li { background: var(--white); border: 1px solid var(--border); padding: 6px 12px; border-radius: 20px; margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: 44px; align-items: start; }
.split.reverse { grid-template-columns: 1.6fr 1fr; }

/* Boutons */
.buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn { display: inline-block; background: var(--primary); color: var(--white); padding: 12px 22px; text-decoration: none; border-radius: 6px; font-weight: bold; border: 1px solid var(--primary); font-size: 16px; }
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: var(--white); color: var(--primary-dark); }
.btn.secondary:hover { background: var(--accent); }

/* Cartes */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 22px; }
.card { background: #f8faf9; border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .more { display: inline-block; margin-top: 8px; font-weight: bold; }
a.card { text-decoration: none; color: inherit; display: block; transition: border-color .15s; }
a.card:hover { border-color: var(--primary); }

/* Encadrés */
.info-box { background: #eef6f2; border: 1px solid #cfe1d8; border-radius: 10px; padding: 20px; }
.info-box p { margin-bottom: 8px; }
.note { background: var(--accent); border-left: 4px solid var(--primary); padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 20px 0; }
.warning { background: #fff4e5; border: 1px solid #f3d4a0; padding: 14px 16px; border-radius: 8px; margin-top: 22px; color: #6b4c1c; }
.cta-band { background: var(--primary-dark); color: #e6efe9; text-align: center; padding: 44px 0; }
.cta-band h2 { color: var(--white); }
.cta-band .buttons { justify-content: center; }
.cta-band .btn { background: var(--white); color: var(--primary-dark); border-color: var(--white); }
.cta-band .btn.secondary { background: transparent; color: var(--white); }

/* Tarifs */
table.tarifs { border-collapse: collapse; width: 100%; max-width: 720px; margin: 10px 0 24px; }
table.tarifs th, table.tarifs td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.tarifs thead th { color: var(--primary-dark); font-size: 15px; border-bottom: 2px solid var(--primary); }
table.tarifs td.prix { font-weight: bold; white-space: nowrap; text-align: right; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 20px; }
.gallery img { border-radius: 10px; width: 100%; height: 260px; object-fit: cover; }

/* Blog */
.post-meta { font-size: 14px; color: var(--gray); margin-bottom: 6px; }
article.post { max-width: 780px; }
article.post p { margin-bottom: 16px; }
blockquote { border-left: 4px solid var(--primary); padding: 6px 0 6px 18px; margin: 18px 0; color: var(--gray); font-style: italic; }
ol.phases { padding-left: 22px; }
ol.phases li { margin-bottom: 12px; }

/* Repère des informations restant à compléter : supprimer une fois rempli */
mark.todo { background: #ffe58a; padding: 0 4px; border-radius: 3px; }

/* Pied de page */
footer.site { background: var(--primary-dark); color: #d5e2da; padding: 34px 0 26px; font-size: 14px; }
footer.site a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-bottom: 18px; }
footer.site h2 { color: var(--white); font-size: 16px; margin-bottom: 8px; }
footer.site p { margin-bottom: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (max-width: 820px) {
  header.site { position: static; }
  .menu, .nav { justify-content: center; }
  .hero { padding: 40px 0; }
  .hero-grid, .split, .split.reverse { grid-template-columns: 1fr; gap: 28px; }
  h1 { font-size: 28px; }
  h2 { font-size: 23px; }
  .hero .subtitle { font-size: 18px; }
  section { padding: 38px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Accueil : photo du cabinet en arrière-plan, fondue côté texte */
.hero-photo-bg {
  position: relative;
  overflow: hidden;
  padding: 90px 0 60px;
  min-height: 600px;
  background: var(--accent);
  isolation: isolate;
}
.hero-photo-bg .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 55%;
  z-index: -2;
  filter: saturate(.9);
}
.hero-photo-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg,
      rgba(242, 247, 244, .97) 0%,
      rgba(242, 247, 244, .93) 38%,
      rgba(242, 247, 244, .55) 62%,
      rgba(242, 247, 244, .12) 100%),
    linear-gradient(0deg, rgba(242, 247, 244, .9) 0%, rgba(242, 247, 244, 0) 30%);
}
.hero-content { max-width: 600px; }
.hero-photo-bg h1 { font-size: 40px; }
.hero-photo-bg .trust { justify-content: flex-start; margin-top: 46px; }
.hero-photo-bg .trust li { background: rgba(255, 255, 255, .85); backdrop-filter: blur(4px); }

@media (max-width: 820px) {
  .hero-photo-bg { padding: 48px 0 40px; min-height: 0; }
  .hero-photo-bg .hero-bg { object-position: 60% 50%; }
  .hero-photo-bg::before {
    background: linear-gradient(180deg, rgba(242, 247, 244, .66) 0%, rgba(242, 247, 244, .88) 45%, rgba(242, 247, 244, .95) 100%);
  }
  .hero-photo-bg h1 { font-size: 28px; }
}

/* Photo limitée à 1400 px (meilleure netteté) et fondue sur les bords gauche/droite */
.hero-photo-bg .hero-bg {
  left: 50%;
  right: auto;
  width: min(100%, 1400px);
  transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}
@media (max-width: 1400px) {
  .hero-photo-bg .hero-bg {
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 88%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 0%, #000 88%, transparent 100%);
  }
}

/* Pages intérieures : contenu aligné sur la largeur du site (1100 px),
   texte courant limité à ~80 caractères par ligne pour le confort de lecture,
   grilles de cartes et tableaux en pleine largeur */
.container.narrow { max-width: 1100px; }
.narrow > p, .narrow > ul, .narrow > ol, .narrow > h2, .narrow > .note,
.narrow > .warning, article.post > * { max-width: 780px; }
.narrow > .grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* Photo d'accueil : 1000 px, alignée sur le bord droit du contenu (bouton « Prendre rendez-vous » du menu) */
.hero-photo-bg .hero-bg {
  left: auto;
  right: max(0px, calc((100% - 1100px) / 2 + 20px));
  width: min(100%, 1000px);
  transform: none;
  object-position: 60% 55%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 90%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 90%, transparent 100%);
}
@media (max-width: 1140px) {
  .hero-photo-bg .hero-bg {
    right: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 100%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 100%);
  }
}
