@font-face { font-family: Baskervville; src: url(fonts/baskervville-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Baskervville; font-weight: 600; src: url(fonts/baskervville-600-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Baskervville; font-style: italic; src: url(fonts/baskervville-400-italic.woff2) format("woff2"); font-display: swap; }

/* Couleurs du logo */
:root { --ink: #2b3432; --blue: #3f4f8f; --red: #a30034; --red-dark: #7d0028; --gold: #c2a36b; --head: 88px; }

* { box-sizing: border-box; margin: 0; }
body { background: #fff; color: var(--ink); font: 1.125rem/1.65 Baskervville, Baskerville, Georgia, serif; font-variant-numeric: lining-nums; -webkit-text-size-adjust: 100%; }
a { color: var(--blue); }
a:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
section:focus { outline: none; }
strong { font-weight: 600; }

header { position: relative; z-index: 2; background: #fff; }
.logo img { display: block; clip-path: inset(5px); width: 200px; height: auto; }
nav { display: flex; }
nav a { color: var(--ink); text-decoration: none; padding: 8px 0 6px; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--blue); }
nav a[aria-current] { border-color: var(--gold); }

.langs { display: flex; }
.langs button { border: 0; background: none; padding: 10px 6px; cursor: pointer; border-bottom: 2px solid transparent; }
.langs button[aria-pressed="true"] { border-color: var(--gold); }
.langs button:focus-visible { outline: 2px solid var(--red); }
.langs svg { display: block; width: 27px; height: 18px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }

[lang="ar"] body { font-family: "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif; }
[lang="ar"] em { font-style: normal; }

h1:not(.lead) { font-size: 1.375rem; font-weight: 400; line-height: 1.3; color: var(--blue); margin-bottom: .6em; }
.lead { font-size: clamp(1.5rem, 1.1rem + 1.25vw, 2.25rem); font-weight: 400; line-height: 1.32; text-wrap: pretty; margin-bottom: 1em; }
.text p:not(.lead) { max-width: 62ch; margin-bottom: 1.1em; }
.text .actions:not(.lead) { margin: 1.8em 0 0; }

.btn { display: inline-flex; align-items: center; gap: .55em; background: var(--red); color: #fff; text-decoration: none; padding: .7em 1.3em; border-radius: 3px; line-height: 1.4; }
.btn:hover { background: var(--red-dark); }
.btn svg { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

dl div { display: grid; grid-template-columns: 7rem 1fr; margin-bottom: .45em; }
dt { color: #5d6865; }
dd { min-width: 0; overflow-wrap: anywhere; }
dd a { font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.photo { display: block; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Mobile : la photo se dissout vers le bas */
@media (max-width: 899px) {
  header { padding: 8px 20px 6px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  nav { width: 100%; }
  .logo img { width: clamp(110px, 37vw, 160px); margin-inline-start: -8px; }
  nav { justify-content: space-between; gap: 8px; font-size: clamp(.875rem, 4vw, 1.0625rem); }
  .js main > section { display: none; }
  .js main > section.active { display: block; animation: fade .5s; }
  .photo { height: min(78vw, 480px); -webkit-mask-image: linear-gradient(#000 58%, rgba(0,0,0,.75) 72%, rgba(0,0,0,.3) 87%, transparent); mask-image: linear-gradient(#000 58%, rgba(0,0,0,.75) 72%, rgba(0,0,0,.3) 87%, transparent); }
  :is(#contact, #page-contact) .photo img { object-position: 50% 78%; }
  .text { padding: 8px 20px 100px; }
  dl div { grid-template-columns: 5.8rem 1fr; }
  nav a { padding: 11px 0 9px; }
  .langs button { padding: 13px clamp(4px, 1.8vw, 7px); }
  dl div { align-items: baseline; }
  dd a { display: inline-block; padding: 8px 0; }
  .quick { position: fixed; z-index: 3; inset: auto 0 0; display: flex; background: #fff; border-top: 1px solid #e3ddd1; padding-bottom: env(safe-area-inset-bottom); }
  .quick a { flex: 1; text-align: center; padding: 15px 8px; text-decoration: none; }
  .quick a:first-child { background: var(--red); color: #fff; }
}

/* Ordinateur : la photo se dissout vers le texte */
@media (min-width: 900px) {
  .quick { display: none; }
  header { position: sticky; top: 0; height: var(--head); display: flex; align-items: center; justify-content: space-between; padding: 0 5vw 0 28px; }
  .logo img { width: 226px; }
  nav { gap: clamp(20px, 3vw, 52px); }
  nav { margin-inline-start: auto; }
  .langs { order: 2; margin-inline-start: clamp(20px, 3vw, 48px); }
  main { display: grid; direction: ltr; }
  [dir="rtl"] .text { direction: rtl; }
  .js main > section { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .7s, visibility 0s .7s; }
  .js main > section.active { visibility: visible; opacity: 1; transition: opacity .7s; }
  section { position: relative; min-height: calc(100vh - var(--head)); display: flex; align-items: center; }
  .photo { position: absolute; top: 0; left: 0; width: 54vw; height: calc(100vh - var(--head)); min-height: 100%;
    -webkit-mask-image: linear-gradient(to right, #000 64%, rgba(0,0,0,.88) 72%, rgba(0,0,0,.5) 83%, rgba(0,0,0,.15) 94%, transparent), linear-gradient(transparent, #000 8%, #000 88%, transparent);
    mask-image: linear-gradient(to right, #000 64%, rgba(0,0,0,.88) 72%, rgba(0,0,0,.5) 83%, rgba(0,0,0,.15) 94%, transparent), linear-gradient(transparent, #000 8%, #000 88%, transparent);
    -webkit-mask-composite: source-in; mask-composite: intersect; }
  :is(#accueil, #page-accueil) .photo img { object-position: 50% 25%; }
  :is(#engagement, #page-engagement) .photo img { object-position: 50% 20%; }
  :is(#honoraires, #page-honoraires) .photo img { object-position: 50% 75%; }
  :is(#contact, #page-contact) .photo img { object-position: 50% 85%; }
  .text { position: relative; margin-left: 55vw; width: min(40vw, 700px); padding: 24px 0 48px; }
}

@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
