/* ==========================================================================
   Le Relais d'Auteuil — styles globaux (chargés par le thème enfant)
   Uniquement ce que Divi 5 ne sait pas régler. Chaque règle vise une classe
   rel-… posée sur un module : rien ne déborde sur les autres pages.
   ========================================================================== */
:root {
  --rel-ardoise: #2F3A4A;
  --rel-facade: #4A5668;
  --rel-pierre: #F1EBE1;
  --rel-lin: #FBF8F3;
  --rel-chene: #94643A;
  --rel-chene-clair: #D9BB94;
  --rel-encre: #1E242D;
  --rel-gris: #56606C;
  --rel-rayon: 16px;
  --rel-ombre: 0 1px 2px rgba(30, 36, 45, .06), 0 8px 24px rgba(30, 36, 45, .06);
}

/* Base : polices et fond du site (Divi › Options du thème peut garder Open Sans) */
body, body .et_pb_text, body .et_pb_module { font-family: 'Inter', system-ui, sans-serif; }
body { background: var(--rel-lin); color: var(--rel-encre); -webkit-font-smoothing: antialiased; }
#page-container, #main-content, #et-main-area { background: var(--rel-lin); }
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 96px; }

/* Focus clavier visible partout */
a:focus-visible, .et_pb_button:focus-visible, button:focus-visible, .et_pb_toggle_title:focus-visible {
  outline: 3px solid var(--rel-chene); outline-offset: 3px; border-radius: 4px;
}

/* ---------- En-tête de page photo : voile pour lire le texte blanc ---------- */
.rel-hero { position: relative; isolation: isolate; }
.rel-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(30, 36, 45, .25) 0%, rgba(30, 36, 45, .55) 45%, rgba(30, 36, 45, .85) 100%);
}
.rel-hero > .et_pb_row { position: relative; z-index: 1; }
.rel-hero h1 { text-wrap: balance; }

/* ---------- Surtitre : petit filet chêne avant le texte ---------- */
.rel-surtitre p::before {
  content: ""; display: inline-block; width: 28px; height: 2px; margin-right: 12px;
  vertical-align: middle; background: currentColor; opacity: .8;
}
.et_pb_text_align_center.rel-surtitre p::before, .rel-surtitre.et_pb_text_align_center p::before { display: none; }

/* ---------- Photos : recadrage au ratio + coins arrondis ---------- */
.rel-photo .et_pb_image_wrap { display: block; width: 100%; overflow: hidden; border-radius: inherit; }
.rel-photo img { width: 100%; height: auto; object-fit: cover; display: block; }
.r3x2 img { aspect-ratio: 3 / 2; }
.r4x3 img { aspect-ratio: 4 / 3; }
.r16x9 img { aspect-ratio: 16 / 9; }
.r1x1 img { aspect-ratio: 1 / 1; }
.rel-galerie .rel-photo img { transition: transform .4s ease; }
.rel-galerie .rel-photo:hover img { transform: scale(1.03); }

/* ---------- Cartes : hauteur égale, lien collé en bas ---------- */
.rel-carte { display: flex; flex-direction: column; border-radius: var(--rel-rayon); overflow: hidden;
  box-shadow: var(--rel-ombre); }
.rel-carte .rel-corps { flex-grow: 1; display: flex; flex-direction: column; }
.rel-carte .rel-corps > :last-child:not(:first-child) { margin-top: auto !important; }
.rel-carte .et_pb_image img { transition: transform .4s ease; }
.rel-carte:hover .et_pb_image img { transform: scale(1.03); }
.rel-carte .et_pb_image { overflow: hidden; }
.rel-lien-fleche { font-weight: 600; text-decoration: none; }
.rel-lien-fleche::after { content: " →"; transition: margin-left .2s ease; }
.rel-lien-fleche:hover::after { margin-left: 4px; }

/* ---------- Listes à coches ---------- */
.rel-liste ul { list-style: none; padding: 0 !important; margin: 0; }
.rel-liste li { position: relative; padding: 0 0 10px 30px; }
.rel-liste li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 14px; height: 8px;
  border-left: 2px solid var(--rel-chene); border-bottom: 2px solid var(--rel-chene); transform: rotate(-45deg);
}
.rel-liste-claire li::before { border-color: var(--rel-chene-clair); }
.rel-liste-claire li { padding-bottom: 14px; }
.rel-liste-2col ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
@media (max-width: 767px) { .rel-liste-2col ul { grid-template-columns: 1fr; } }

