/* ═══════════════════════════════════════════════════════
   MONTRÉAL CADRE DE VIE - Feuille de style
   Flat design épais · Charte couleurs institutionnelle
   ═══════════════════════════════════════════════════════ */

/* ─── Variables ─────────────────────────────────────── */
:root {
  --beige:     #E8DFC8;
  --bleu:      #5BB8E8;
  --vert:      #6AAF3D;
  --tuile:     #A84D2F;
  --anthracite:#2D2D2D;
  --blanc:     #FFFFFF;
  --gris-clair:#F7F4EE;

  --border:    2px solid var(--anthracite);
  --shadow:    4px 4px 0 var(--anthracite);
  --shadow-sm: 2px 2px 0 var(--anthracite);
  --radius:    4px;

  --font-title: 'Libre Baskerville', Georgia, serif;
  --font-body:  'Inter', 'Segoe UI', sans-serif;
}

/* ─── Reset & base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--anthracite);
  background: var(--blanc);
  font-size: 1rem;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#main-content {
  flex: 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: var(--tuile);
  line-height: 1.25;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.2rem, 3vw, 1.7rem); margin-bottom: .75rem; }
h3 { font-size: 1.15rem; margin-bottom: .5rem; }

a { color: var(--bleu); text-decoration: underline; }
a:hover { color: var(--tuile); }

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ─── Layout ────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-content {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

/* ─── Boutons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem 1.4rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .95rem;
  border: var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .08s, box-shadow .08s;
  white-space: nowrap;
  line-height: 1.3;
}
.btn:hover  { transform: translate(-1px,-1px); box-shadow: var(--shadow); }
.btn:active { transform: translate(2px,2px); box-shadow: none; }

.btn-primary   { background: var(--bleu);     color: var(--anthracite); }
.btn-secondary { background: var(--beige);    color: var(--anthracite); }
.btn-success   { background: var(--vert);     color: var(--blanc); }
.btn-danger    { background: var(--tuile);    color: var(--blanc); }
.btn-dark      { background: var(--anthracite); color: var(--blanc); }
.btn-lg        { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-sm        { padding: .35rem .9rem; font-size: .85rem; }
.btn-block     { width: 100%; justify-content: center; }

/* ─── En-tête du site ───────────────────────────────── */
.site-header {
  background: var(--beige);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding-top: .5rem;
  padding-bottom: .5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--anthracite);
  flex-shrink: 0;
}
.logo-icon { font-size: 2rem; }
.logo-text strong { font-family: var(--font-title); font-size: 1.1rem; color: var(--tuile); }
.logo-text small  { font-size: .75rem; color: var(--anthracite); opacity: .8; display: block; }

.main-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .85rem;
  font-weight: 600;
  font-size: .88rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--anthracite);
  transition: background .15s;
}
.nav-link:hover { background: rgba(0,0,0,.07); color: var(--anthracite); }
.nav-link.nav-cta {
  background: var(--bleu);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--anthracite);
}
.nav-link.nav-cta:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--anthracite);
  border-radius: 2px;
}

