/* ==========================================================================
   MAÎTRE JÉRÉMIE DANTON — Avocat pénaliste
   Système de design : registre "gazette officielle" — bronze, olive, or.
   Display : Newsreader (italic) — Corps : Public Sans — Marqueur : §
   ========================================================================== */

:root {
  /* Couleurs */
  --ink: #17150c;
  --bronze-900: #201d13;
  --bronze-800: #2a2618;
  --bronze-700: #3a341f;
  --olive-600: #5c5934;
  --gold-600: #a3813f;
  --gold-500: #b9974f;
  --gold-300: #d9c48a;
  --gold-100: #efe4c8;
  --cream-50: #f7f4ec;
  --cream-100: #f1ecdf;
  --stone-100: #eae4d3;
  --white: #fffdf8;
  --line: rgba(185, 151, 79, 0.35);
  --line-dark: rgba(239, 228, 200, 0.18);
  --shadow-soft: 0 20px 50px -25px rgba(23, 21, 12, 0.45);

  /* Typographie */
  --font-display: "Newsreader", "Georgia", serif;
  --font-body: "Public Sans", "Segoe UI", Arial, sans-serif;

  /* Rythme */
  --container: 1160px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream-50);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; margin: 0 0 .5em; line-height: 1.15; color: var(--ink); }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--gold-500); color: var(--ink);
  padding: 12px 20px; z-index: 200; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Eyebrow / marqueur § ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-body); font-size: .8rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold-600);
}
.eyebrow::before { content: "§"; font-family: var(--font-display); font-style: italic; font-size: 1.15em; color: var(--gold-500); }
.on-dark .eyebrow { color: var(--gold-300); }

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-style: italic; }
.section-head .lede { color: var(--bronze-700); font-size: 1.05rem; max-width: 56ch; }
.on-dark .section-head .lede { color: var(--cream-100); opacity: .85; }

/* ---------- Boutons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-body); font-weight: 600; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 15px 30px; border: 1px solid transparent; border-radius: var(--radius);
  overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), color .3s, border-color .3s;
}
.btn-gold { background: var(--gold-500); color: var(--ink); }
.btn-gold::after {
  content: ""; position: absolute; inset: 0; background: var(--gold-300);
  transform: translateX(-105%); transition: transform .45s var(--ease); z-index: 0;
}
.btn-gold span { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .5em; }
.btn-gold:hover::after, .btn-gold:focus-visible::after { transform: translateX(0); }
.btn-gold:hover, .btn-gold:focus-visible { box-shadow: var(--shadow-soft); transform: translateY(-2px); }

.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.on-dark .btn-ghost { border-color: var(--line-dark); color: var(--cream-50); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--gold-500); color: var(--gold-600); transform: translateY(-2px); }
.on-dark .btn-ghost:hover { color: var(--gold-300); }

.btn-sm { padding: 11px 20px; font-size: .72rem; }

.link-arrow { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; color: var(--gold-600); position: relative; }
.link-arrow .bar { display: inline-block; width: 26px; height: 1px; background: var(--gold-500); transition: width .35s var(--ease); }
.link-arrow:hover .bar, .link-arrow:focus-visible .bar { width: 42px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--bronze-900);
  border-bottom: 1px solid var(--line-dark);
  transition: padding .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 12px 30px -20px rgba(0,0,0,.6); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 18px; padding-bottom: 18px; transition: padding .3s var(--ease); }
.site-header.is-scrolled .container { padding-top: 10px; padding-bottom: 10px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--cream-50); }
.brand-mark { width: 54px; height: 54px; flex: none; color: var(--gold-400, var(--gold-500)); }
.brand-mark-img { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.brand-mark-img img { width: 100%; height: 100%; object-fit: contain; }
.brand-word { font-family: var(--font-display); font-style: italic; font-size: 1.28rem; letter-spacing: .01em; white-space: nowrap; }
.brand-word b { font-style: normal; font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav ul { display: flex; gap: 30px; }
.main-nav a:not(.btn) {
  position: relative; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--cream-100); padding: 6px 0;
}
.main-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 1px; background: var(--gold-500);
  transition: left .3s var(--ease), right .3s var(--ease);
}
.main-nav a:not(.btn):hover::after, .main-nav a:not(.btn):focus-visible::after, .main-nav a.active::after { left: 0; right: 0; }
.main-nav a.active { color: var(--gold-300); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; background: linear-gradient(160deg, var(--bronze-900), var(--bronze-800) 60%, var(--olive-600));
  color: var(--cream-50); overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; padding-top: 90px; padding-bottom: 90px; }
.hero-eyebrow { margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); font-style: italic; color: var(--white); }
.hero h1 b { font-weight: 600; font-style: normal; display: block; }
.hero .lede { font-size: 1.08rem; color: var(--cream-100); opacity: .9; max-width: 46ch; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

.hero-portrait { position: relative; aspect-ratio: 4/5; border: 1px solid var(--line); padding: 14px; }
.hero-portrait::before, .hero-portrait::after {
  content: ""; position: absolute; width: 34px; height: 34px; border: 1px solid var(--gold-500);
}
.hero-portrait::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.hero-portrait::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.portrait-frame {
  width: 100%; height: 100%; overflow: hidden; position: relative;
  background: radial-gradient(circle at 30% 20%, var(--olive-600), var(--bronze-800) 75%);
}
.portrait-frame .figure-mark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: .5; animation: hero-drift 16s ease-in-out infinite alternate; }
.portrait-frame .figure-mark svg { width: 42%; height: 42%; }
.portrait-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: hero-drift 22s ease-in-out infinite alternate; }
@keyframes hero-drift { from { transform: scale(1); } to { transform: scale(1.06); } }
.portrait-caption {
  position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 14px 16px;
  background: rgba(23,21,12,.55); backdrop-filter: blur(3px); font-size: .8rem; color: var(--cream-100);
  border-top: 1px solid var(--line);
}

.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); color: var(--gold-300); opacity: .8; }
.scroll-cue svg { width: 18px; height: 26px; animation: cue-bob 2.2s ease-in-out infinite; }
@keyframes cue-bob { 0%,100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(8px); opacity: 1; } }

/* ---------- Divider signature (balance animée) ---------- */
.divider-balance { display: flex; justify-content: center; padding: 46px 0; background: inherit; }
.divider-balance svg { width: 92px; height: 46px; overflow: visible; }
.divider-balance .stroke {
  fill: none; stroke: var(--gold-500); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 300; transition: stroke-dashoffset 1.6s var(--ease);
}

