/* ==========================================================================
   Reclamation.tn — feuille de style principale
   Identité : rouge tunisien, bleu nuit, vert « résolu ». FR (LTR) + AR (RTL).
   ========================================================================== */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url("../fonts/inter-800.woff2") format("woff2"); }
@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url("../fonts/tajawal-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Tajawal"; font-weight: 500; font-display: swap; src: url("../fonts/tajawal-500.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url("../fonts/tajawal-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Tajawal"; font-weight: 800; font-display: swap; src: url("../fonts/tajawal-800.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --red: #D90012;
  --red-dark: #B00010;
  --red-soft: #FDE8EA;
  --navy: #0B1F3A;
  --navy-2: #152C4F;
  --ink: #0B1F3A;
  --ink-2: #2A3446;
  --muted: #5B6577;
  --line: #D9DCE3;
  --line-soft: #EEF0F4;
  --bg: #F6F5F1;
  --card: #FFFFFF;
  --green: #15803D;
  --green-soft: #E8F5EC;
  --amber: #B45309;
  --amber-soft: #FEF3C7;
  --blue: #1D4ED8;
  --blue-soft: #E5EDFF;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 2px 8px rgba(11, 31, 58, .05);
  --font: "Inter", "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "Tajawal", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); padding-bottom: 0; }
[dir="rtl"] body, [lang="ar"] { font-family: var(--font-ar); }
[dir="rtl"] body { font-size: 17px; }
img, svg { max-width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 6px; }
.ic { flex: none; vertical-align: middle; }
.ar { font-family: var(--font-ar); }
.red { color: var(--red); }
.green { color: var(--green); }
.amber { color: var(--amber); }
.muted { color: var(--muted); }
.muted-light { color: #C9D2E3; }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 16px; }
.page { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
.narrow { max-width: 680px; margin-inline: auto; }
.section { margin-top: 28px; }
.h1 { font-size: clamp(24px, 4vw, 32px); line-height: 1.15; letter-spacing: -.5px; margin: 0 0 8px; font-weight: 800; }
.h2 { font-size: 20px; margin: 0 0 14px; font-weight: 800; letter-spacing: -.2px; }
.h3 { font-size: 16px; margin: 0 0 12px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
[dir="rtl"] .h1, [dir="rtl"] .h2 { letter-spacing: 0; }
.page-head { margin-bottom: 20px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.lead-narrow { max-width: 620px; margin-inline: auto; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent; font: 700 15px/1 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, transform .05s, border-color .15s; white-space: nowrap; }
[dir="rtl"] .btn { font-family: var(--font-ar); font-size: 16px; }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #116B33; color: #fff; }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: #EEF1F6; color: var(--navy); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-lg { min-height: 54px; font-size: 16px; padding: 0 22px; border-radius: 16px; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.danger { color: var(--red-dark) !important; }
.btn.danger:hover { border-color: var(--red-dark); }

/* ---------- En-tête ---------- */
.site-header { background: rgba(246, 245, 241, .92); backdrop-filter: saturate(1.4) blur(10px); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line-soft); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 19px; font-weight: 800; letter-spacing: -.3px; font-family: "Inter", sans-serif; }
.brand-text small { font-size: 12px; color: var(--muted); margin-top: 3px; }
.brand-light { color: #fff; }
.brand-light:hover { color: #fff; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.main-nav a:hover, .main-nav a.active { background: #fff; color: var(--ink); }
.main-nav a.active { box-shadow: inset 0 -2px 0 var(--red); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.pill { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.dot { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.show-sm { display: none; }

/* ---------- Héros (accueil) ---------- */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset-inline-end: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .07); box-shadow: 0 0 0 60px rgba(255, 255, 255, .025), 0 0 0 120px rgba(255, 255, 255, .02); }
.hero::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 100%; height: 6px; background: linear-gradient(90deg, var(--red) 0 33%, #fff 33% 34%, var(--red) 34%); opacity: .9; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; padding-top: 56px; padding-bottom: 64px; position: relative; z-index: 1; align-items: center; }
.chip-light { display: inline-block; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.hero h1 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.05; letter-spacing: -1.2px; margin: 18px 0 14px; font-weight: 800; }
[dir="rtl"] .hero h1 { letter-spacing: 0; line-height: 1.25; }
.lead { font-size: 18px; color: #C9D2E3; max-width: 560px; margin: 0; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-search { margin-top: 22px; display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: 0 14px; max-width: 520px; color: #C9D2E3; }
.hero-search input[type="search"] { flex: 1; min-height: 50px; background: transparent; border: 0; color: #fff; font: inherit; outline: none; box-shadow: none; padding-inline: 0; }
.hero-search input::placeholder { color: #9AA8C0; }
.hero-steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius); padding: 16px; }
.step b { font-size: 16px; }
.step p { margin: 4px 0 0; color: #C9D2E3; font-size: 14px; }
.step-n { width: 44px; height: 44px; border-radius: 14px; background: var(--red); display: flex; align-items: center; justify-content: center; flex: none; }

/* ---------- Statistiques ---------- */
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.page-home .stats3 { margin-top: -28px; position: relative; z-index: 2; }
.stat { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: clamp(20px, 3vw, 28px); font-weight: 800; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }

/* ---------- Catégories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.cat { background: var(--card); border-radius: var(--radius); padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; text-decoration: none; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; min-height: 110px; justify-content: center; }
.cat:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(11, 31, 58, .1); color: var(--ink); }
.cat:hover .cat-ic { background: var(--red); color: #fff; }
.cat-ic { width: 48px; height: 48px; border-radius: 15px; background: #EEF1F6; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; transition: background .15s; }

/* ---------- Cartes de réclamation ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head a { font-size: 14px; font-weight: 600; }
.sec-head .h2, .sec-head .h3 { margin: 0; }
.cards { display: flex; flex-direction: column; gap: 12px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.ccard { display: flex; flex-direction: column; gap: 8px; background: var(--card); border-radius: var(--radius); padding: 18px; text-decoration: none; box-shadow: var(--shadow); border: 1px solid transparent; transition: border-color .15s; }
.ccard:hover { border-color: var(--line); color: var(--ink); }
.ccard h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.ccard p { margin: 0; font-size: 14px; }
.ccard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ccard-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.ccard-meta span { display: inline-flex; align-items: center; gap: 5px; }

.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.badge-red { background: var(--red-soft); color: #8A0010; }
.badge-green { background: var(--green-soft); color: #0F5F2D; }
.badge-amber { background: var(--amber-soft); color: #78350F; }
.badge-blue { background: var(--blue-soft); color: #1E3A8A; }
.badge-gray { background: #ECEEF2; color: #3B4556; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 8px; background: #EEF1F6; color: var(--ink-2); }
.tag-green { background: var(--green-soft); color: #0F5F2D; }
.tag-navy { background: var(--navy); color: #fff; }

/* ---------- Indice de confiance ---------- */
.trust-row { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; text-decoration: none; box-shadow: var(--shadow); }
.trust-row:hover { color: var(--ink); }
.trust-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.trust-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.trust-top b:first-child { display: inline-flex; align-items: center; gap: 4px; }
.avatar { width: 42px; height: 42px; border-radius: 12px; background: #EEF1F6; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex: none; font-family: "Inter", sans-serif; }
.avatar-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 19px; }
.avatar-xl { width: 80px; height: 80px; border-radius: 22px; font-size: 26px; background: var(--navy); color: #fff; }
.bar { display: block; height: 7px; border-radius: 4px; background: #EEF1F6; overflow: hidden; flex: 1; }
.bar > span { display: block; height: 100%; border-radius: 4px; }
.bar .trust-good { background: var(--green); }
.bar .trust-mid { background: var(--amber); }
.bar .trust-bad { background: var(--red); }
.bar .heat { background: var(--red); }
b.trust-good, .co-score.trust-good { color: var(--green); background: none; }
b.trust-mid, .co-score.trust-mid { color: var(--amber); }
b.trust-bad, .co-score.trust-bad { color: var(--red-dark); }
.trust-none { color: var(--muted); }
.mini-rank { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; font-size: 14px; }
.mini-rank:last-of-type { border-bottom: 0; }

.promo { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: var(--radius); padding: 18px; margin-top: 12px; box-shadow: var(--shadow); color: var(--green); }
.promo b { color: var(--ink); font-size: 15px; }
.promo p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.promo-dark { background: var(--navy); color: #fff; }
.promo-dark b { color: #fff; }
.promo-dark p { color: #C9D2E3; }
.promo-dark a { color: #fff; font-weight: 700; font-size: 14px; display: inline-block; margin-top: 8px; }

.empty { background: var(--card); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: var(--shadow); }
.empty.small { padding: 22px 16px; }
.empty p { margin: 0; }

/* ---------- Formulaires ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card-dark { background: var(--navy); color: #fff; }
.form fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.form legend { font-weight: 800; font-size: 17px; margin-bottom: 4px; padding: 0; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], input[type="search"], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6577' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-inline-end: 36px; }
[dir="rtl"] select { background-position: left 14px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11, 31, 58, .12); }
input:disabled { background: #F2F3F6; color: var(--muted); }
.input-xs { max-width: 90px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.label-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.label-row label { margin-bottom: 6px; }
.tools { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; background: #F7F8FA; border-radius: var(--radius-sm); padding: 12px 14px; margin: 10px 0 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--red); flex: none; }
.check span { display: flex; flex-direction: column; gap: 2px; }
.check span.plain { display: block; }
.check small { color: var(--muted); font-size: 13px; font-weight: 400; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin: 8px 0; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--red); }
.dropzone { display: flex; align-items: center; gap: 14px; border: 2px dashed #B8BECB; border-radius: var(--radius); padding: 18px; cursor: pointer; background: #FAFAFB; margin-top: 10px; position: relative; }
.dropzone:hover, .dropzone.drag { border-color: var(--navy); background: #F2F4F8; }
.dropzone span { display: flex; flex-direction: column; }
.dropzone small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.file-list li { background: #F2F4F8; border-radius: 10px; padding: 8px 12px; display: flex; justify-content: space-between; gap: 8px; }
.file-list li.bad { background: var(--red-soft); color: #8A0010; }
.voice-hint { background: var(--blue-soft); color: #1E3A8A; border-radius: 10px; padding: 10px 12px; }
[data-voice].recording { background: var(--red); color: #fff; border-color: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 0, 18, .45); } 50% { box-shadow: 0 0 0 8px rgba(217, 0, 18, 0); } }
@media (prefers-reduced-motion: reduce) { [data-voice].recording { animation: none; } html { scroll-behavior: auto; } }

.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-size: 15px; }
.alert ul { margin: 0; padding-inline-start: 18px; }
.alert-success { background: var(--green-soft); color: #0F5F2D; }
.alert-error { background: var(--red-soft); color: #8A0010; }
.alert-info { background: var(--blue-soft); color: #1E3A8A; }
.alert-warn { background: var(--amber-soft); color: #78350F; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; text-decoration: none; margin-bottom: 12px; }
[dir="rtl"] .back .ic, [dir="rtl"] .btn .ic[data-flip], [dir="rtl"] .btn-lg .ic:last-child { transform: scaleX(-1); }

/* ---------- Fiche réclamation ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.ticket { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.ticket-head { padding: 24px 24px 18px; }
.ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.ref { font-size: 12.5px; font-weight: 800; color: var(--muted); letter-spacing: .5px; font-family: "Inter", sans-serif; }
.ticket-cut { height: 16px; background: radial-gradient(circle at 8px 8px, var(--bg) 7px, transparent 7.5px) 0 0 / 18px 16px repeat-x; }
.ticket-body { padding: 18px 24px 22px; }
.prose { white-space: normal; overflow-wrap: anywhere; }
.expected { background: #F7F8FA; border-inline-start: 4px solid var(--green); border-radius: 10px; padding: 12px 14px; margin-top: 16px; }
.expected p { margin: 4px 0 0; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.file { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: #EEF1F6; text-decoration: none; font-size: 14px; font-weight: 600; }
.contact-box { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: #5B2A07; }
.contact-box p { margin: 4px 0 0; }
.ticket-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); }
.ticket-stats div { padding: 14px 24px; display: flex; flex-direction: column; }
.ticket-stats span { font-size: 12px; color: var(--muted); }
.ticket-stats b { font-size: 18px; }
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border-inline-start: 4px solid var(--line); }
.msg-company { border-inline-start-color: var(--navy); }
.msg-admin { border-inline-start-color: var(--amber); }
.msg-citizen { border-inline-start-color: var(--red); }
.msg-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 14px; }
.reply { margin-top: 16px; }
.reply-row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.reply-row select { flex: 1; min-width: 160px; }
.side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 88px; }
.side .card + .card { margin-top: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline li.done:not(:last-child)::before { background: var(--green); }
.tl-dot { width: 28px; height: 28px; border-radius: 14px; border: 2px solid #C3C8D3; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; color: #fff; position: relative; z-index: 1; }
.timeline li.done .tl-dot { background: var(--green); border-color: var(--green); }
.timeline li.now .tl-dot { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.timeline li.now .tl-dot::after { content: ""; width: 10px; height: 10px; border-radius: 5px; background: var(--red); }
.tl-text { display: flex; flex-direction: column; font-size: 14px; }
.timeline li:not(.done):not(.now) .tl-text b { color: var(--muted); }
.tl-text small { color: var(--muted); font-size: 12.5px; }
.stars { display: flex; flex-direction: row-reverse; justify-content: center; gap: 2px; margin-bottom: 12px; }
.stars input { position: absolute; opacity: 0; }
.stars label { margin: 0; cursor: pointer; color: #C3C8D3; padding: 4px; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #F59E0B; }
.stars label svg { fill: currentColor; }
.stars input:focus-visible + label { outline: 3px solid var(--red); border-radius: 6px; }
[dir="rtl"] .stars { flex-direction: row-reverse; }

/* ---------- Filtres, listes ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; margin-bottom: 18px; }
.filters select { width: auto; min-width: 150px; flex: 1; }
.search-input { flex: 2 1 240px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 12px; background: #fff; color: var(--muted); }
.search-input:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11, 31, 58, .12); }
.search-input input { border: 0; box-shadow: none !important; padding-inline: 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 14px; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Entreprises ---------- */
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.co-card { background: var(--card); border-radius: var(--radius); padding: 20px 16px; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; box-shadow: var(--shadow); border: 1px solid transparent; }
.co-card:hover { border-color: var(--line); color: var(--ink); }
.co-name { font-weight: 800; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.co-score { font-weight: 800; font-size: 18px; }
.verified { color: var(--green); }
.co-hero { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.co-hero-text { flex: 1; min-width: 240px; }
.co-hero-text p { margin: 12px 0 0; }
.co-hero-cta { display: flex; flex-direction: column; gap: 8px; }
.trust-panel { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
.trust-score { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.trust-score .big { font-size: 56px; line-height: 1; font-weight: 800; font-family: "Inter", sans-serif; }
.trust-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.claim + .claim { margin-top: 0; }

/* ---------- Carte ---------- */
.gov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 18px; }
.gov { background: var(--card); border-radius: 14px; padding: 14px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.gov:hover { color: var(--ink); box-shadow: 0 6px 18px rgba(11, 31, 58, .1); }
.gov-top { display: flex; justify-content: space-between; font-weight: 700; }

/* ---------- Authentification ---------- */
.auth { display: flex; justify-content: center; padding: 20px 0; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .center { margin: 18px 0 0; font-size: 14px; }

/* ---------- Notifications ---------- */
.notif-list { padding: 6px 0; }
.notif { display: flex; justify-content: space-between; gap: 12px; padding: 14px 20px; text-decoration: none; border-bottom: 1px solid var(--line-soft); }
.notif:last-child { border-bottom: 0; }
.notif.unread { font-weight: 700; background: #FBFBFC; }
.notif.unread::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--red); flex: none; margin-top: 8px; }

/* ---------- Tarifs ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { background: var(--card); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; }
.plan li .ic { color: var(--green); margin-top: 3px; }
.price { font-size: 30px; font-weight: 800; margin: 0 0 18px; }
.plan-pro { background: var(--navy); color: #fff; }
.plan-pro li .ic { color: #6EE7A0; }
.plan-badge { position: absolute; top: -12px; inset-inline-end: 20px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }

/* ---------- Pages de texte ---------- */
.prose-page h2 { font-size: 19px; margin: 28px 0 8px; }
.prose-page p, .prose-page li { color: var(--ink-2); }
.prose-page ul { padding-inline-start: 20px; }
.lead-dark { font-size: 18px; }
.error-page { margin: 40px auto; max-width: 520px; }
.err-code { font-size: 72px; color: var(--red); line-height: 1; font-family: "Inter", sans-serif; }
.danger-zone { margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.danger-zone summary { cursor: pointer; color: var(--red-dark); font-weight: 700; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: #FAFAFB; white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table input:not([type="checkbox"]), .table select { min-height: 40px; padding: 6px 10px; }
.table select { width: auto; }
.row-muted { opacity: .6; }
.hbar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.hbar b { text-align: end; }
.hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Administration ---------- */
.admin { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.admin-nav { background: var(--card); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; position: sticky; top: 88px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.admin-nav a:hover { background: #F2F4F8; }
.admin-nav a.active { background: var(--navy); color: #fff; }
.admin-nav .count { margin-inline-start: auto; background: var(--red); color: #fff; font-size: 11px; min-width: 22px; height: 22px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.admin-main { min-width: 0; }
.vchart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.vbar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.vbar > span { width: 100%; max-width: 28px; background: var(--red); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.vbar small { font-size: 11px; color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.checklist li { display: flex; align-items: center; gap: 8px; }
.checklist .ok { color: var(--green); }
.checklist .ko { color: var(--amber); }
.bulk-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.bulk-bar select { width: auto; min-width: 200px; }
code { background: #EEF1F6; border-radius: 6px; padding: 2px 6px; font-size: 13px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--navy); color: #fff; padding: 44px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 28px; }
.footer-grid h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .6px; color: #9AA8C0; margin: 4px 0 12px; }
[dir="rtl"] .footer-grid h2 { letter-spacing: 0; }
.footer-grid a:not(.brand) { display: block; color: #E3E8F1; text-decoration: none; padding: 5px 0; font-size: 15px; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-grid p { font-size: 14px; max-width: 320px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 28px; padding-top: 18px; padding-bottom: 22px; font-size: 13px; color: #9AA8C0; }

/* ---------- Navigation mobile ---------- */
.bottom-nav { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; }
  .admin-nav a { white-space: nowrap; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-top: 36px; padding-bottom: 54px; gap: 26px; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .show-sm { display: inline-flex; }
  .hide-sm { display: none; }
  .main-nav { display: none; position: absolute; top: 100%; inset-inline: 0; background: #fff; flex-direction: column; padding: 10px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: 0 10px 20px rgba(11, 31, 58, .08); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 12px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; bottom: 0; inset-inline: 0; background: #fff; border-top: 1px solid var(--line); padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); z-index: 60; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; }
  .bottom-nav a.active { color: var(--red); }
  .bottom-nav .bn-cta { width: 56px; height: 56px; margin: -22px auto 0; border-radius: 28px; background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(217, 0, 18, .35); min-height: 0; }
  body { padding-bottom: 76px; }
  .site-footer { padding-bottom: 10px; }
  .trust-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .page { padding-top: 16px; }
  .card { padding: 18px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cat { min-height: 96px; padding: 12px 6px; font-size: 12.5px; }
  .cat-ic { width: 42px; height: 42px; }
  .stats3 { gap: 8px; }
  .stat { padding: 12px; }
  .stat span { font-size: 12px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .cards-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn { width: 100%; }
  .brand-text small { display: none; }
  .header-row { gap: 8px; }
  .ticket-head, .ticket-body { padding-inline: 18px; }
  .ticket-stats div { padding: 12px 14px; }
  .filters select { min-width: 0; flex: 1 1 45%; }
  .filters .btn { flex: 1 1 100%; }
  .co-hero-cta { width: 100%; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .site-header, .bottom-nav, .site-footer, .side, .reply, .back { display: none !important; }
  body { background: #fff; padding: 0; }
  .detail-grid { display: block; }
}