/* ---------- Chiffres clés : filet chêne au-dessus ---------- */
.rel-chiffre { border-top: 2px solid var(--rel-chene); padding-top: 20px; }
.rel-bande-sombre .rel-chiffre { border-top-color: var(--rel-chene-clair); }

/* ---------- Boutons groupés : pleine largeur sur mobile ---------- */
@media (max-width: 479px) {
  .rel-boutons .et_pb_button_module_wrapper, .rel-boutons .et_pb_button { width: 100%; text-align: center; }
}

/* ---------- Encadré « bon à savoir » ---------- */
.rel-encadre { border-left: 4px solid var(--rel-chene); }

/* ---------- Sommaire de page (ancres) ---------- */
.rel-sommaire-bande { border-bottom: 1px solid rgba(47, 58, 74, .12); position: sticky; top: 0; z-index: 20; }
.admin-bar .rel-sommaire-bande { top: 32px; }
.rel-sommaire p { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: center; margin: 0; }
.rel-sommaire a { color: var(--rel-ardoise); font-weight: 600; text-decoration: none; padding: 4px 0;
  border-bottom: 2px solid transparent; }
.rel-sommaire a:hover { border-bottom-color: var(--rel-chene); }
@media (max-width: 767px) {
  .rel-sommaire p { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; }
  .rel-sommaire a { white-space: nowrap; }
}

/* ---------- Étapes numérotées ---------- */
.rel-etape-num p {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border-radius: 50%; background: var(--rel-ardoise); color: #fff; font-family: 'Fraunces', serif;
  font-size: 22px; font-weight: 600; margin-bottom: 20px;
}

/* ---------- Conditions du bail ---------- */
.rel-condition { background: #fff; border-radius: 12px; padding: 24px 28px; box-shadow: var(--rel-ombre); }
.rel-cle p { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rel-chene); margin-bottom: 8px; }
.rel-condition strong { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600;
  color: var(--rel-ardoise); line-height: 1.3; }

/* ---------- Accordéon du dossier ---------- */
.rel-accordeon .et_pb_toggle { border: 1px solid rgba(47, 58, 74, .12); border-radius: 12px; padding: 22px 28px; }
.rel-accordeon .et_pb_toggle + .et_pb_toggle { margin-top: 12px; }
.rel-accordeon .et_pb_toggle_content ul { padding-left: 1.2em; }
.rel-accordeon .et_pb_toggle_content li { padding-bottom: 6px; }

/* ---------- En-tête et pied de page (Theme Builder) ---------- */
.rel-entete { border-bottom: 1px solid rgba(47, 58, 74, .1); }
.rel-marque a { text-decoration: none; color: inherit; }
.rel-entete .et_pb_menu .et-menu > li { padding-left: 14px; padding-right: 14px; }
.rel-entete .et_pb_menu .et-menu > li > a { padding-bottom: 6px; border-bottom: 2px solid transparent; }
.rel-entete .et_pb_menu .et-menu > li.current-menu-item > a,
.rel-entete .et_pb_menu .et-menu > li > a:hover { border-bottom-color: var(--rel-chene); opacity: 1; }
.rel-entete-barre > .et_pb_menu { flex: 1 1 auto; }
.rel-entete-barre .et_pb_menu .et_pb_menu__menu > nav > ul { justify-content: flex-end; }
.rel-marque-groupe { flex: 0 0 auto; }
.rel-marque p { line-height: 1.35; margin: 0; }
.rel-marque strong { font-family: 'Fraunces', Georgia, serif; font-size: 19px; font-weight: 600;
  color: var(--rel-ardoise); }
.rel-marque span { letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
@media (max-width: 479px) {
  .rel-entete-barre > .et_pb_button_module_wrapper { display: none; }
}
.rel-pied a { color: #fff; text-decoration: none; }
.rel-pied-liens p { line-height: 2; }
.rel-pied a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rel-pied-bas { border-top: 1px solid rgba(255, 255, 255, .15); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rel-galerie .rel-photo img, .rel-carte .et_pb_image img, .rel-lien-fleche::after { transition: none; }
  .rel-galerie .rel-photo:hover img, .rel-carte:hover .et_pb_image img { transform: none; }
}