/* ---------- Sections génériques ---------- */
.section { padding: 96px 0; }
.section.tight { padding: 72px 0; }
.on-light { background: var(--cream-50); }
.on-alt { background: var(--stone-100); }
.on-dark { background: linear-gradient(175deg, var(--bronze-900), var(--olive-600)); color: var(--cream-50); }
.on-dark h2, .on-dark h3 { color: var(--white); }
.on-dark p { color: var(--cream-100); }

/* ---------- Grille de compétences ---------- */
.competences-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.competence-card {
  background: var(--white); border: 1px solid var(--line); padding: 34px 32px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  display: flex; flex-direction: column; gap: 14px;
}
.competence-card:hover, .competence-card:focus-within { transform: translateY(-6px); box-shadow: var(--shadow-soft); border-color: var(--gold-500); }
.competence-icon { width: 46px; height: 46px; color: var(--gold-600); }
.competence-card h3 { font-size: 1.28rem; font-style: italic; }
.competence-card p { color: var(--bronze-700); flex: 1; }
.competence-card .link-arrow { margin-top: 6px; }

/* ---------- Honoraires ---------- */
.honoraires-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.honoraires-copy p { color: var(--cream-100); }
.honoraires-visual { position: relative; aspect-ratio: 3/4; border: 1px solid var(--line); padding: 12px; }
.honoraires-visual .portrait-frame { background: radial-gradient(circle at 70% 30%, var(--gold-600), var(--bronze-900) 70%); }

