/* ==========================================================================
   Traitement Cafard - Feuille de style principale
   Thème : rouge (#E30613) / noir / blanc
   ========================================================================== */

:root {
  --red: #e30613;
  --red-dark: #b0040f;
  --red-light: #ff2a38;
  --red-soft: #fdecee;
  --dark: #111418;
  --dark-2: #1b1f26;
  --text: #23262b;
  --muted: #5b6169;
  --white: #ffffff;
  --gray: #f4f5f7;
  --gray-2: #eef0f3;
  --border: #e3e6ea;
  --success: #1a9e5c;
  --star: #f6a609;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(17, 20, 24, .08);
  --shadow-lg: 0 24px 60px rgba(17, 20, 24, .16);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
}

img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--dark); line-height: 1.2; margin: 0 0 .6em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem); }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--gray { background: var(--gray); }
.section--tight { padding: 40px 0; }
.center { text-align: center; }
.lead { font-size: 1.12rem; color: var(--muted); }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--dark); color: #fff;
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--dark); color: #cfd3d9; font-size: .85rem; padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.topbar a { color: #fff; font-weight: 600; }
.topbar span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200; background: rgba(255,255,255,.97);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 52px; width: auto; }
.brand-text { font-weight: 900; letter-spacing: .5px; color: var(--dark); font-size: 1.05rem; line-height: 1; }
.brand-text small { display: block; font-size: .62rem; letter-spacing: 4px; color: var(--red); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav > li { list-style: none; }
.nav a {
  color: var(--dark); font-weight: 600; padding: 10px 13px; border-radius: 8px;
  font-size: .95rem;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--red-soft); color: var(--red-dark); text-decoration: none; }

.has-drop { position: relative; }
.has-drop > a::after { content: "▾"; font-size: .7em; margin-left: 6px; color: var(--red); }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 8px; display: none; grid-template-columns: 1fr;
}
.has-drop:hover .dropdown, .has-drop:focus-within .dropdown { display: grid; }
.dropdown a { display: block; padding: 9px 12px; font-weight: 500; color: var(--text); }
.dropdown a:hover { background: var(--gray); color: var(--red-dark); }

.header-cta { display: flex; align-items: center; gap: 10px; }
.header-phone { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--dark); white-space: nowrap; }
.header-phone small { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .5px; }

