/* =============================================
   avocat-energie.fr — feuille de style principale
   ============================================= */

:root {
  --ink: #07090d;
  --ink-2: #0e131a;
  --ink-3: #151c26;
  --line: rgba(255, 255, 255, .09);
  --text: #e9eef3;
  --muted: #8f9bab;
  --sun: #ffb800;
  --volt: #c8ff3d;
  --cyan: #3de0ff;
  --grad: linear-gradient(110deg, var(--sun), var(--volt) 55%, var(--cyan));
  --radius: 22px;
  --wrap: 1240px;
  --f-display: "Syne", system-ui, sans-serif;
  --f-body: "Inter Tight", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--volt); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Typographie ---------- */
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; }
h1 { font-size: clamp(2.6rem, 7.2vw, 6.4rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.8rem); }
h3 { font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.15; }
em, .serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 .78rem/1 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 12px var(--volt); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 60ch; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--volt); color: var(--ink); box-shadow: 0 0 0 0 rgba(200, 255, 61, .5); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -8px rgba(200, 255, 61, .6); }
.btn-ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, .03); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .3); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 14px 0 auto; z-index: 50;
  transition: transform .4s var(--ease);
}
.header .bar {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 10px 10px 20px; border-radius: 999px;
  background: rgba(14, 19, 26, .55); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: background .3s;
}
.header.scrolled .bar { background: rgba(10, 13, 18, .88); }
.logo { display: flex; align-items: center; gap: 10px; font: 700 1.05rem/1 var(--f-display); letter-spacing: -.02em; }
.logo svg { width: 30px; height: 30px; }
.logo small { display: block; font: 500 .66rem/1.3 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.current {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-size: .8rem; color: var(--volt); background: rgba(200, 255, 61, .08); border: 1px solid rgba(200, 255, 61, .2);
}
.current::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { padding: 9px 14px; border-radius: 999px; font-size: .93rem; color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav .ext::after { content: "↗"; margin-left: 4px; font-size: .8em; opacity: .6; }
.header .btn { padding: 12px 18px; }
.burger { display: none; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .06); margin-left: auto; }
.burger span, .burger span::before, .burger span::after { display: block; width: 18px; height: 1.5px; background: var(--text); margin: auto; position: relative; transition: .3s var(--ease); }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { top: 0; transform: rotate(45deg); }
.menu-open .burger span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; padding: 140px 0 70px; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .42; filter: saturate(.7) contrast(1.1); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(255, 184, 0, .22), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(61, 224, 255, .14), transparent 70%),
    linear-gradient(180deg, rgba(7, 9, 13, .3), var(--ink) 92%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}
.hero h1 { margin: 22px 0 26px; max-width: 14ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; align-items: end; }
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.stats { display: grid; grid-template-columns: 1fr 1fr; }
.stats div { padding: 24px; border-bottom: 1px solid var(--line); }
.stats div:nth-child(odd) { border-right: 1px solid var(--line); }
.stats div:nth-last-child(-n+2) { border-bottom: 0; }
.stats strong { display: block; font: 700 2.4rem/1 var(--f-display); letter-spacing: -.04em; }
.stats span { font-size: .85rem; color: var(--muted); }

.page-hero { padding: 170px 0 70px; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; width: 600px; height: 600px; right: -150px; top: -250px; border-radius: 50%; background: radial-gradient(circle, rgba(200, 255, 61, .16), transparent 65%); z-index: -1; }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); margin: 18px 0 20px; max-width: 18ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs li { list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .4; }