/* ---------- Actualités ---------- */
.actus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.actu-card { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.actu-card:hover, .actu-card:focus-within { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.actu-thumb {
  aspect-ratio: 16/10; background: linear-gradient(150deg, var(--bronze-800), var(--olive-600));
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.actu-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.actu-card:hover .actu-thumb img { transform: scale(1.06); }
.article-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 2px; margin-bottom: 34px; }
.actu-thumb svg { width: 34%; opacity: .55; color: var(--gold-300); transition: transform .6s var(--ease); }
.actu-card:hover .actu-thumb svg { transform: scale(1.1) rotate(-3deg); }
.actu-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.actu-date { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-600); font-weight: 600; }
.actu-body h3 { font-size: 1.12rem; font-style: italic; }
.actu-body p { color: var(--bronze-700); font-size: .95rem; flex: 1; }
.actus-more { text-align: center; margin-top: 46px; }

/* ---------- Contact / Formulaire ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.field { position: relative; margin-bottom: 30px; }
.field input, .field textarea {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--line);
  padding: 12px 2px 10px; color: var(--ink); transition: border-color .3s;
}
.on-dark .field input, .on-dark .field textarea { color: var(--white); border-color: var(--line-dark); }
.field textarea { resize: vertical; min-height: 96px; }
.field label {
  position: absolute; left: 2px; top: 12px; color: var(--bronze-700); font-size: 1rem;
  pointer-events: none; transition: transform .25s var(--ease), font-size .25s var(--ease), color .25s var(--ease);
  transform-origin: left top;
}
.on-dark .field label { color: var(--cream-100); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold-500); }
.field input:focus + label, .field textarea:focus + label,
.field input:not(:placeholder-shown) + label, .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-20px); font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--gold-600);
}
.field-note { font-size: .82rem; color: var(--bronze-700); margin-top: -18px; margin-bottom: 20px; }
.on-dark .field-note { color: var(--cream-100); }

.consent-row { display: flex; align-items: flex-start; gap: 10px; margin: -6px 0 24px; }
.consent-row input[type="checkbox"] { margin-top: 4px; flex: none; width: 16px; height: 16px; accent-color: var(--gold-500); }
.consent-row label { font-size: .84rem; color: var(--bronze-700); line-height: 1.5; }
.on-dark .consent-row label { color: var(--cream-100); opacity: .85; }
.consent-row a { text-decoration: underline; text-underline-offset: 3px; color: var(--gold-600); }
.on-dark .consent-row a { color: var(--gold-300); }

.contact-infos { display: grid; gap: 22px; align-content: start; }
.info-row { display: flex; align-items: flex-start; gap: 16px; }
.info-row svg { width: 22px; height: 22px; color: var(--gold-500); flex: none; margin-top: 3px; }
.info-row a, .info-row span { color: inherit; }

.alert { padding: 16px 20px; border: 1px solid var(--gold-500); background: var(--gold-100); color: var(--bronze-900); margin-bottom: 26px; font-size: .95rem; }
.alert.error { border-color: #a3453f; background: #f7e6e4; color: #7a2d27; }

/* ---------- Reveal on scroll ----------
   Le contenu est visible par défaut (CSS pur), ce qui garantit son
   affichage même si JavaScript est indisponible, bloqué, ou échoue pour
   une raison quelconque. Le JS, s'il s'exécute avec succès, ajoute
   lui-même la classe "reveal-armed" juste avant d'observer les éléments :
   c'est seulement à partir de là que l'état "masqué avant révélation"
   s'applique, jamais avant. */
.reveal.reveal-armed { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.reveal-armed.in-view { opacity: 1; transform: translateY(0); }
.stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

.divider-balance.reveal-armed .stroke { stroke-dashoffset: 300; }
.divider-balance.reveal-armed.in-view .stroke { stroke-dashoffset: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bronze-900); color: var(--cream-100); padding: 76px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr .8fr .9fr; gap: 44px; margin-bottom: 56px; }
.footer-brand .brand-word { color: var(--white); }
.footer-brand p { margin-top: 18px; color: var(--cream-100); opacity: .78; max-width: 34ch; font-size: .95rem; }
.footer-col h4 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { font-size: .92rem; opacity: .85; transition: opacity .25s, color .25s; }
.footer-col a:hover { opacity: 1; color: var(--gold-300); }
.social-row { display: flex; gap: 14px; margin-top: 20px; }
.social-row a {
  width: 36px; height: 36px; border: 1px solid var(--line-dark); display: flex; align-items: center; justify-content: center;
  transition: border-color .25s, color .25s, transform .25s var(--ease);
}
.social-row a:hover { border-color: var(--gold-500); color: var(--gold-300); transform: translateY(-3px); }
.social-row svg { width: 15px; height: 15px; }
.footer-bottom { border-top: 1px solid var(--line-dark); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; opacity: .65; }
.footer-legal-links a { text-decoration: underline; text-underline-offset: 3px; }
.footer-legal-links a:hover { color: var(--gold-300); }

/* ---------- Pages internes (compétence / actualité / listing) ---------- */
.page-hero { background: var(--bronze-900); color: var(--cream-50); padding: 64px 0 54px; }
.page-hero .eyebrow { margin-bottom: 14px; }
.page-hero h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-style: italic; color: var(--white); }
.breadcrumb { display: flex; gap: 8px; font-size: .82rem; color: var(--cream-100); opacity: .75; margin-bottom: 18px; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }

.article-body { max-width: 72ch; margin: 0 auto; }
.article-body p { color: var(--bronze-700); font-size: 1.06rem; }
.article-body h2 { font-size: 1.5rem; font-style: italic; margin-top: 1.6em; }
.article-body h3 { font-size: 1.22rem; font-style: italic; margin-top: 1.4em; }
.article-body ul, .article-body ol { color: var(--bronze-700); font-size: 1.06rem; padding-left: 1.4em; margin: 0 0 1em; }
.article-body li { margin-bottom: .4em; }
.article-body blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--gold-500);
  font-style: italic; color: var(--bronze-900); font-size: 1.1rem;
}
.article-body a { color: var(--gold-600); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--gold-500); }
.article-body strong { color: var(--ink); }
.article-meta { display: flex; gap: 18px; align-items: center; margin-bottom: 34px; font-size: .85rem; color: var(--gold-600); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }

.list-simple { max-width: 72ch; margin: 0 auto; }
.list-simple li { padding: 26px 0; border-bottom: 1px solid var(--line); }
.list-simple h3 { font-size: 1.2rem; font-style: italic; margin-bottom: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 60px; }
  .hero-portrait { max-width: 380px; }
  .competences-grid { grid-template-columns: 1fr; }
  .actus-grid { grid-template-columns: repeat(2, 1fr); }
  .honoraires-wrap, .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav ul { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    background: none; border: 1px solid var(--line-dark); color: var(--cream-50);
  }
  .main-nav.is-open ul {
    display: flex; flex-direction: column; gap: 0; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bronze-900); border-top: 1px solid var(--line-dark); padding: 8px 28px 20px;
  }
  .main-nav.is-open ul li { border-bottom: 1px solid var(--line-dark); }
  .main-nav.is-open ul a { display: block; padding: 14px 0; }
  .main-nav .btn { display: none; }
  .actus-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-bottom { flex-direction: column; }
  .section { padding: 64px 0; }
}