.nav-toggle {
  display: none; background: var(--red); border: 0; color: #fff; width: 46px; height: 46px;
  border-radius: 10px; cursor: pointer; font-size: 1.4rem; line-height: 1;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px; font-weight: 700; font-size: .97rem;
  cursor: pointer; border: 2px solid transparent; transition: .18s ease; text-decoration: none;
  white-space: nowrap; text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--dark { background: var(--dark); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--ghost { background: transparent; border-color: var(--red); color: var(--red); }
.btn--ghost:hover { background: var(--red); color: #fff; }
.btn--white { background: #fff; color: var(--red-dark); }
.btn--block { width: 100%; }
.btn-note { font-size: .8rem; color: var(--muted); margin-top: 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, rgba(17,20,24,.92) 0%, rgba(17,20,24,.78) 45%, rgba(227,6,19,.82) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("../../IMAGES/cafards.webp");
  background-size: cover; background-position: center; opacity: .22; z-index: 0;
}
.hero .container { position: relative; z-index: 1; padding-top: 70px; padding-bottom: 70px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero p { color: #e9eaec; font-size: 1.15rem; max-width: 620px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.hero-badges li {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  padding: 8px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-card {
  background: #fff; color: var(--text); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-lg);
}
.hero-card h2 { font-size: 1.25rem; margin-bottom: .3em; }
.hero-card ul { list-style: none; margin: 0 0 18px; padding: 0; }
.hero-card li { padding: 9px 0 9px 30px; position: relative; border-bottom: 1px dashed var(--border); font-weight: 500; }
.hero-card li:last-child { border-bottom: 0; }
.hero-card li::before { content: "✓"; position: absolute; left: 0; top: 9px; color: var(--success); font-weight: 900; }

/* ---------- Trust bar ---------- */
.trustbar { background: var(--dark); color: #fff; padding: 16px 0; }
.trustbar .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.trust-item { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem; }
.trust-item img { height: 40px; width: auto; }
.trust-item--cert img { height: 46px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 18px; text-align: center; }
.stat b { display: block; font-size: 2.4rem; color: var(--red); line-height: 1; font-weight: 900; }
.stat span { color: var(--muted); font-size: .9rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.12rem; margin-bottom: .4em; }
.card-body p { color: var(--muted); font-size: .95rem; margin-bottom: 1em; }
.card-body .btn { margin-top: auto; align-self: flex-start; }

.usp { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.usp .ico {
  width: 54px; height: 54px; border-radius: 14px; background: var(--red-soft); color: var(--red);
  display: grid; place-items: center; font-size: 1.6rem; font-weight: 900; margin-bottom: 14px;
}
.usp h3 { font-size: 1.1rem; }
.usp p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 22px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -18px; left: 22px; width: 42px; height: 42px; border-radius: 50%;
  background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.1rem;
  box-shadow: 0 6px 16px rgba(227,6,19,.4);
}
.step h3 { margin-top: 14px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---------- Content page ---------- */
.page-head { background: var(--dark); color: #fff; padding: 46px 0; }
.page-head h1 { color: #fff; margin: 0; }
.breadcrumb { font-size: .85rem; color: #aeb3ba; margin-bottom: 12px; }
.breadcrumb a { color: #fff; }
.breadcrumb span { color: var(--red-light); }

.content-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 44px; align-items: start; }
.prose { font-size: 1.02rem; }
.prose h2 { margin-top: 1.8em; padding-top: .2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .6em; }
.prose img {
  border-radius: var(--radius); margin: 1.4em auto; box-shadow: var(--shadow);
  max-width: min(100%, 560px); height: auto;
}
.prose figure { margin: 1.4em 0; }

/* Grille de liens (arrondissements, guides) */
.link-grid {
  list-style: none; padding: 0; margin: 1.5em 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px;
}
.link-grid li { margin: 0; }
.link-grid li a {
  display: block; padding: 11px 15px; background: var(--gray); border: 1px solid var(--border);
  border-radius: 10px; font-weight: 600; color: var(--dark); font-size: .95rem;
}
.link-grid li a:hover { background: var(--red-soft); border-color: var(--red); color: var(--red-dark); text-decoration: none; }
.link-grid--wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.link-grid--wide li a { text-align: center; }
.prose strong { color: var(--dark); }

.callout {
  background: var(--red-soft); border-left: 5px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px; margin: 1.6em 0; font-weight: 600;
}
.cta-inline {
  background: var(--dark); border-radius: var(--radius); padding: 26px; margin: 1.8em 0; color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between;
}
.cta-inline p { margin: 0; font-weight: 700; font-size: 1.08rem; color: #fff; }
.cta-inline .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.sidebar { position: sticky; top: 100px; display: grid; gap: 20px; }
.side-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.side-card h3 { font-size: 1.05rem; margin-bottom: .7em; }
.side-card ul { list-style: none; margin: 0; padding: 0; }
.side-card li { border-bottom: 1px solid var(--border); }
.side-card li:last-child { border-bottom: 0; }
.side-card li a { display: block; padding: 9px 0 9px 20px; position: relative; color: var(--text); font-weight: 500; }
.side-card li a::before { content: "→"; position: absolute; left: 0; color: var(--red); }
.side-card li a:hover { color: var(--red); text-decoration: none; }
.side-card--accent { background: var(--red); color: #fff; border-color: var(--red); }
.side-card--accent h3, .side-card--accent p { color: #fff; }
.side-card--accent .btn { margin-top: 10px; }

/* ---------- Reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.review { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--red); color: #fff;
  display: grid; place-items: center; font-weight: 800; flex: 0 0 auto;
}
.review-head b { display: block; font-size: .95rem; }
.stars { color: var(--star); letter-spacing: 2px; font-size: .95rem; }
.review p { font-size: .93rem; color: var(--muted); margin: .4em 0 0; }
.rating-summary { display: flex; align-items: center; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.rating-summary .score { font-size: 3rem; font-weight: 900; color: var(--dark); line-height: 1; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; }
.faq details {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--dark);
  list-style: none; position: relative; padding-right: 50px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--red); font-size: 1.5rem; font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .faq-a { padding: 16px 22px; color: var(--muted); }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--red) 0%, var(--red-dark) 100%); color: #fff; }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; padding: 42px 20px; }
.cta-band h2 { color: #fff; margin: 0 0 .2em; }
.cta-band p { margin: 0; color: #ffe1e4; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #b9bec6; padding: 56px 0 0; font-size: .94rem; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 40px; }
.site-footer a { color: #d6dae0; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55em; }
.footer-about img { height: 46px; width: auto; margin-bottom: 14px; border-radius: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .84rem; }
.footer-links a { margin-right: 14px; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.footer-social a:hover { background: var(--red); }

/* ---------- Floating call button (mobile) ---------- */
.floating-call {
  position: fixed; right: 16px; bottom: 16px; z-index: 150;
  background: var(--red); color: #fff; border-radius: 999px; padding: 14px 20px;
  font-weight: 800; box-shadow: var(--shadow-lg); display: none; align-items: center; gap: 8px;
}
.floating-call:hover { text-decoration: none; background: var(--red-dark); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 500;
  max-width: 1080px; margin: 0 auto;
  background: #fff; border: 1px solid var(--border); border-top: 5px solid var(--red);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 22px 24px; display: none; gap: 20px; align-items: center; flex-wrap: wrap;
}
.cookie-banner.is-visible { display: flex; animation: cookieIn .35s ease; }
@keyframes cookieIn { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cookie-banner .cookie-text { flex: 1 1 420px; }
.cookie-banner h3 { margin: 0 0 .3em; font-size: 1.05rem; }
.cookie-banner p { margin: 0; font-size: .9rem; color: var(--muted); }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .cookie-actions .btn { padding: 11px 18px; font-size: .9rem; }

.cookie-prefs { position: fixed; inset: 0; z-index: 600; display: none; }
.cookie-prefs.is-visible { display: block; }
.cookie-prefs__overlay { position: absolute; inset: 0; background: rgba(17,20,24,.6); }
.cookie-prefs__panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(460px, 100%); background: #fff;
  padding: 28px; overflow-y: auto; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
}
.cookie-prefs__panel h2 { font-size: 1.4rem; }
.cookie-cat { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 14px; }
.cookie-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cookie-cat__head b { display: block; }
.cookie-cat p { font-size: .87rem; color: var(--muted); margin: .6em 0 0; }
.cookie-prefs__footer { margin-top: auto; display: grid; gap: 10px; padding-top: 20px; }

.switch { position: relative; width: 48px; height: 27px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: #c9cdd3; border-radius: 999px; transition: .2s; cursor: pointer;
}
.switch .slider::before {
  content: ""; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px; background: #fff;
  border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--red); }
.switch input:checked + .slider::before { transform: translateX(21px); }
.switch input:disabled + .slider { background: var(--success); cursor: not-allowed; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.section-title { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section-title p { color: var(--muted); margin: .5em 0 0; }
.eyebrow { color: var(--red); font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; font-size: .8rem; margin-bottom: .6em; display: block; }
.tag { display: inline-block; background: var(--red-soft); color: var(--red-dark); font-weight: 700; font-size: .75rem; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.list-check { list-style: none; padding: 0; }
.list-check li { position: relative; padding-left: 30px; margin-bottom: .6em; }
.list-check li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 900; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.two-col img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .content-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero-grid { grid-template-columns: 1fr; }
  .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 300;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 14px 18px 26px; gap: 2px; box-shadow: var(--shadow-lg); display: none;
    max-height: calc(100vh - 80px); overflow-y: auto; border-bottom: 3px solid var(--red);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 10px; }
  .dropdown { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 6px 14px; min-width: 0; }
  .has-drop:hover .dropdown { display: none; }
  .has-drop.is-open .dropdown { display: grid; }
  .has-drop.is-open > a { background: var(--red-soft); color: var(--red-dark); }
  .has-drop > a::after { content: " +"; }
  .has-drop.is-open > a::after { content: " –"; }
  .dropdown a { padding: 9px 10px; font-size: .92rem; border-left: 2px solid var(--border); }
  .dropdown a:hover { border-left-color: var(--red); }
  .header-cta .btn { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .section { padding: 46px 0; }
  .btn { white-space: normal; }
  .link-grid { grid-template-columns: 1fr 1fr; }
  .grid-4, .steps, .stats, .reviews, .footer-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; padding: 18px; }
  .cookie-banner .cookie-actions { width: 100%; }
  .cookie-banner .cookie-actions .btn { flex: 1 1 auto; }
  .floating-call { display: inline-flex; }
  .footer-bottom .container { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