/* ─── Flash messages ────────────────────────────────── */
.flash {
  border-bottom: var(--border);
  padding: .85rem 0;
  font-weight: 600;
  position: relative;
}
.flash .container { text-align: center; position: relative; padding-right: 3rem; }
.admin-content .flash { text-align: center; }
.flash-success { background: #d4edda; color: #155724; }
.flash-error   { background: #f8d7da; color: #721c24; }
.flash-warning { background: #fff3cd; color: #856404; }
.flash-info    { background: #cce5ff; color: #004085; }
.flash-close   { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 1.4rem; cursor: pointer; opacity: .6; }

/* ─── Hero ──────────────────────────────────────────── */
.hero {
  background: var(--bleu);
  border-bottom: var(--border);
  padding: 4rem 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
}
.hero h1 { color: var(--anthracite); margin-bottom: 1rem; }
.hero-sub { font-size: 1.05rem; max-width: 540px; opacity: .9; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero-illustration { font-size: 7rem; opacity: .7; }

/* ─── Sections ──────────────────────────────────────── */
.section { padding: 3rem 0; }
.section-light { background: var(--blanc); }
.section-beige { background: var(--beige); }
.section-blue  { background: var(--bleu); }
.section-green { background: var(--vert); }

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  color: var(--tuile);
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--bleu);
  border: 1px solid var(--anthracite);
  margin: .5rem auto 0;
}
.section-action { text-align: center; margin-top: 2rem; }

/* ─── Cards ─────────────────────────────────────────── */
.card {
  background: var(--blanc);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.card-grey   { background: var(--gris-clair); }
.card-danger { border-color: var(--tuile); background: #fff5f5; }
.card h2 { font-size: 1.1rem; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid rgba(0,0,0,.1); }
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* ─── Services grid (home) ──────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--blanc);
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1.75rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--anthracite);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  transition: transform .1s, box-shadow .1s;
}
.service-card:hover {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--anthracite);
  color: var(--anthracite);
  text-decoration: none;
}
.service-card strong { font-family: var(--font-title); font-size: 1.05rem; color: var(--tuile); }
.service-card span   { font-size: .88rem; color: #555; }

.service-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

/* ─── Stats ─────────────────────────────────────────── */
.stats-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.stat-item {
  text-align: center;
  background: rgba(255,255,255,.2);
  border: var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  min-width: 140px;
  box-shadow: var(--shadow-sm);
}
.stat-number {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--anthracite);
  line-height: 1;
}
.stat-label {
  font-size: .85rem;
  font-weight: 600;
  margin-top: .4rem;
  color: var(--anthracite);
  opacity: .85;
}

/* ─── Catégories chips ──────────────────────────────── */
.categories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
}
.category-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border: var(--border);
  border-radius: 20px;
  background: var(--blanc);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  color: var(--anthracite);
  box-shadow: var(--shadow-sm);
  transition: transform .1s, box-shadow .1s;
}
.category-chip:hover {
  transform: translate(-1px,-1px);
  box-shadow: var(--shadow);
  color: var(--anthracite);
  text-decoration: none;
}

/* ─── News ──────────────────────────────────────────── */
.news-grid   { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 1.5rem; }
.news-grid-3 { grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); }

