/* =====================================================================
   France CDS — Design system (light modern + accent corail)
   Remplace Bootstrap + les anciens CSS. Réimplémente les utilitaires
   nécessaires aux templates + redessine tous les composants.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --border: #e6e9ef;
  --border-strong: #d3d8e2;

  --text: #1f2733;
  --text-muted: #5a6473;
  --text-soft: #8b94a3;

  --accent: #d32f3a;          /* rouge */
  --accent-strong: #a51f2a;   /* rouge foncé (hover) */
  --accent-soft: #fdeaeb;
  --accent-ring: rgba(211, 47, 58, .24);
  --on-accent: #ffffff;       /* texte blanc sur fond rouge */

  --danger: #e5484d;
  --danger-soft: #fdecec;
  --success: #1f9d57;
  --success-soft: #e8f7ee;
  --warning: #c77d12;
  --warning-soft: #fdf3e0;
  --info: #2f6fed;
  --info-soft: #ecf1fe;

  --amber: #f0a84b;
  --amber-strong: #e0902f;

  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --pill: 6px;          /* ex-pilule -> rectangle à coins légers (look forum) */

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow: 0 4px 14px rgba(16, 24, 40, .07), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-lg: 0 14px 40px rgba(16, 24, 40, .12);

  --nav-h: 64px;
  --maxw: 1080px;

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  padding-top: var(--nav-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--accent-strong); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }
h1, h2, h3, h4, h5 { line-height: 1.25; font-weight: 600; color: var(--text); }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
p { margin: 0 0 2px; }

::selection { background: var(--accent-ring); }

/* ---------- Layout shell ---------- */
.body-footer { flex: 1 0 auto; width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 18px;
}

/* ---------- Grid (remplace Bootstrap) ---------- */
.row { display: flex; flex-wrap: wrap; margin-inline: -12px; }
.row > * { padding-inline: 12px; }
.row-fluid { display: block; }
.margin-row { margin-inline: 0; }

.col { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }

[class*="col-"] { width: 100%; }

.col-1{flex:0 0 8.3333%;max-width:8.3333%}
.col-2{flex:0 0 16.6667%;max-width:16.6667%}
.col-3{flex:0 0 25%;max-width:25%}
.col-4{flex:0 0 33.3333%;max-width:33.3333%}
.col-5{flex:0 0 41.6667%;max-width:41.6667%}
.col-6{flex:0 0 50%;max-width:50%}
.col-7{flex:0 0 58.3333%;max-width:58.3333%}
.col-8{flex:0 0 66.6667%;max-width:66.6667%}
.col-9{flex:0 0 75%;max-width:75%}
.col-10{flex:0 0 83.3333%;max-width:83.3333%}
.col-11{flex:0 0 91.6667%;max-width:91.6667%}
.col-12{flex:0 0 100%;max-width:100%}

@media (min-width: 576px) {
  .col-sm-1{flex:0 0 8.3333%;max-width:8.3333%}
  .col-sm-2{flex:0 0 16.6667%;max-width:16.6667%}
  .col-sm-6{flex:0 0 50%;max-width:50%}
  .col-sm-10{flex:0 0 83.3333%;max-width:83.3333%}
  .col-sm-12{flex:0 0 100%;max-width:100%}
}

.offset-1{margin-left:8.3333%}

@media (min-width: 768px) {
  .col-md-1{flex:0 0 8.3333%;max-width:8.3333%}
  .col-md-2{flex:0 0 16.6667%;max-width:16.6667%}
  .col-md-3{flex:0 0 25%;max-width:25%}
  .col-md-4{flex:0 0 33.3333%;max-width:33.3333%}
  .col-md-5{flex:0 0 41.6667%;max-width:41.6667%}
  .col-md-7{flex:0 0 58.3333%;max-width:58.3333%}
  .col-md-11{flex:0 0 91.6667%;max-width:91.6667%}
  .col-md-12{flex:0 0 100%;max-width:100%}
  .offset-md-0{margin-left:0}
}

/* ---------- Utilities (remplace Bootstrap) ---------- */
.d-flex{display:flex}
.d-none{display:none}
.justify-content-center{justify-content:center}
.align-items-start{align-items:flex-start}
.align-items-center{align-items:center}
@media (min-width:768px){ .d-md-block{display:block} }

