/* Code Promo — Feuille de style principale */
/* Inspiré de mareduc.com — Design propre, vert, fonctionnel */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --vert:          #1a7a3c;
  --vert-fonce:    #145f30;
  --vert-clair:    #e8f5ee;
  --vert-medium:   #d4edda;
  --orange:        #f59e0b;
  --rouge:         #ef4444;
  --texte:         #1a1a1a;
  --texte-gris:    #6b7280;
  --texte-leger:   #9ca3af;
  --fond:          #f3f4f6;
  --fond-blanc:    #ffffff;
  --bordure:       #e5e7eb;
  --bordure-input: #d1d5db;
  --ombre:         0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --ombre-md:      0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --ombre-lg:      0 10px 25px rgba(0,0,0,0.1);
  --rayon:         8px;
  --rayon-lg:      12px;
  --transition:    0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--fond);
  color: var(--texte);
  font-size: 14px;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ============================================================
   EN-TÊTE (HEADER)
   ============================================================ */
.header {
  background: #fff;
  border-bottom: 1px solid var(--bordure);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-interieur {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  color: var(--vert);
  flex-shrink: 0;
}
.logo-icone {
  background: var(--vert);
  color: white;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Barre de recherche */
.barre-recherche {
  flex: 1;
  max-width: 500px;
  position: relative;
}
.barre-recherche input {
  width: 100%;
  padding: 10px 16px 10px 44px;
  border: 1.5px solid var(--bordure-input);
  border-radius: 50px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: var(--fond);
  transition: var(--transition);
  color: var(--texte);
}
.barre-recherche input:focus {
  border-color: var(--vert);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,122,60,0.1);
}
.barre-recherche input::placeholder { color: var(--texte-leger); }
.barre-recherche .icone-recherche {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--texte-leger);
  font-size: 16px;
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ============================================================
   NAV SECONDAIRE (Catégories)
   ============================================================ */
.nav-secondaire {
  background: var(--vert);
  border-bottom: 1px solid var(--vert-fonce);
}
.nav-secondaire-interieur {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-secondaire-interieur::-webkit-scrollbar { display: none; }
.nav-secondaire a {
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  white-space: nowrap;
  border-radius: 4px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-secondaire a:hover, .nav-secondaire a.actif {
  color: white;
  background: rgba(255,255,255,0.15);
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--rayon);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn-vert        { background: var(--vert); color: #fff; }
.btn-vert:hover  { background: var(--vert-fonce); }
.btn-bordure     { background: #fff; border: 1.5px solid var(--bordure-input); color: var(--texte); }
.btn-bordure:hover { border-color: var(--vert); color: var(--vert); }
.btn-gris        { background: var(--fond); color: var(--texte-gris); border: 1px solid var(--bordure); }
.btn-gris:hover  { background: var(--vert-clair); color: var(--vert); border-color: var(--vert); }
.btn-plein       { width: 100%; justify-content: center; }
.btn-sm          { padding: 7px 14px; font-size: 13px; }
.btn-lg          { padding: 13px 28px; font-size: 15px; }
.btn-connexion   {
  background: #fff;
  border: 1.5px solid var(--bordure-input);
  color: var(--texte);
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}
.btn-connexion:hover { border-color: var(--vert); color: var(--vert); }
.btn-poster {
  background: var(--vert);
  color: #fff;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}
.btn-poster:hover { background: var(--vert-fonce); }

/* ============================================================
   BANNIÈRE HÉRO
   ============================================================ */
.hero-banniere {
  background: var(--vert);
  padding: 36px 0;
}
.hero-banniere-interieur {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  color: #fff;
}
.hero-banniere h1 {
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}
.hero-banniere p {
  font-size: 15px;
  opacity: 0.88;
  max-width: 600px;
  margin: 0 auto 20px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.hero-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}
.hero-stat-lbl {
  font-size: 13px;
  opacity: 0.8;
}

/* Recherche héro */
.hero-recherche {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.hero-recherche input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 22px;
  font-size: 15px;
  font-family: inherit;
  color: var(--texte);
}
.hero-recherche input::placeholder { color: var(--texte-leger); }
.hero-recherche button {
  background: var(--vert-fonce);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.hero-recherche button:hover { background: #0f4a25; }

/* ============================================================
   CONTENU PRINCIPAL
   ============================================================ */
.conteneur {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: 40px 0; }
.section-titre {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-titre a { font-size: 13px; color: var(--vert); font-weight: 600; }

/* ============================================================
   GRILLE CATÉGORIES
   ============================================================ */
.grille-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.carte-categorie {
  background: #fff;
  border: 1.5px solid var(--bordure);
  border-radius: var(--rayon-lg);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--texte);
  display: block;
}
.carte-categorie:hover {
  border-color: var(--vert);
  background: var(--vert-clair);
  transform: translateY(-2px);
  box-shadow: var(--ombre-md);
}
.cat-icone {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
  line-height: 1;
}
.cat-nom { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.cat-nb  { font-size: 12px; color: var(--texte-gris); }

/* ============================================================
   CARTE CODE PROMO (style mareduc)
   ============================================================ */
.grille-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.carte-code {
  background: #fff;
  border: 1.5px solid var(--bordure);
  border-radius: var(--rayon-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}
.carte-code:hover {
  border-color: var(--vert);
  box-shadow: var(--ombre-lg);
  transform: translateY(-2px);
}
.carte-code.en-vedette { border-color: var(--orange); }

/* Pastille badge */
.code-badge {
  position: absolute;
  top: 0; left: 0;
  background: var(--vert);
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 0 0 var(--rayon) 0;
}
.code-badge.vedette   { background: var(--orange); color: #000; }
.code-badge.expire    { background: var(--rouge); }
.code-badge.nouveau   { background: #6366f1; }

/* Image / icone section */
.code-image {
  height: 160px;
  background: var(--fond);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  position: relative;
  overflow: hidden;
}
.code-image img { width: 100%; height: 100%; object-fit: cover; }

/* Corps */
.code-corps { padding: 16px; }

/* Ligne boutique */
.code-boutique {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.boutique-logo {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--fond);
  border: 1px solid var(--bordure);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.boutique-logo img { width: 100%; height: 100%; object-fit: cover; }
.boutique-nom-lien {
  font-size: 12px;
  font-weight: 600;
  color: var(--texte-gris);
}
.boutique-cat { font-size: 11px; color: var(--texte-leger); }

/* Pourcentage + titre */
.code-reduction-ligne {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.code-pourcent {
  font-size: 28px;
  font-weight: 800;
  color: var(--vert);
  line-height: 1;
  flex-shrink: 0;
}
.code-titre {
  font-size: 14px;
  font-weight: 600;
  color: var(--texte);
  line-height: 1.4;
}
.code-titre a { color: inherit; }
.code-titre a:hover { color: var(--vert); }

/* Boîte code */
.code-boite {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--fond);
  border: 1.5px dashed var(--bordure-input);
  border-radius: var(--rayon);
  padding: 10px 12px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 10px;
}
.code-boite:hover { border-color: var(--vert); background: var(--vert-clair); }
.code-valeur {
  font-family: 'Courier New', monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--texte);
  flex: 1;
}
.copier-btn {
  background: var(--vert);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
}
.voir-code-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--vert);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--rayon);
  font-weight: 700;
  font-size: 14px;
  width: 100%;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.voir-code-btn:hover { background: var(--vert-fonce); }

/* Pied de carte */
.code-pied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--bordure);
  font-size: 12px;
  color: var(--texte-gris);
  background: var(--fond);
}
.code-verifie { color: var(--vert); display: flex; align-items: center; gap: 4px; font-weight: 600; }
.code-expire  { display: flex; align-items: center; gap: 4px; }

/* ============================================================
   PAGE FICHE DÉTAIL (style mareduc)
   ============================================================ */
.fiche-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.fiche-principale {
  background: #fff;
  border: 1.5px solid var(--bordure);
  border-radius: var(--rayon-lg);
  overflow: hidden;
}

/* En-tête boutique */
.fiche-boutique-entete {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--bordure);
}
.fiche-boutique-logo {
  width: 80px; height: 80px;
  border-radius: var(--rayon-lg);
  border: 2px solid var(--bordure);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: var(--fond);
  overflow: hidden;
  flex-shrink: 0;
}
.fiche-boutique-titre { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.fiche-nb-reductions  { font-size: 14px; color: var(--texte-gris); }

/* Onglets */
.onglets {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--bordure);
  background: var(--fond);
}
.onglet-btn {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--texte-gris);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}
.onglet-btn.actif, .onglet-btn:hover { color: var(--vert); border-bottom-color: var(--vert); }
.onglet-badge {
  background: var(--vert);
  color: white;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 50px;
  margin-left: 4px;
}

/* Item code (dans fiche) */
.item-code {
  padding: 20px 28px;
  border-bottom: 1px solid var(--bordure);
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.item-code:last-child { border-bottom: none; }
.item-code-pourcent {
  font-size: 26px;
  font-weight: 800;
  color: var(--vert);
  min-width: 70px;
  text-align: center;
  line-height: 1;
  padding-top: 4px;
}
.item-code-contenu { flex: 1; }
.item-code-labels {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.etiquette {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
}
.etq-code       { background: #dbeafe; color: #1d4ed8; }
.etq-bon-plan   { background: #dcfce7; color: #166534; }
.etq-cashback   { background: #fef9c3; color: #854d0e; }
.etq-meilleur   { background: #d1fae5; color: var(--vert); }
.etq-expire     { background: #fee2e2; color: var(--rouge); }

.item-code-texte { font-size: 14px; color: var(--texte); line-height: 1.5; margin-bottom: 10px; }
.item-code-texte strong { color: var(--texte); }

.item-code-action {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  min-width: 140px;
}
.btn-voir-code {
  background: var(--vert);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--rayon);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-voir-code:hover { background: var(--vert-fonce); }
.btn-voir-code .code-masque {
  background: rgba(255,255,255,0.25);
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 1px;
  font-family: monospace;
}
.lancer-site { font-size: 12px; color: var(--vert); text-align: center; display: block; }
.item-code-meta {
  font-size: 11px;
  color: var(--texte-leger);
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.meta-verifie { color: var(--vert); font-weight: 600; }

/* Votes */
.votes-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--bordure);
}
.votes-question { font-size: 13px; color: var(--texte-gris); margin-bottom: 8px; }
.votes-btns { display: flex; gap: 8px; }
.vote-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1.5px solid var(--bordure);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  font-family: inherit;
  transition: var(--transition);
  color: var(--texte-gris);
}
.vote-btn.oui:hover, .vote-btn.oui.actif { border-color: var(--vert); color: var(--vert); background: var(--vert-clair); }
.vote-btn.non:hover, .vote-btn.non.actif { border-color: var(--rouge); color: var(--rouge); background: #fee2e2; }

/* Commentaires */
.commentaire {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--fond);
}
.commentaire:last-child { border-bottom: none; }
.com-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--vert-clair);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vert);
  font-size: 16px;
  flex-shrink: 0;
}
.com-auteur { font-size: 12px; font-weight: 700; color: var(--texte); }
.com-texte  { font-size: 13px; color: var(--texte-gris); margin-top: 2px; }
.com-date   { font-size: 11px; color: var(--texte-leger); }
.com-badge  { font-size: 10px; color: var(--vert); background: var(--vert-clair); padding: 2px 6px; border-radius: 4px; }

/* ============================================================
   COLONNE LATÉRALE (sidebar fiche)
   ============================================================ */
.bloc-lateral {
  background: #fff;
  border: 1.5px solid var(--bordure);
  border-radius: var(--rayon-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.bloc-lateral-titre {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bordure);
}
.notes-etoiles { display: flex; gap: 3px; margin-bottom: 4px; }
.etoile-pleine { color: var(--orange); font-size: 18px; }
.etoile-vide   { color: var(--bordure-input); font-size: 18px; }
.note-moyenne  { font-size: 13px; color: var(--texte-gris); }

/* ============================================================
   FORMULAIRES
   ============================================================ */
.groupe-champ { margin-bottom: 18px; }
.libelle {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--texte-gris);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.libelle .requis { color: var(--rouge); margin-left: 3px; }
.champ {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--bordure-input);
  border-radius: var(--rayon);
  font-size: 14px;
  font-family: inherit;
  color: var(--texte);
  background: #fff;
  outline: none;
  transition: var(--transition);
}
.champ:focus { border-color: var(--vert); box-shadow: 0 0 0 3px rgba(26,122,60,0.1); }
.champ::placeholder { color: var(--texte-leger); }
.champ.erreur { border-color: var(--rouge); }
textarea.champ { min-height: 110px; resize: vertical; }
select.champ {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.aide-champ { font-size: 12px; color: var(--texte-leger); margin-top: 5px; }

/* Zone upload */
.zone-upload {
  border: 2px dashed var(--bordure-input);
  border-radius: var(--rayon-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--fond);
}
.zone-upload:hover { border-color: var(--vert); background: var(--vert-clair); }
.zone-upload input[type="file"] { display: none; }
.zone-upload-icone  { font-size: 32px; margin-bottom: 8px; }
.zone-upload-titre  { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.zone-upload-aide   { font-size: 12px; color: var(--texte-leger); }
.doc-requis-badge {
  display: inline-block;
  background: #fee2e2;
  color: var(--rouge);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

/* Grille 2 colonnes dans formulaires */
.ligne-2cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============================================================
   MESSAGES FLASH
   ============================================================ */
.flash {
  padding: 12px 16px;
  border-radius: var(--rayon);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}
.flash-succes  { background: #dcfce7; border: 1px solid #bbf7d0; color: #166534; }
.flash-erreur  { background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; }
.flash-avert   { background: #fef9c3; border: 1px solid #fde68a; color: #854d0e; }
.flash-info    { background: #dbeafe; border: 1px solid #bfdbfe; color: #1e40af; }

/* ============================================================
   PAGES AUTH
   ============================================================ */
.page-auth {
  min-height: 100vh;
  background: var(--fond);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.carte-auth {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1.5px solid var(--bordure);
  border-radius: var(--rayon-lg);
  padding: 40px 36px;
  box-shadow: var(--ombre-lg);
}
.auth-logo-lien {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  color: var(--vert);
  margin-bottom: 28px;
  text-decoration: none;
}
.auth-titre { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.auth-sous-titre { font-size: 14px; color: var(--texte-gris); margin-bottom: 24px; }
.auth-pied { text-align: center; margin-top: 20px; font-size: 13px; color: var(--texte-gris); }
.auth-pied a { color: var(--vert); font-weight: 600; }

/* Lien mot de passe oublié */
.mot-de-passe-toggle {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  font-size: 15px; color: var(--texte-leger);
}

/* ============================================================
   TABLEAU DE BORD (ADMIN & COMMERÇANT)
   ============================================================ */
.mise-en-page-admin {
  display: flex;
  min-height: 100vh;
  background: var(--fond);
}

/* Barre latérale */
.barre-laterale {
  width: 240px;
  background: #fff;
  border-right: 1px solid var(--bordure);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.bl-logo {
  padding: 18px 20px;
  border-bottom: 1px solid var(--bordure);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  color: var(--vert);
  flex-shrink: 0;
}
.bl-logo-icone {
  background: var(--vert);
  color: #fff;
  width: 30px; height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.bl-infos {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bordure);
}
.bl-infos-nom  { font-size: 13px; font-weight: 700; color: var(--texte); }
.bl-infos-mail { font-size: 11px; color: var(--texte-gris); }

.bl-nav { padding: 12px 10px; flex: 1; }

.bl-section-titre {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--texte-leger);
  padding: 14px 8px 4px;
}

.bl-lien {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--rayon);
  font-size: 13px;
  font-weight: 500;
  color: var(--texte-gris);
  transition: var(--transition);
  margin-bottom: 1px;
  text-decoration: none;
}
.bl-lien:hover         { background: var(--fond); color: var(--texte); }
.bl-lien.actif         { background: var(--vert-clair); color: var(--vert); font-weight: 700; }
.bl-lien-icone         { font-size: 16px; width: 18px; text-align: center; }
.bl-badge {
  margin-left: auto;
  background: var(--vert);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 50px;
}
.bl-badge-orange { background: var(--orange); color: #000; }

/* Zone principale */
.zone-principale {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.barre-superieure {
  background: #fff;
  border-bottom: 1px solid var(--bordure);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--ombre);
}
.barre-superieure h1 { font-size: 18px; font-weight: 700; }
.contenu-admin { padding: 28px; flex: 1; }

/* Cartes stats */
.grille-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.carte-stat {
  background: #fff;
  border: 1.5px solid var(--bordure);
  border-radius: var(--rayon-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--ombre);
}
.stat-icone {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-vert   { background: var(--vert-clair); }
.stat-orange { background: #fff7ed; }
.stat-bleu   { background: #eff6ff; }
.stat-violet { background: #f5f3ff; }
.stat-valeur { font-size: 26px; font-weight: 800; color: var(--texte); line-height: 1; }
.stat-libelle{ font-size: 12px; color: var(--texte-gris); margin-top: 2px; }

/* Tableau admin */
.bloc-tableau {
  background: #fff;
  border: 1.5px solid var(--bordure);
  border-radius: var(--rayon-lg);
  overflow: hidden;
  box-shadow: var(--ombre);
  margin-bottom: 20px;
}
.tableau-entete {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--bordure);
  background: var(--fond);
}
.tableau-entete h3 { font-size: 15px; font-weight: 700; }

table.tableau {
  width: 100%;
  border-collapse: collapse;
}
table.tableau th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--texte-gris);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1.5px solid var(--bordure);
  background: var(--fond);
}
table.tableau td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--fond);
  vertical-align: middle;
}
table.tableau tr:last-child td { border-bottom: none; }
table.tableau tr:hover td     { background: var(--fond); }

/* Badges statut */
.statut-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
}
.statut-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.st-attente   { color: #d97706; background: #fef3c7; }
.st-approuve  { color: #166534; background: #dcfce7; }
.st-refuse    { color: #991b1b; background: #fee2e2; }
.st-suspendu  { color: var(--texte-gris); background: var(--fond); }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--rayon);
  background: #fff;
  border: 1.5px solid var(--bordure);
  color: var(--texte-gris);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: inherit;
}
.page-btn:hover, .page-btn.actif { background: var(--vert); border-color: var(--vert); color: #fff; }

/* ============================================================
   PIED DE PAGE
   ============================================================ */
.pied-de-page {
  background: #fff;
  border-top: 1px solid var(--bordure);
  padding: 40px 0 20px;
  margin-top: 40px;
}
.pied-grille {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.pied-desc { color: var(--texte-gris); font-size: 13px; margin-top: 12px; line-height: 1.8; }
.pied-titre {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  color: var(--texte);
}
.pied-liens { list-style: none; }
.pied-liens li { margin-bottom: 8px; }
.pied-liens a { font-size: 13px; color: var(--texte-gris); transition: var(--transition); }
.pied-liens a:hover { color: var(--vert); }
.pied-bas {
  border-top: 1px solid var(--bordure);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--texte-leger);
}

/* Section abonnement */
.section-abonnement {
  background: var(--vert);
  color: #fff;
  padding: 48px 0;
  text-align: center;
  margin: 40px 0 0;
}
.section-abonnement h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.section-abonnement p  { font-size: 15px; opacity: 0.9; margin-bottom: 24px; }
.form-abonnement {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.form-abonnement input {
  flex: 1;
  border: none;
  outline: none;
  padding: 13px 20px;
  font-size: 14px;
  font-family: inherit;
  color: var(--texte);
}
.form-abonnement button {
  background: var(--vert-fonce);
  color: #fff;
  border: none;
  padding: 13px 24px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.form-abonnement button:hover { background: #0f4a25; }

/* Fil d'Ariane */
.fil-ariane {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--texte-gris);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.fil-ariane a { color: var(--vert); }
.fil-ariane a:hover { text-decoration: underline; }
.fil-ariane span { color: var(--texte); font-weight: 600; }

/* Toast copie */
.toast-copie {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--texte);
  color: #fff;
  padding: 11px 22px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  transition: transform 0.3s ease;
  white-space: nowrap;
}
.toast-copie.visible { transform: translateX(-50%) translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .pied-grille { grid-template-columns: 1fr 1fr; }
  .fiche-layout { grid-template-columns: 1fr; }
  .barre-laterale { width: 200px; }
  .zone-principale { margin-left: 200px; }
}
@media (max-width: 768px) {
  .barre-laterale { transform: translateX(-100%); }
  .zone-principale { margin-left: 0; }
  .grille-codes { grid-template-columns: 1fr; }
  .grille-categories { grid-template-columns: repeat(3, 1fr); }
  .hero-banniere h1 { font-size: 20px; }
  .hero-stats { gap: 24px; }
  .pied-grille { grid-template-columns: 1fr; gap: 24px; }
  .form-abonnement { flex-direction: column; border-radius: var(--rayon-lg); }
  .barre-superieure h1 { font-size: 16px; }
  .item-code { flex-direction: column; }
  .item-code-action { align-items: stretch; width: 100%; }
  .ligne-2cols { grid-template-columns: 1fr; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--fond); }
::-webkit-scrollbar-thumb { background: var(--bordure-input); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--vert); }