.news-card {
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  background: var(--blanc);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--anthracite);
  transition: transform .1s, box-shadow .1s;
}
.news-card:hover {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--anthracite);
  color: var(--anthracite);
  text-decoration: none;
}
.news-card * { text-decoration: none; }
.news-card-img { height: 180px; overflow: hidden; background: var(--beige); }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--beige);
}
.news-card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.news-card-title { font-size: 1.05rem; }
.news-card-title a { color: var(--tuile); text-decoration: none; font-family: var(--font-title); }
.news-card-title a:hover { text-decoration: underline; }
.news-excerpt { font-size: .9rem; color: #555; flex: 1; }
.news-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; }
.news-date  { font-size: .8rem; color: #888; }
.news-read-more { font-weight: 700; font-size: .85rem; text-decoration: none; color: var(--bleu); }
.news-cat-badge {
  display: inline-block;
  padding: .2rem .65rem;
  border: 1px solid var(--anthracite);
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 700;
  background: var(--beige);
  color: var(--anthracite);
}
.news-cat-travaux          { background: #fde2c8; }
.news-cat-projet           { background: #cce5ff; }
.news-cat-decision_conseil { background: #d4edda; }

/* ─── Article complet ───────────────────────────────── */
.article-hero-img { margin-bottom: 2rem; max-height: 400px; overflow: hidden; border: var(--border); border-radius: var(--radius); }
.article-hero-img img { width: 100%; object-fit: cover; max-height: 400px; }
.article-header   { margin-bottom: 1.5rem; }
.article-excerpt  { font-size: 1.15rem; color: #555; font-style: italic; border-left: 4px solid var(--bleu); padding-left: 1rem; margin: 0 0 2rem; line-height: 1.6; }
.article-title    { font-size: clamp(1.5rem, 4vw, 2.2rem); color: var(--tuile); margin: .75rem 0; }
.article-meta     { font-size: .85rem; color: #888; }
.article-content  { font-size: 1.05rem; line-height: 1.75; }
.article-content p   { margin-bottom: 1rem; }
.article-content h2,
.article-content h3  { margin: 1.5rem 0 .5rem; }
.article-content img { max-width: 100%; border: var(--border); margin: 1rem 0; }
.article-back { margin-top: 2.5rem; }

/* ─── Formulaires ───────────────────────────────────── */
.form-card { border: var(--border); box-shadow: var(--shadow); border-radius: var(--radius); background: var(--blanc); padding: 2rem; }
.form-section { border-bottom: 1px solid rgba(0,0,0,.08); padding-bottom: 2rem; margin-bottom: 2rem; }
.form-section:last-child { border-bottom: none; padding-bottom: 0; }
.form-section-title { font-size: 1.1rem; color: var(--tuile); margin-bottom: 1.25rem; }

.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .93rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }

input[type=text],
input[type=email],
input[type=tel],
input[type=password],
input[type=number],
select,
textarea {
  width: 100%;
  padding: .6rem .85rem;
  border: var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--blanc);
  color: var(--anthracite);
  transition: box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(91,184,232,.35);
}
textarea { resize: vertical; min-height: 100px; }

.form-check {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .75rem;
}
.form-check input[type=checkbox] {
  width: 18px;
  height: 18px;
  border: var(--border);
  cursor: pointer;
  accent-color: var(--bleu);
  flex-shrink: 0;
}
.form-check label { margin: 0; font-weight: 500; cursor: pointer; }
.form-hint { font-size: .8rem; color: #777; margin-top: .3rem; display: block; }

.req { color: var(--tuile); }
.opt { font-size: .8rem; font-weight: 400; color: #888; font-family: var(--font-body); }

.form-actions { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* Catégories radio */
.categories-radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .75rem;
}
.cat-radio-label { cursor: pointer; }
.cat-radio-label input[type=radio] { display: none; }
.cat-radio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1rem .5rem;
  border: var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: .85rem;
  font-weight: 600;
  background: var(--blanc);
  transition: background .12s, box-shadow .12s;
}
.cat-icon { font-size: 1.5rem; }
.cat-radio-label input:checked + .cat-radio-card {
  background: var(--bleu);
  box-shadow: var(--shadow-sm);
}
.cat-radio-card:hover { background: var(--beige); }

/* Address search */
.address-search-wrap { display: flex; gap: .5rem; }
.address-search-wrap input { flex: 1; }

/* Map */
.map-container { border: var(--border); border-radius: var(--radius); margin-top: .5rem; }
.map-page { position: relative; }
.map-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: .75rem 1.25rem;
  background: var(--beige);
  border-bottom: var(--border);
}
.map-legend { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; font-size: .82rem; font-weight: 600; }
.legend-item { display: flex; align-items: center; gap: .3rem; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--anthracite); flex-shrink: 0; }
.form-select-sm { padding: .35rem .65rem; border: var(--border); border-radius: var(--radius); font-size: .85rem; }

/* File upload */
.file-preview { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.file-preview-item {
  border: var(--border);
  border-radius: var(--radius);
  padding: .3rem .6rem;
  font-size: .8rem;
  background: var(--gris-clair);
  display: flex;
  align-items: center;
  gap: .3rem;
}

/* ─── Request detail ────────────────────────────────── */
.request-header { margin-bottom: 1.5rem; }
.request-ref { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.ref-badge {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--tuile);
  border: var(--border);
  padding: .2rem .75rem;
  border-radius: var(--radius);
  background: var(--beige);
  box-shadow: var(--shadow-sm);
}
.ref-badge-lg { font-size: 1.5rem; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .85rem;
  border: var(--border);
  border-radius: 20px;
  font-weight: 700;
  font-size: .88rem;
}
.request-meta, .request-meta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .9rem;
  color: #555;
}

.request-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: start;
}
.request-description { font-size: 1rem; line-height: 1.75; white-space: pre-wrap; }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 1rem; }
.timeline-item { display: flex; gap: .85rem; }
.timeline-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--anthracite); flex-shrink: 0; margin-top: .2rem; }
.timeline-content { flex: 1; }
.timeline-date   { font-size: .78rem; color: #888; font-weight: 600; }
.timeline-action { font-weight: 600; font-size: .92rem; }
.timeline-status { font-size: .82rem; margin-top: .15rem; }
.timeline-comment { font-size: .85rem; color: #555; margin-top: .25rem; padding: .4rem .6rem; background: var(--gris-clair); border-left: 3px solid var(--bleu); }
.timeline-compact .timeline-item { gap: .6rem; }

/* Files */
.files-list { display: flex; flex-direction: column; gap: .5rem; }
.file-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem;
  border: var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--anthracite);
  background: var(--gris-clair);
  transition: background .12s;
}
.file-item:hover { background: var(--beige); }
.file-icon { font-size: 1.3rem; }
.file-name { flex: 1; font-weight: 600; font-size: .9rem; }
.file-size { font-size: .78rem; color: #888; }
.file-item-admin { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.file-link { display: flex; align-items: center; gap: .5rem; flex: 1; }

/* ─── Track search ──────────────────────────────────── */
.track-search-card { max-width: 600px; }
.track-form .track-input-wrap { display: flex; gap: .5rem; }
.track-form input { flex: 1; }
.info-box { background: var(--beige); border: var(--border); border-radius: var(--radius); padding: 1.5rem; margin-top: 2rem; }
.info-box h2 { font-size: 1.05rem; margin-bottom: .75rem; }
.info-box ul li { padding: .25rem 0; padding-left: 1rem; position: relative; font-size: .93rem; }
.info-box ul li::before { content: '▸'; position: absolute; left: 0; color: var(--bleu); }

/* ─── Recherche référence (page demandes) ───────────── */
.search-ref-card {
  background: var(--blanc);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
}
.search-ref-label { display: block; font-weight: 700; margin-bottom: .6rem; }
.search-ref-wrap  { display: flex; gap: .5rem; }
.search-ref-wrap input { flex: 1; font-size: 1rem; }
.search-error { color: #721c24; font-size: .9rem; margin-top: .6rem; }

/* ─── Liste publique des demandes ───────────────────── */
.demandes-filters {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 1rem 0 1.5rem;
}
.demandes-filters .filter-group { flex: 1; min-width: 180px; }
.demandes-filters input,
.demandes-filters select { font-size: .9rem; padding: .5rem .75rem; }

.demandes-count {
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 1.25rem;
  color: #555;
}

.demandes-list { display: flex; flex-direction: column; gap: 1rem; }

.demande-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--blanc);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.25rem;
  transition: box-shadow .1s, transform .1s;
  text-decoration: none;
  color: var(--anthracite);
  cursor: pointer;
}
.demande-card:hover {
  transform: translate(-2px,-2px);
  box-shadow: var(--shadow);
  color: var(--anthracite);
  text-decoration: none;
}
.demande-card-left { display: flex; align-items: flex-start; padding-top: .1rem; flex-shrink: 0; }
.demande-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.demande-card-body  { flex: 1; min-width: 0; }
.demande-card-right { display: flex; align-items: center; flex-shrink: 0; }
.demande-card *     { text-decoration: none; }

.demande-card-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}
.demande-cat-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--beige);
  color: var(--anthracite);
}
.demande-description {
  font-size: .93rem;
  color: #333;
  margin-bottom: .5rem;
  line-height: 1.5;
}
.demande-card-meta {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
  font-size: .8rem;
  color: #888;
}