/* ---------- Ticker ---------- */
.ticker { border-block: 1px solid var(--line); overflow: hidden; padding: 20px 0; }
.ticker-track { display: flex; gap: 48px; width: max-content; animation: scroll 40s linear infinite; }
.ticker span { font: 500 1.4rem/1 var(--f-serif); font-style: italic; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 48px; }
.ticker span::after { content: "✦"; font-style: normal; color: var(--sun); font-size: .9rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; margin-bottom: 60px; }
.section-head h2 { max-width: 16ch; margin-top: 18px; }
.section-head .lead { max-width: 44ch; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card {
  position: relative; padding: 32px; border-radius: var(--radius); overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--line);
  transition: border-color .4s, transform .5s var(--ease);
}
.card:hover { border-color: rgba(200, 255, 61, .3); transform: translateY(-4px); }
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .5s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(200, 255, 61, .1), transparent 60%);
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card h3 { margin: 22px 0 12px; }
.card p { color: var(--muted); font-size: .98rem; }
.card .num { font: 500 .8rem/1 var(--f-body); color: var(--muted); letter-spacing: .1em; }
.icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.icon svg { width: 24px; height: 24px; stroke: var(--volt); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.card-img { padding: 0; min-height: 360px; display: flex; align-items: end; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card-img:hover img { transform: scale(1.05); }
.card-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(7, 9, 13, .95)); }
.card-img .body { position: relative; z-index: 1; padding: 32px; }
.card-img .body p { color: #c3ccd6; }
.tag { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: rgba(255, 184, 0, .12); color: var(--sun); border: 1px solid rgba(255, 184, 0, .25); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 600; font-size: .95rem; color: var(--volt); }
.link-arrow svg { width: 18px; height: 18px; flex: none; }
.link-arrow:hover { gap: 12px; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.split-media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media .glass { position: absolute; left: 20px; right: 20px; bottom: 20px; padding: 20px 22px; display: flex; gap: 16px; align-items: center; }
.split-media .glass strong { font: 700 2rem/1 var(--f-display); }
.checks { list-style: none; display: grid; gap: 14px; margin: 30px 0 36px; }
.checks li { display: flex; gap: 14px; align-items: start; }
.checks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--volt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2307090d' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/13px no-repeat; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.step { padding: 30px 26px; border-top: 1px solid var(--line); position: relative; }
.step::before { counter-increment: s; content: "0" counter(s); display: block; font: 700 3.4rem/1 var(--f-display); letter-spacing: -.05em; margin-bottom: 26px; }
.step:nth-child(1)::before { color: var(--sun); }
.step:nth-child(2)::before { color: #e4db1e; }
.step:nth-child(3)::before { color: var(--volt); }
.step:nth-child(4)::before { color: var(--cyan); }
.step::after { content: ""; position: absolute; top: -1px; left: 0; width: 40%; height: 1px; background: var(--grad); }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--muted); font-size: .96rem; }

/* Partners */
.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.partner { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 36px; min-height: 280px; }
.partner h3 { font-size: 1.9rem; }
.partner .url { font-family: var(--f-serif); font-style: italic; font-size: 1.15rem; color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 880px; }
.faq details { border: 1px solid var(--line); border-radius: 18px; background: var(--ink-2); transition: border-color .3s; }
.faq details[open] { border-color: rgba(200, 255, 61, .3); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 26px; display: flex; justify-content: space-between; gap: 20px; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.5rem/1 var(--f-body); color: var(--volt); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 26px 24px; color: var(--muted); }

/* CTA */
.cta { position: relative; border-radius: 32px; overflow: hidden; padding: clamp(40px, 7vw, 90px); background: var(--ink-2); border: 1px solid var(--line); isolation: isolate; }
.cta::before { content: ""; position: absolute; inset: -40%; z-index: -1; background: conic-gradient(from 180deg at 70% 40%, transparent, rgba(255, 184, 0, .25), rgba(200, 255, 61, .2), rgba(61, 224, 255, .2), transparent 60%); filter: blur(60px); animation: spin 18s linear infinite; }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.form { display: grid; gap: 12px; padding: 28px; }
.form label { font-size: .8rem; color: var(--muted); display: grid; gap: 6px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; font: inherit; font-size: 1rem; color: var(--text);
  background: rgba(7, 9, 13, .6); border: 1px solid var(--line); transition: border-color .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--volt); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .btn { justify-content: center; margin-top: 6px; }
.form small { font-size: .75rem; color: var(--muted); }

/* Blog */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); transition: border-color .4s, transform .5s var(--ease); }
.post:hover { border-color: rgba(200, 255, 61, .3); transform: translateY(-4px); }
.post figure { aspect-ratio: 16 / 10; overflow: hidden; }
.post figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.post:hover figure img { transform: scale(1.06); }
.post .body { padding: 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post .meta { font-size: .8rem; color: var(--muted); display: flex; gap: 12px; align-items: center; }
.post h3 { font-size: 1.3rem; }
.post p { color: var(--muted); font-size: .95rem; }
.post .link-arrow { margin-top: auto; }
.post-ext { justify-content: space-between; padding: 30px; min-height: 240px; }
.post-ext .tag { align-self: start; background: rgba(61, 224, 255, .1); color: var(--cyan); border-color: rgba(61, 224, 255, .25); }
.post-ext h3 { margin: 18px 0 10px; }

/* Article */
.article { max-width: 760px; margin-inline: auto; }
.article-cover { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 8; margin-bottom: 60px; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 56px 0 18px; }
.prose h3 { margin: 34px 0 12px; }
.prose p, .prose ul, .prose ol { margin-bottom: 20px; color: #c3ccd6; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--volt); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.prose strong { color: var(--text); }
.callout { margin: 34px 0; padding: 26px 28px; border-radius: 18px; border: 1px solid rgba(255, 184, 0, .3); background: rgba(255, 184, 0, .06); }
.callout p:last-child { margin-bottom: 0; }

/* Legal */
.legal { max-width: 820px; }
.legal h2 { font-size: 1.6rem; margin: 48px 0 14px; }
.legal p, .legal ul { color: #c3ccd6; margin-bottom: 14px; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--volt); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 80px 0 40px; margin-top: 40px; }
.footer .footer-big { max-width: none; color: var(--text); font: 700 clamp(3rem, 12vw, 10rem)/.9 var(--f-display); letter-spacing: -.06em; margin-bottom: 60px; opacity: .9; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font: 600 .75rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a { color: #c3ccd6; transition: color .2s; }
.footer a:hover { color: var(--volt); }
.footer p { color: var(--muted); font-size: .95rem; max-width: 36ch; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 60px; padding-top: 26px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

/* ---------- Bouton d'appel flottant (mobile) ---------- */
.call-fab {
  display: none; position: fixed; right: 16px; bottom: 16px; z-index: 60;
  align-items: center; gap: 10px; padding: 14px 20px 14px 16px; border-radius: 999px;
  background: var(--volt); color: var(--ink); font-weight: 700;
  box-shadow: 0 12px 40px -8px rgba(200, 255, 61, .7);
  transform: translateY(120%); opacity: 0; transition: transform .5s var(--ease), opacity .4s;
}
.call-fab svg { width: 22px; height: 22px; animation: ring 2.4s ease-in-out infinite; }
.call-fab::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--volt); animation: halo 2.4s ease-out infinite; }
.call-fab.show { transform: none; opacity: 1; }

/* ---------- Animations ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes scroll { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .3; } }
@keyframes halo { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav, .header .btn { display: none; }
  .burger { display: block; }
  .menu-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: calc(100% + 10px); left: 16px; right: 16px; padding: 14px;
    background: #0b0e13; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 60px -20px #000;
    backdrop-filter: blur(20px);
  }
  .menu-open .nav a { padding: 14px 16px; font-size: 1.05rem; }
  .hero-grid, .split, .cta-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .span-2, .span-3, .span-4 { grid-column: span 1; }
  .card-img { grid-column: span 2; }
  .steps { grid-template-columns: 1fr 1fr; }
  .posts { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 1rem; }
  .header { inset: 10px 0 auto; }
  .current { padding: 5px 10px; font-size: .72rem; }
  .logo small { display: none; }
  .header .bar { gap: 10px; padding-left: 14px; }
  .hero { padding: 120px 0 50px; }
  .bento, .steps, .posts, .partners, .footer-grid, .form .row { grid-template-columns: 1fr; }
  .card-img { grid-column: span 1; min-height: 320px; }
  .card { padding: 26px; }
  .stats strong { font-size: 1.9rem; }
  .split-media { aspect-ratio: 4 / 4.4; }
  .call-fab { display: inline-flex; }
  .footer { padding-bottom: 100px; }
}

/* =============================================
   Animations d'entrée de page
   ============================================= */
.loader { display: none; }
.js .loader {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 200;
  background: radial-gradient(60% 60% at 50% 50%, rgba(200, 255, 61, .08), transparent 70%), var(--ink-2);
  clip-path: inset(0); transition: clip-path 1s cubic-bezier(.77, 0, .18, 1), opacity .8s, transform 1s var(--ease);
  animation: loaderFailsafe 0s 4s forwards;
}
.loader-inner { display: grid; justify-items: center; gap: 18px; }
.loader svg { width: 64px; height: 64px; animation: loaderGlow 1.2s ease-in-out infinite alternate; }
.loader-word { font: 700 clamp(1.6rem, 5vw, 2.6rem)/1 var(--f-display); letter-spacing: -.03em; overflow: hidden; }
.loader-bar { width: 160px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; position: relative; }
.loader-bar::after { content: ""; position: absolute; inset: 0; background: var(--grad); transform-origin: left; animation: loaderBar .9s var(--ease) forwards; }

/* Sortie différente selon la page */
.loaded .loader { pointer-events: none; }
.loaded [data-page="home"] .loader { clip-path: inset(0 0 100% 0); }
.loaded [data-page="services"] .loader { clip-path: inset(0 0 0 100%); }
.js [data-page="blog"] .loader { clip-path: circle(150% at 50% 50%); }
.loaded [data-page="blog"] .loader { clip-path: circle(0% at 50% 50%); }
.loaded [data-page="article"] .loader { opacity: 0; transform: scale(1.15); }
.loaded [data-page="mentions"] .loader, .loaded [data-page="politique"] .loader { clip-path: inset(100% 0 0 0); }

/* Contenu d'en-tête qui apparaît après le loader */
.js .intro { opacity: 0; transform: var(--from, translateY(40px)); filter: blur(8px); }
.loaded .intro { animation: introIn 1s var(--ease) forwards; animation-delay: calc(.45s + var(--i, 0) * .1s); }
[data-page="services"] { --from: translateX(-50px); }
[data-page="blog"] { --from: scale(.92); }
[data-page="mentions"], [data-page="politique"] { --from: translateY(-30px); }
.js [data-page="home"] .hero-bg img { transform: scale(1.18); }
.loaded [data-page="home"] .hero-bg img { animation: kenburns 2.6s var(--ease) .2s forwards; }
.js h1.intro { clip-path: inset(0 0 100% 0); }
.loaded h1.intro { animation-name: introIn, titleWipe; }

/* Barre de progression de lecture */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; background: var(--grad); transform-origin: left; transform: scaleX(var(--p, 0)); }

@keyframes loaderBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes loaderGlow { to { filter: drop-shadow(0 0 18px rgba(200, 255, 61, .6)); transform: scale(1.06); } }
@keyframes loaderFailsafe { to { visibility: hidden; } }
@keyframes introIn { to { opacity: 1; transform: none; filter: none; } }
@keyframes titleWipe { to { clip-path: inset(0 0 -10% 0); } }
@keyframes kenburns { to { transform: scale(1); } }

/* ---------- Blog : filtres, essentiel, auteur ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; color: var(--muted); transition: .3s var(--ease); }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.chip.is-active { background: var(--volt); color: var(--ink); border-color: var(--volt); font-weight: 600; }
.post.is-hidden { display: none; }
.keys { padding: 30px 32px; margin-bottom: 50px; }
.keys h2 { font-size: 1.2rem; margin-bottom: 4px; }
.keys .checks { margin: 18px 0 0; }
.prose .faq { margin-top: 10px; }
.prose .faq p { margin: 0; }
.author { display: flex; gap: 20px; align-items: start; padding: 28px; margin-top: 60px; }
.author svg { width: 52px; height: 52px; flex: none; }
.author p { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.fee h3 { font-size: 1.9rem; margin-top: 20px; }

/* ---------- Formulaire ---------- */
.hp { position: absolute; left: -9999px; }
.form-ok { padding: 14px 16px; border-radius: 12px; background: rgba(200, 255, 61, .1); border: 1px solid rgba(200, 255, 61, .35); color: var(--volt); font-size: .95rem; }

@media (prefers-reduced-motion: reduce) {
  .js .loader { display: none; }
  .js .intro, .js h1.intro { opacity: 1; transform: none; filter: none; clip-path: none; }
}

/* =============================================
   Pages Avocat & Contact
   ============================================= */
.timeline { list-style: none; display: grid; gap: 0; border-left: 1px solid var(--line); margin-left: 8px; }
.timeline li { position: relative; display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 28px 0 28px 36px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 38px; width: 11px; height: 11px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 0 5px rgba(200, 255, 61, .12), 0 0 16px var(--volt); }
.timeline .year { font: 700 2.4rem/1 var(--f-display); letter-spacing: -.04em; }
.timeline p { color: var(--muted); margin-top: 8px; }
.contact-card .big { font: 600 1.15rem/1.3 var(--f-display); color: var(--text); margin-bottom: 6px; word-break: break-word; }
.loaded [data-page="avocat"] .loader { clip-path: polygon(50% 0, 50% 0, 50% 100%, 50% 100%); }
.js [data-page="avocat"] .loader { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.loaded [data-page="contact"] .loader { clip-path: inset(0 100% 0 0); }
[data-page="avocat"] { --from: translateY(60px) rotate(1.5deg); }
[data-page="contact"] { --from: translateX(50px); }

/* =============================================
   Animations premium
   ============================================= */
/* Titres révélés mot par mot */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .06em .1em 0; margin: 0 -.06em -.1em 0; }
.w > span { display: inline-block; transform: translateY(105%) rotate(4deg); transition: transform 1s var(--ease); transition-delay: calc(var(--wi) * 55ms); }
.words-in .w > span { transform: none; }

/* Images dévoilées par un volet + parallaxe */
.js .media-reveal { clip-path: inset(12% 12% 12% 12% round var(--radius)); transition: clip-path 1.3s cubic-bezier(.77, 0, .18, 1); }
.js .media-reveal.in { clip-path: inset(0 0 0 0 round var(--radius)); }
.js .media-reveal img { transform: scale(1.25) translateY(var(--py, 0px)); transition: transform 1.6s var(--ease); }
.js .media-reveal.in img { transform: scale(1.12) translateY(var(--py, 0px)); }
.js .media-reveal.in.settled img { transition: none; }

/* Halo lumineux qui suit le curseur */
.spot { position: fixed; z-index: 1; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(200, 255, 61, .07), rgba(61, 224, 255, .04) 40%, transparent 70%);
  transform: translate3d(var(--cx, -999px), var(--cy, -999px), 0); transition: opacity .4s; mix-blend-mode: screen; }

/* Boutons magnétiques avec reflet */
.btn { position: relative; overflow: hidden; transform: translate3d(var(--bx, 0), var(--by, 0), 0); }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover { transform: translate3d(var(--bx, 0), calc(var(--by, 0px) - 2px), 0); }

/* Bordure dégradée animée au survol des cartes */
.card:not(.card-img)::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 60%, var(--sun), var(--volt), var(--cyan), transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: angle 4s linear infinite; }
.card:not(.card-img):hover::after { opacity: 1; }
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes angle { to { --ang: 360deg; } }

@media (hover: none), (max-width: 1080px) { .spot { display: none; } }
@media (max-width: 680px) { .timeline li { grid-template-columns: 1fr; gap: 6px; } }
@media (max-width: 1240px) {
  .nav, .header .btn { display: none; }
  .burger { display: block; }
  .menu-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: calc(100% + 10px); left: 16px; right: 16px; padding: 14px;
    background: #0b0e13; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 60px -20px #000;
  }
  .menu-open .nav a { padding: 14px 16px; font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  .w > span { transform: none; }
  .js .media-reveal, .js .media-reveal img { clip-path: none; transform: none; }
  .spot { display: none; }
}