.text-center,.center{text-align:center}
.text-end,.text-al-right,.text-align-r{text-align:right}
.text-start,.text-left{text-align:left}
.text-capitalize{text-transform:capitalize}
.text-white{color:#fff !important}
.text-dark,.black{color:var(--text) !important}
.color-white{color:#fff}
.color-light{color:var(--text-muted)}
.bold{font-weight:700}
.upper::first-letter{text-transform:capitalize}
.s-14{font-size:14px}
.text-decoration-none,.no-decoration:hover{text-decoration:none}

.w-100{width:100%}
.float-right{float:right}
.float-left{float:left}

.rounded-circle{border-radius:50%}
.border-radius{border-radius:var(--radius-xs)}
.rounded-top{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}
.bdr{border-radius:var(--radius-sm);overflow:hidden}

/* marges / paddings */
.mt-1{margin-top:.35rem}.mt-2{margin-top:.6rem}.mt-3{margin-top:1rem}.mt-4{margin-top:1.5rem}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:.35rem}.mb-2{margin-bottom:.6rem}.mb-3{margin-bottom:1rem}.mb-5{margin-bottom:3rem}
.ms-0{margin-left:0}.ms-1{margin-left:.35rem}.ms-2{margin-left:.6rem}
.me-auto{margin-right:auto}
.pt-2{padding-top:.6rem}.pt-4{padding-top:1.5rem}
.m-t-15,.m-t-30{margin-top:15px}.m-t-30{margin-top:30px}
.m-b-15,.margin-bottom-15{margin-bottom:15px}
.ml-20{margin-left:20px}
.m-r-10{margin-right:15px}
.padding-all{padding:5px 9px}
.danger-size{display:inline-block}

/* ---------- Navbar ---------- */
.site-nav, .custom-navbar, .navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav .nav-inner {
  max-width: var(--maxw);
  height: 100%;
  margin-inline: auto;
  padding-inline: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 1.05rem; }
.nav-brand img { width: 34px; height: 34px; }
.nav-brand .brand-text { background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a { color: var(--text-muted); font-weight: 500; padding: 8px 12px; border-radius: var(--pill); }
.nav-links a:not(.nav-cta):hover { color: var(--text); background: var(--bg); }
.nav-cta {
  background: var(--accent);
  color: var(--on-accent) !important; font-weight: 700;
  padding: 9px 18px !important; border-radius: var(--pill) !important;
  box-shadow: 0 6px 16px var(--accent-ring);
}
.nav-cta:hover { color: var(--on-accent) !important; background: var(--accent-strong); filter: brightness(1.05); }

/* ---------- Breadcrumb ---------- */
.wrapp-path {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 14px 0; color: var(--text-soft); font-size: 13px;
}
.wrapp-path a { color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.wrapp-path a:hover { color: var(--accent-strong); }
.wrapp-path i.fa-chevron-left { font-size: 10px; color: var(--text-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1;
  padding: 8px 14px; border: 1px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; transition: all .15s ease; text-decoration: none;
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
}
.btn:hover { background: var(--bg); }
.btn-lg { padding: 9px 16px; font-size: 14px; }
.btn a, a.btn { color: inherit; text-decoration: none; }

/* primaire (ex-btn-blue) → or */
.btn-blue {
  background: var(--accent);
  color: var(--on-accent); border-color: transparent; font-weight: 700;
  box-shadow: 0 6px 16px var(--accent-ring);
}
.btn-blue:hover, .btn-blue a:hover { background: var(--accent-strong); color: var(--on-accent); filter: brightness(1.05); }
/* sur fond or, garder un texte sombre même si .text-white est présent dans le markup */
.btn-blue.text-white, .nav-cta.text-white { color: var(--on-accent) !important; }

.btn-moderator { background: var(--amber); color: #fff; border-color: transparent; }
.btn-moderator:hover { background: var(--amber-strong); color: #fff; }
.btn-moderator-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn-moderator-danger:hover { background: #c93a3f; color: #fff; }
.btn-info { background: var(--info); color: #fff; border-color: transparent; }
.btn-info:hover { background: #2257c9; }
.btn-info a, .btn-info a:hover { color: #fff; }
.btn-dark, .btn-all { background: var(--text); color: #fff; border-color: transparent; }
.btn-dark:hover { filter: brightness(1.15); }

/* badges statut connecté/déconnecté */
.btn-std, .connect, .btn-stdnh {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--pill); color: #fff;
}
.connect { background: var(--success); }
.btn-std, .btn-stdnh { background: var(--text-soft); }

.wrapp-button { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.wrapp-button .btn { margin: 0; }

/* ---------- Forum / Section headers ---------- */
.forum-block h1 {
  font-size: 1rem; font-weight: 700; color: var(--on-accent);
  padding: 10px 16px; margin: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--accent);
  letter-spacing: .2px;
}
.wrapp-forum { margin-bottom: 16px; box-shadow: var(--shadow-sm); border-radius: var(--radius); overflow: hidden; }
.wrapp-pin { margin-bottom: 14px; }

/* Section row (carte) */
.section-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 16px;
  margin-top: 8px;
  transition: box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.section-block:hover { border-color: var(--border-strong); background: var(--surface-2); }

/* quand les sections sont dans un wrapp-forum, on enchaîne sans double bord arrondi */
.wrapp-forum .section-block { border-radius: 0; border-top: 0; margin-top: 0; }
.wrapp-forum .section-block:first-of-type { border-top: 1px solid var(--border); }
.wrapp-forum .section-block:hover { transform: none; }

.description { font-size: 14px; line-height: 1.5; color: var(--text-muted); margin-top: 4px; }
.font-titre-topic { font-size: 15px; font-weight: 600; }
.font-username { font-size: 13px; color: var(--text-muted); }
.lastpost { padding-right: 8px; }
.last-m-first, .last-m-second { margin-bottom: 0; }
.max { max-width: 50px; min-width: 25px; color: var(--accent); }

/* ---------- Liste de sujets (section) ---------- */
.wrapp-section { margin-top: 4px; }
.forum-list {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.forum-list .forum-block h1 { border-radius: 0; }
.forum-list .forum-block h1 i { margin-right: 6px; opacity: .85; }

.topic-row {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 16px; border-top: 1px solid var(--border);
  transition: background .15s ease;
}
.topic-row:first-of-type { border-top: 0; }
.topic-row:hover { background: var(--surface-2); }
.topic-row.is-pinned { background: var(--accent-soft); }
.topic-row-icon {
  flex: 0 0 22px; align-self: flex-start; margin-top: 2px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--text-soft); font-size: 15px;
}
.topic-row.is-pinned .topic-row-icon > .fa-comment, .topic-row-icon .fa-lock, .topic-row-icon .fa-thumbtack { color: var(--accent); }
.topic-row-photo { font-size: 11px; color: var(--accent); }
.topic-row-main { flex: 1 1 auto; min-width: 0; }
.topic-row-title {
  display: block; font-weight: 600; font-size: 14.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topic-row-title:hover { color: var(--accent-strong); }
.topic-row-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }
.topic-row-meta a { color: var(--text-muted); }
.topic-row-meta a:hover { color: var(--accent-strong); }
.topic-row-replies { flex: 0 0 86px; text-align: center; font-size: 12px; color: var(--text-soft); }
.topic-row-replies strong { display: block; font-size: 15px; color: var(--text); font-weight: 700; }
.topic-row-stats { flex: 0 0 112px; text-align: center; font-size: 12.5px; color: var(--text-soft); line-height: 1.45; }
.topic-row-stats span { display: block; }
.topic-row-stats strong { color: var(--text); font-weight: 700; }
.topic-row-last { flex: 0 0 190px; display: flex; align-items: center; gap: 9px; }
.topic-row-last-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: 0 0 30px; background: var(--bg); }
.topic-row-last-info { font-size: 12px; line-height: 1.35; min-width: 0; }
.topic-row-last-info a { display: block; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-row-last-info a:hover { color: var(--accent-strong); }
.topic-row-last-info span { color: var(--text-soft); }
.topic-row-last-info a.topic-row-last-author { display: inline; font-weight: 600; color: var(--text-muted); overflow: visible; }
.topic-row-last-info a.topic-row-last-author:hover { color: var(--accent-strong); }
@media (max-width: 767px) {
  .topic-row-replies, .topic-row-stats { flex-basis: auto; }
  .topic-row-last { display: none; }
}

/* ---------- Avatars ---------- */
.avatar-user-forum, .avatar-user-section, .avatar-user-topic, .avatar-user, .avatar-himself {
  object-fit: cover; border-radius: 50%; background: var(--bg);
  border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--accent);
}
.avatar-user-forum { width: 40px; height: 40px; }
.avatar-user-section { width: 38px; height: 38px; }
.avatar-user-topic { width: 80px; height: 80px; box-shadow: 0 0 0 3px var(--accent); }
.avatar-user { width: 26px; height: 26px; }
.avatar-himself { width: 72px; height: 72px; box-shadow: 0 0 0 3px var(--accent); }

.pin-container {
  position: absolute; top: -8px; right: -6px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.pin-icon { width: 18px; height: 18px; }

/* ---------- Topic thread ---------- */
.wrapp-topic { margin-bottom: 30px; }
.header-topic .forum-block h1 { border-radius: var(--radius); margin-bottom: 4px; }

.thread-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.thread-block .row { margin-inline: 0; }
.thread-block .row > * { padding-inline: 0; }

.thread-user-block {
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  text-align: center;
}
.thread-user-block .username { font-size: 16px; font-weight: 600; margin: 6px 0 10px; word-break: break-word; }
.thread-user-block .avatar-user-topic { margin-inline: auto; }

.thread-message-block { padding: 15px 20px; }
.thread-message-block p { margin-bottom: 10px; }
.thread-message-block img { max-width: 100%; height: auto; border-radius: var(--radius-xs); }
.thread-user-signature { color: var(--text-muted); font-size: 13px; font-style: italic; }
.date-topic { font-size: 12px; color: var(--text-soft); }

.wrapp-like {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--pill);
  background: var(--accent-soft); color: var(--accent-strong) !important;
  font-size: 13px; font-weight: 600;
}
.wrapp-like:hover { background: var(--accent); color: var(--on-accent) !important; }

/* ---------- Fil de discussion (posts) ---------- */
.post {
  display: flex; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-top: 10px; box-shadow: var(--shadow-sm);
}
.post-side {
  flex: 0 0 168px; background: var(--surface-2); border-right: 1px solid var(--border);
  padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
}
.post-author { font-weight: 700; font-size: 15px; color: var(--text); word-break: break-word; line-height: 1.2; }
.post-author:hover { color: var(--accent-strong); }
.post-avatar {
  width: 74px; height: 74px; border-radius: 50%; object-fit: cover; margin: 3px 0;
  border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--accent); background: var(--bg);
}
.post-msgcount { font-size: 12px; color: var(--text-soft); }
.post-body { flex: 1 1 auto; min-width: 0; padding: 12px 18px 10px; display: flex; flex-direction: column; }
.post-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--border);
}
.post-head { justify-content: space-between; }
.post-date { font-size: 12px; color: var(--text-soft); display: inline-flex; align-items: center; gap: 6px; }
.post-edited { font-size: 11px; color: var(--text-soft); font-style: italic; }
.post-content { font-size: 14.5px; line-height: 1.6; word-wrap: break-word; }
.post-content p { margin-bottom: 10px; }
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius-xs); }
.post-signature { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border); color: var(--text-muted); font-size: 12.5px; font-style: italic; }
.post-note { font-size: 12px; color: var(--text-soft); margin-top: 8px; }

/* Pied de message : like à gauche, actions à droite */
.post-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.post-like {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: var(--pill);
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-muted); font-weight: 700; font-size: 13px; transition: all .15s ease;
}
.post-like i { color: var(--accent); }
.post-like:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.post-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.post-tool {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 13px; font-weight: 500; transition: all .15s ease;
}
.post-tool i { font-size: 12px; }
.post-tool:hover { background: var(--bg); color: var(--text); }
.post-tool-danger:hover { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 600px) {
  .post { flex-direction: column; }
  .post-side { flex-basis: auto; flex-direction: row; justify-content: flex-start; gap: 12px; text-align: left; border-right: 0; border-bottom: 1px solid var(--border); }
  .post-avatar { width: 44px; height: 44px; margin: 0; }
}

/* role badges */
.role { display: inline-block; padding: 3px 10px; border-radius: var(--pill); font-size: 11.5px; font-weight: 700; color: #fff; background: var(--text-soft); letter-spacing: .2px; }
.role-administrateur { background: #ef8c2e; }
.role-moderateur, .role-super-moderateur { background: #6aa84f; }
.role-membre { background: var(--text-soft); }

/* ---------- Cards génériques (profil, listes, légales…) ---------- */
.card-user {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 14px;
  box-shadow: var(--shadow-sm);
}
.card-user h1, .card-user h2 { font-size: 20px; }
.card-user h3 { font-size: 16px; margin-top: 18px; }
.container-user { margin-bottom: 10px; }
.wrapp-profil { margin-top: 6px; }
.block-listuser { background: var(--surface); }

/* titre souligné corail */
.titre-blue {
  display: inline-block; position: relative;
  padding-bottom: 8px; margin-bottom: 12px;
  font-weight: 600; font-size: 1.4rem;
}
.titre-blue::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 3px; border-radius: 3px;
  background: var(--accent);
}

/* liens neutres qui passent corail au survol */
.link-blue { color: var(--text); text-decoration: none; font-weight: 500; }
.link-blue:hover { color: var(--accent-strong); }
.link-color { color: var(--accent-strong); }
.link-color:hover { color: var(--accent); }
.link-short {
  display: inline-block; font-size: 13px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-strong);
  padding: 3px 12px; border-radius: var(--pill); text-decoration: none;
}
.link-short:hover { background: var(--accent); color: #fff; }
.link-no, .link-no:hover { color: #fff; }

/* ---------- Forms ---------- */
fieldset { border: 0; padding: 0; min-width: 0; }
.form-group { margin-bottom: 16px; }
label { display: inline-block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.form-check { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.form-check input[type="checkbox"] { width: auto; transform: scale(1.15); accent-color: var(--accent); }
.form-check label { margin-bottom: 0; font-weight: 500; color: var(--text-muted); }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="url"], input[type="date"], input[type="tel"],
select, textarea, .form-control {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 10px 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus, .form-control:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
textarea { min-height: 120px; resize: vertical; }
.signature-text textarea { width: 100%; height: 150px; padding: 12px; }
select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a6473' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.wrapp-editor { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px; }
.wrapp-error { margin-top: 18px; text-align: center; }
.text-error { color: var(--danger); font-size: 14px; }

/* carte de connexion / inscription */
.wrapper-security {
  width: 100%; max-width: 520px;
  margin: 40px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.wrapp-security { max-width: 720px; margin-inline: auto; }

/* Carte de signalement */
.report-card { max-width: 860px; }
.report-head { text-align: center; margin-bottom: 22px; }
.report-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--danger-soft); color: var(--danger); font-size: 22px; margin-bottom: 12px;
}
.report-head h1 { font-size: 1.4rem; margin-bottom: 6px; }
.report-sub { color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.report-actions { display: flex; gap: 10px; margin-top: 6px; }
.report-actions .btn-blue { flex: 1 1 auto; justify-content: center; }
.report-cancel { flex: 0 0 auto; }
.report-preview {
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 22px;
}
.report-preview-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.report-preview-head img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.report-preview-head strong { color: var(--text); }
.report-preview-head span { color: var(--text-soft); }
.report-preview-body { font-size: 13px; color: var(--text-muted); line-height: 1.5; font-style: italic; }

/* Carte éditeur (répondre / poster) */
.editor-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); margin-top: 4px;
}
.editor-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.editor-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 46px;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 18px;
}
.editor-head h1 { font-size: 1.4rem; }
.editor-sub { color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.editor-timelimit { margin-top: 16px; max-width: 340px; }
.editor-actions { display: flex; gap: 10px; margin-top: 18px; }

/* ---------- Page profil ---------- */
.profile { margin-top: 6px; }
.profile-header {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.profile-avatar {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover; flex: 0 0 92px;
  box-shadow: 0 0 0 3px var(--accent); background: var(--bg);
}
.profile-id { flex: 1 1 240px; min-width: 0; }
.profile-id h1 { font-size: 1.6rem; margin-bottom: 8px; word-break: break-word; }
.profile-status { margin-bottom: 8px; }
.profile-status .badge i { font-size: 7px; vertical-align: middle; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-muted); font-size: 13px; }
.profile-meta i { color: var(--text-soft); margin-right: 4px; }
.profile-edit { flex: 0 0 auto; }

.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-num { display: block; font-size: 1.55rem; font-weight: 700; color: var(--accent-strong); line-height: 1.1; }
.stat-num.stat-num-text { font-size: 1rem; }
.stat-label { display: block; font-size: 13px; color: var(--text); font-weight: 600; margin-top: 2px; }
.stat-sub { display: block; font-size: 12px; color: var(--text-soft); margin-top: 2px; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; align-items: start; }
.profile-grid .card-user { margin-top: 0; }
.profile-info { list-style: none; }
.profile-info li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-muted); }
.profile-info li:last-child { border-bottom: 0; }
.profile-info li i { width: 20px; text-align: center; color: var(--accent); }
.profile-info b { margin-left: auto; color: var(--text); font-weight: 600; text-align: right; }
.profile-signature { color: var(--text-muted); font-style: italic; line-height: 1.6; }
.profile-empty { color: var(--text-soft); }

@media (max-width: 767px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-edit { width: 100%; justify-content: center; }
}
@media (max-width: 520px) {
  .profile-stats { grid-template-columns: 1fr; }
}

/* ---------- Édition profil ---------- */
.edit-section { padding: 18px 0; border-top: 1px solid var(--border); }
.edit-section:first-of-type { border-top: 0; padding-top: 6px; }
.edit-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.edit-avatar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.edit-avatar .profile-avatar { width: 72px; height: 72px; flex: 0 0 72px; }
.edit-avatar-field { flex: 1 1 240px; min-width: 0; }
.edit-account-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.edit-account-row:last-child { border-bottom: 0; }
.edit-account-row > span { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); flex: 0 0 140px; }
.edit-account-row > span i { color: var(--accent); width: 16px; text-align: center; }
.edit-account-row b { color: var(--text); }
.edit-account-row .btn-edit { margin-left: auto; }

.btn-edit {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-muted);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s ease;
}
.btn-edit i { font-size: 11px; }
.btn-edit:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
@media (max-width: 600px) { .edit-grid { grid-template-columns: 1fr; } }

/* ---------- Modales (popups) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000; padding: 20px;
  background: rgba(16, 24, 40, .55);
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.is-open { display: flex; animation: modal-fade .15s ease; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 460px; padding: 22px;
  max-height: 90vh; overflow-y: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-head h2 { font-size: 1.2rem; display: inline-flex; align-items: center; gap: 8px; }
.modal-head h2 i { color: var(--accent); }
button.modal-close:not(.btn) {
  background: none; border: 0; cursor: pointer; font-size: 26px; line-height: 1;
  color: var(--text-soft); width: 34px; height: 34px; border-radius: var(--radius-xs);
}
button.modal-close:not(.btn):hover { background: var(--bg); color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- Sécurité du compte ---------- */
.page-title { font-size: 1.6rem; margin: 8px 0 16px; }
.security { max-width: 640px; margin-inline: auto; }
.security-card { margin-bottom: 16px; }
.security-card h2.titre-blue { display: inline-flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.security-card h2.titre-blue i { color: var(--accent); }
.security-card .form-group { margin-bottom: 16px; }
.wrapp-login { background: var(--surface); padding: 20px; margin-top: 40px; border-radius: var(--radius); }
.header-register { color: var(--text); text-align: center; margin-bottom: 20px; }

/* Cartes d'authentification (inscription / connexion) */
.register-card { max-width: 600px; }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 50%; margin-bottom: 12px;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 22px;
}
.auth-head h1 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-sub { color: var(--text-muted); font-size: 14px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.auth-foot { text-align: center; margin-top: 18px; color: var(--text-muted); font-size: 14px; }
.turnstile-wrap { display: flex; justify-content: center; margin: 8px 0 18px; }
@media (max-width: 520px) { .auth-grid { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.table thead th {
  text-align: left; font-size: 12.5px; font-weight: 700; letter-spacing: .3px;
  padding: 10px 14px; color: var(--on-accent);
  background: var(--accent);
}
.table tbody td { padding: 9px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); }
.corner-red, .red { background: var(--accent); color: var(--on-accent); }
.table-spacing { border-spacing: 0; }

/* ---------- Alerts ---------- */
.alert {
  border-radius: var(--radius-sm); padding: 13px 16px; margin: 14px 0;
  border: 1px solid transparent; font-size: 14px;
}
.alert-danger { background: var(--danger-soft); color: #a32a2e; border-color: #f3c9ca; }
.alert-warning { background: var(--warning-soft); color: #8a5a0f; border-color: #f3dcae; }
.alert-success { background: var(--success-soft); color: #15703f; border-color: #bce6cc; }
.alert-info { background: var(--info-soft); color: #1f4fb0; border-color: #c6d6fb; }
.pop { box-shadow: var(--shadow-sm); }

.search-wrapp p { margin-bottom: 8px; }
.search-wrapp img { max-width: 100%; height: auto; }

/* ---------- Pagination (knp bootstrap_v4 → restylé) ---------- */
.pagination {
  display: flex; flex-wrap: wrap; gap: 6px; list-style: none;
  padding: 0; margin: 18px 0; justify-content: center;
}
.pagination .page-item { display: inline-flex; }
.pagination .page-link, .pagination li > a, .pagination li > span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); border-radius: var(--radius-xs); font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all .15s ease;
}
.pagination .page-link:hover, .pagination li > a:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.pagination .active > .page-link, .pagination .active > a, .pagination .active > span {
  background: var(--accent) !important;
  border-color: transparent !important; color: var(--on-accent) !important; font-weight: 700;
}
.pagination .disabled > .page-link, .pagination .disabled > span { opacity: .45; pointer-events: none; }

/* Barre d'outils de section : bouton(s) à gauche, pagination à droite */
.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-toolbar .wrapp-button { margin: 0; }
.section-toolbar .section-pagination .pagination { margin: 0; }

/* ---------- Footer ---------- */
footer { flex-shrink: 0; margin-top: 50px; width: 100%; }
.main-footer { background: var(--text); padding: 48px 0 30px; }
.main-footer .container { display: flex; flex-wrap: wrap; gap: 8px; }
.main-footer .row { width: 100%; }
.widget { padding: 14px; margin-bottom: 10px; }
.widget.no-box { background: transparent; box-shadow: none; }
.widget-title { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 16px; position: relative; }
.widget-title span { display: block; height: 2px; width: 38px; margin-top: 10px; border-radius: 2px;
  background: var(--accent); }
.typo-light, .typo-light p, .typo-light span, .typo-light div, .typo-light small { color: rgba(255,255,255,.72); }
.typo-light h5 { color: #fff; }
.thumbnail-widget { list-style: none; }
.thumbnail-widget li { margin-bottom: 8px; }
.widget li a, .footer-email { color: rgba(255,255,255,.72); transition: color .15s ease; }
.widget li a:hover, .footer-email:hover { color: var(--accent); }
footer .btn { background: var(--accent); color: var(--on-accent); font-weight: 700; border: 0; }
footer .btn:hover { filter: brightness(1.05); color: var(--on-accent); }
.footer-copyright { background: #161a22; padding: 16px 0; }
.footer-copyright p { color: rgba(255,255,255,.5); margin: 0; font-size: 13px; }

/* ---------- Back-office ---------- */
.admin-wrap { display: flex; gap: 26px; align-items: flex-start; margin-top: 26px; }
.admin-sidebar {
  flex: 0 0 230px; position: sticky; top: calc(var(--nav-h) + 26px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
}
.admin-side-title { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 12px; }
.admin-side-group { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-soft); margin: 16px 0 6px; }
.admin-side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: 14px;
}
.admin-side-link i { width: 18px; text-align: center; color: var(--text-soft); }
.admin-side-link:hover { background: var(--bg); color: var(--text); }
.admin-side-link.is-active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.admin-side-link.is-active i { color: var(--accent-strong); }

.admin-main { flex: 1 1 auto; min-width: 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.5rem; }

.admin-col-actions { text-align: right; white-space: nowrap; width: 1%; }
.admin-inline-form { display: inline; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); cursor: pointer; margin-left: 4px; transition: all .15s ease;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.btn-icon-danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.admin-empty { text-align: center; color: var(--text-soft); padding: 26px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 600; }
.badge-on { background: var(--success-soft); color: var(--success); }
.badge-off { background: var(--bg); color: var(--text-soft); }

.admin-count { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.admin-member { display: flex; align-items: center; gap: 10px; }
.admin-member-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--accent); background: var(--bg); flex: 0 0 34px; }
.admin-member a { font-weight: 600; color: var(--text); }
.admin-member a:hover { color: var(--accent-strong); }

.admin-form .form-group { margin-bottom: 18px; }
.admin-form input[type="checkbox"] { width: auto; transform: scale(1.2); accent-color: var(--accent); margin-right: 6px; }
.admin-form-actions { display: flex; gap: 10px; margin-top: 8px; }

@media (max-width: 767px) {
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { position: static; width: 100%; flex-basis: auto; display: flex; flex-wrap: wrap; gap: 6px; }
  .admin-side-title, .admin-side-group { width: 100%; }
}

/* ---------- Helpers responsive ---------- */
.hide-mobile { }
@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
  .thread-user-block { border-right: 0; border-bottom: 1px solid var(--border); }
  .wrapper-security { padding: 24px; }
  .thread-message-block { padding: 16px; }
}
.size-mobile-12 { }

/* maintenance loader accent */