@media (max-width: 560px) {
  .demande-card { flex-wrap: wrap; }
  .demande-card-right { width: 100%; }
  .demande-card-right .btn { width: 100%; justify-content: center; }
}

/* ─── Dashboard charts ──────────────────────────────── */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: 1.5rem; }
.chart-card { }
.chart-card-wide { grid-column: 1 / -1; }
.chart-wrap { position: relative; height: 280px; }
.page-header-light h1 { color: var(--anthracite); }
.page-header-light p  { color: rgba(45,45,45,.8); }

/* ─── Alertes ───────────────────────────────────────── */
.alert { padding: 1rem 1.25rem; border: var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; }
.alert-error   { background: #f8d7da; border-color: var(--tuile); }
.alert-warning { background: #fff3cd; border-color: #e6a817; }
.alert-success { background: #d4edda; border-color: var(--vert); }
.alert ul { margin-top: .5rem; padding-left: 1.25rem; list-style: disc; }

/* ─── Badges ────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid;
}
.badge-green  { background: #d4edda; border-color: var(--vert); color: #155724; }
.badge-orange { background: #fff3cd; border-color: #e6a817; color: #664d03; }
.badge-grey   { background: #e2e3e5; border-color: #9e9e9e; color: #495057; }

/* ─── Pagination ────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.page-link { padding: .4rem .9rem; border: var(--border); border-radius: var(--radius); text-decoration: none; font-weight: 600; background: var(--blanc); box-shadow: var(--shadow-sm); color: var(--anthracite); }
.page-link:hover { background: var(--beige); color: var(--anthracite); }
.page-info { font-size: .88rem; color: #777; }

/* ─── Breadcrumb ─────────────────────────────────────── */
.breadcrumb { margin-bottom: 1.25rem; font-size: .9rem; }
.breadcrumb a { color: var(--bleu); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

/* ─── Copy link ─────────────────────────────────────── */
.copy-link-wrap { display: flex; gap: .5rem; align-items: center; }
.copy-link-wrap input { flex: 1; font-size: .85rem; background: var(--gris-clair); }

/* ─── Pied de page ──────────────────────────────────── */
.site-footer {
  background: var(--anthracite);
  border-top: var(--border);
  color: rgba(255,255,255,.85);
  margin-top: 3rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 2rem;
  padding: 2.5rem 1.25rem;
}
.footer-title { color: var(--beige); font-family: var(--font-title); display: block; margin-bottom: .75rem; }
.footer-col p { font-size: .88rem; line-height: 1.6; }
.footer-col ul li { margin-bottom: .35rem; }
.footer-col ul li a { color: rgba(255,255,255,.75); font-size: .88rem; text-decoration: none; }
.footer-col ul li a:hover { color: var(--bleu); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 1rem 1.25rem;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}

/* ─── Admin Layout ──────────────────────────────────── */
.admin-body { background: var(--gris-clair); }

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--anthracite);
  border-right: var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: var(--blanc);
}
.admin-brand-icon { font-size: 2rem; }
.admin-brand strong { font-family: var(--font-title); color: var(--beige); display: block; }
.admin-brand small  { font-size: .75rem; opacity: .7; }

.admin-nav { flex: 1; padding: 1rem 0; }
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.25rem;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: background .12s, color .12s;
  border-left: 3px solid transparent;
}
.admin-nav-link:hover { background: rgba(255,255,255,.08); color: var(--blanc); }
.admin-nav-link.active {
  background: rgba(91,184,232,.2);
  color: var(--bleu);
  border-left-color: var(--bleu);
}
.admin-logout { color: rgba(168,77,47,.8) !important; margin-top: auto; }
.admin-sidebar-footer { border-top: 1px solid rgba(255,255,255,.1); padding: .5rem 0; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.admin-topbar {
  background: var(--blanc);
  border-bottom: var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-page-title { font-size: 1.3rem; color: var(--tuile); margin: 0; }
.admin-user { font-size: .88rem; font-weight: 600; color: #666; }

.admin-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  flex-shrink: 0;
}
.admin-menu-toggle span { display: block; width: 24px; height: 2px; background: var(--anthracite); border-radius: 2px; }

.admin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 999;
}
.admin-overlay.visible { display: block; }

.admin-content { padding: 1.5rem; flex: 1; }
.admin-content .flash { margin-bottom: 1.5rem; }

/* Admin stats */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-stat-card {
  background: var(--blanc);
  border: 2px solid;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  text-align: center;
}
.admin-stat-num { font-family: var(--font-title); font-size: 2.2rem; font-weight: 700; line-height: 1; }
.admin-stat-label { font-size: .82rem; font-weight: 600; margin-top: .35rem; color: #555; }

/* Admin charts */
.admin-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.admin-charts-row > * { min-width: 0; overflow: hidden; }
.admin-chart-wide { grid-column: 1 / -1; }

/* Admin tables */
.table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.admin-table th, .admin-table td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,.07); }
.admin-table th { background: var(--gris-clair); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: #555; }
.admin-table tr:hover td { background: var(--gris-clair); }
.actions-cell { white-space: nowrap; display: flex; gap: .4rem; align-items: center; }

/* Admin forms */
.info-table { width: 100%; font-size: .92rem; }
.info-table th { font-weight: 700; padding: .4rem .6rem .4rem 0; width: 120px; color: #555; vertical-align: top; }
.info-table td { padding: .4rem 0; }
.info-msg { font-size: .9rem; color: #555; margin-bottom: .75rem; }
.success-msg { color: var(--vert); font-weight: 600; }
.empty-msg { color: #888; font-style: italic; padding: 1rem 0; }

/* Admin detail grid */
.admin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}
.admin-detail-side .card h2 { font-size: 1rem; }

/* Admin request header */
.request-admin-header { padding: 1.25rem 1.5rem; }
.request-ref-row   { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }

/* Status dot */
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .25rem; vertical-align: middle; border: 1px solid rgba(0,0,0,.2); }

/* Filters */
.filters-card { padding: 1rem 1.5rem; }
.filters-form { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.filter-group { flex: 1; min-width: 160px; }
.filter-group input,
.filter-group select { font-size: .88rem; padding: .45rem .7rem; }

/* Admin login */
.admin-login-card { max-width: 440px; margin: 0 auto; }
.login-header { text-align: center; margin-bottom: 2rem; }
.login-logo   { font-size: 3.5rem; display: block; margin-bottom: .75rem; }
.login-header h1 { font-size: 1.5rem; color: var(--tuile); margin-bottom: .25rem; }
.login-header p  { color: #666; font-size: .9rem; }
.login-form .form-group { margin-bottom: 1.1rem; }

/* 2FA */
.twofa-setup { margin-bottom: 1.5rem; }
.twofa-steps { padding-left: 1.25rem; list-style: decimal; margin-bottom: 1rem; }
.twofa-steps li { margin-bottom: .5rem; font-size: .93rem; }
.secret-details { margin-top: 1rem; background: var(--gris-clair); border: var(--border); border-radius: var(--radius); padding: .5rem .75rem; }
.secret-code { display: block; font-family: monospace; font-size: 1.1rem; letter-spacing: .15em; padding: .5rem; word-break: break-all; }

/* News form */
.news-form { max-width: 100%; }

/* Image resize toolbar (éditeur Quill) */
.img-resize-toolbar {
  position: fixed;
  background: #2D2D2D;
  border: 2px solid #555;
  border-radius: 4px;
  padding: 4px 6px;
  display: flex;
  gap: 4px;
  align-items: center;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.img-resize-toolbar button {
  background: #555;
  border: none;
  color: #fff;
  padding: 3px 7px;
  cursor: pointer;
  border-radius: 2px;
  font-size: 12px;
  line-height: 1.4;
}
.img-resize-toolbar button:hover { background: #777; }
.img-resize-toolbar .sep { width: 1px; background: #666; height: 18px; margin: 0 2px; }
.img-resize-toolbar input[type=number] {
  width: 58px;
  background: #444;
  border: 1px solid #666;
  color: #fff;
  padding: 2px 4px;
  font-size: 12px;
  border-radius: 2px;
}
.img-resize-toolbar input[type=number]::placeholder { color: #aaa; }
.ql-editor img.ql-img-selected { outline: 2px solid #3182CE; }
.news-form .ql-toolbar, #quillEditor { max-width: 1200px; }

/* Page header */
.page-header { margin-bottom: 2rem; }
.page-header h1 { margin-bottom: .4rem; }
.page-header p { color: #555; font-size: 1rem; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1rem; color: #888; }

/* ─── Page comptes admin ─────────────────────────────── */
.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: start;
}
.admin-two-col > div { min-width: 0; overflow-x: auto; }
@media (max-width: 900px) {
  .admin-two-col { grid-template-columns: 1fr; }
}

/* ─── Leaflet ────────────────────────────────────────── */
/* Confine les z-index Leaflet dans la carte pour éviter le conflit avec le header sticky */
.leaflet-container { isolation: isolate; }
/* Spécificité (0,2,0) > (0,1,0) de Leaflet → gagne même avec !important des deux côtés */
.leaflet-control-attribution .leaflet-attribution-flag { display: none !important; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .request-grid,
  .admin-detail-grid { grid-template-columns: 1fr; }
  .admin-charts-row  { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-illustration { display: none; }
  .main-nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--beige); border-bottom: var(--border); padding: .5rem; z-index: 999; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .admin-sidebar { display: none; width: 240px; position: fixed; top: 0; left: 0; height: 100%; z-index: 1000; }
  .admin-sidebar.open { display: flex; }
  .admin-menu-toggle { display: flex; }
  .admin-layout { flex-direction: column; }

  /* Tables admin : chaque ligne devient un bloc empilé, toutes colonnes visibles */
  .table-wrap .admin-table thead { display: none; }
  .table-wrap .admin-table,
  .table-wrap .admin-table tbody,
  .table-wrap .admin-table tr { display: block; }
  .table-wrap .admin-table tr { padding: .65rem 0; border-bottom: var(--border); }
  .table-wrap .admin-table tr:last-child { border-bottom: none; }
  .table-wrap .admin-table td { display: block; padding: .15rem 0; border: none; font-size: .9rem; }
  .table-wrap .admin-table td[data-label]::before { content: attr(data-label) " : "; font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #777; display: block; margin-bottom: .1rem; }
  .table-wrap .admin-table td.actions-cell { display: flex; flex-wrap: wrap; gap: .4rem; padding-top: .5rem; }
}

@media (max-width: 560px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .service-card { padding: .85rem .5rem; gap: .5rem; }
  .service-card strong { font-size: .9rem; }
  .service-card span   { font-size: .78rem; }
  .service-icon { width: 44px; height: 44px; font-size: 1.25rem; }
  .categories-radio-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { flex-direction: column; }
  .track-form .track-input-wrap { flex-direction: column; }
  .form-row { flex-direction: column; }
  .form-card { padding: 1rem; }
  .h-captcha { overflow: hidden; }
}
