/* Console de gestion des boutiques : même charte que les boutiques (jaune, noir, rouge). */
:root {
  --fond: #f5f5f3;
  --carte: #ffffff;
  --texte: #18181b;
  --texte-2: #52525b;
  --texte-3: #a1a1aa;
  --bord: #e4e4e7;
  --jaune: #ffcd00;
  --jaune-fonce: #e0b400;
  --noir: #0f0f10;
  --rouge: #e11d2a;
  --vert: #15803d;
  --rayon: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 0 0 1rem; }
.discret { color: var(--texte-2); }
.petit { font-size: 0.85rem; }
.vide { color: var(--texte-3); text-align: center; padding: 1.5rem 0.5rem; }

/* ── En-tête ── */
.entete { background: var(--noir); color: #fff; }
.entete-dedans { max-width: 1200px; margin: 0 auto; padding: 0.75rem 16px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.marque strong { display: block; font-size: 0.95rem; }
.marque small { display: block; font-size: 0.75rem; opacity: 0.7; }
.pastille { width: 36px; height: 36px; border-radius: 10px; background: var(--jaune); color: var(--noir); display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; flex: none; }
.menu { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; font-size: 0.9rem; }
.menu a { text-decoration: none; opacity: 0.85; }
.menu a:hover { opacity: 1; text-decoration: underline; }
.menu form { margin: 0; }
.lien-bouton { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; opacity: 0.85; }
.lien-bouton:hover { opacity: 1; text-decoration: underline; }

/* ── Mise en page ── */
.conteneur { max-width: 1200px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.entete-page { margin-bottom: 1.25rem; }
.fil { margin: 0 0 0.75rem; font-size: 0.9rem; }
.fil a { color: var(--texte-2); text-decoration: none; }
.fil a:hover { text-decoration: underline; }

/* ── Boutons, formulaires, alertes ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border: 1px solid var(--noir); background: var(--noir); color: #fff; border-radius: 10px; padding: 0.6rem 1rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.15); }
.btn-primaire { background: var(--jaune); border-color: var(--jaune); color: var(--noir); box-shadow: 0 3px 0 var(--jaune-fonce); }
.btn-contour { background: transparent; color: var(--texte); border-color: var(--bord); }
.formulaire { display: grid; gap: 0.4rem; }
.formulaire label { font-weight: 600; font-size: 0.9rem; margin-top: 0.5rem; }
.formulaire input { width: 100%; padding: 0.75rem 0.85rem; border: 1px solid var(--bord); border-radius: 10px; font: inherit; background: #fff; }
.formulaire input:focus, .recherche input:focus { outline: 2px solid var(--jaune); outline-offset: 1px; border-color: var(--jaune-fonce); }
.formulaire .btn { margin-top: 1rem; padding: 0.8rem 1rem; }
.alerte { border-radius: 10px; padding: 0.7rem 0.9rem; margin: 0 0 1rem; font-weight: 600; font-size: 0.92rem; }
.alerte-erreur { background: #fde8ea; color: #9f1239; border: 1px solid #f9c5cb; }
.alerte-ok { background: #e8f7ee; color: var(--vert); border: 1px solid #bfe8cf; }

/* ── Connexion ── */
.ecran-connexion { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #2a2410 0%, var(--noir) 60%); }
.ecran-connexion .conteneur { width: 100%; max-width: 440px; padding: 2rem 16px; }
.carte-connexion { background: var(--carte); border-radius: 18px; padding: 1.75rem 1.5rem; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
.marque-connexion { margin-bottom: 1.25rem; }
.carte-connexion h1 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.carte-connexion .petit { margin: 1rem 0 0; }

/* ── Cartes des boutiques ── */
.grille-boutiques { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.carte-boutique { display: flex; flex-direction: column; gap: 0.9rem; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.1rem 1.2rem; text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
.carte-boutique:hover { border-color: var(--jaune-fonce); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07); }
.carte-haut strong { display: block; font-size: 1.1rem; }
.carte-haut .discret { font-size: 0.85rem; }
.chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.chiffres div { background: var(--fond); border-radius: 10px; padding: 0.55rem 0.7rem; }
.chiffres span, .tuile span { display: block; font-size: 0.78rem; color: var(--texte-2); }
.chiffres strong { font-size: 1.05rem; }
.carte-bas { margin: 0; font-size: 0.85rem; color: var(--texte-2); }
.voir { font-weight: 600; font-size: 0.9rem; color: var(--texte); margin-top: auto; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.25rem; }
.carte-etroite { max-width: 480px; }

/* ── Page d'une boutique ── */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.tuile { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 0.85rem 1rem; }
.tuile strong { display: block; font-size: 1.3rem; margin: 0.15rem 0; }
.tuile small { color: var(--texte-3); }
.tuile-forte { background: var(--noir); color: #fff; border-color: var(--noir); }
.tuile-forte span, .tuile-forte small { color: #d4d4d8; }
.tuile-forte strong { color: var(--jaune); }
.onglets { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--bord); margin-bottom: 1rem; overflow-x: auto; }
.onglets a { padding: 0.65rem 0.9rem; text-decoration: none; color: var(--texte-2); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.onglets a.actif { color: var(--texte); border-bottom-color: var(--jaune); }
.compte { display: inline-block; min-width: 1.6rem; padding: 0 0.4rem; border-radius: 999px; background: var(--fond); font-size: 0.78rem; text-align: center; }
.recherche { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.recherche input[type="search"] { flex: 1 1 240px; min-width: 0; padding: 0.6rem 0.85rem; border: 1px solid var(--bord); border-radius: 10px; font: inherit; background: #fff; }

/* ── Tableaux : défilent dans leur cadre, jamais la page ── */
.tableau-cadre { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--bord); vertical-align: top; }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texte-2); background: #fafafa; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fffdf2; }
td a { color: #0f766e; font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
.statut { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; margin-bottom: 0.15rem; }
.statut-completed { background: #e8f7ee; color: var(--vert); }
.statut-waiting_payment { background: #fff7d1; color: #92400e; }
.statut-abandoned { background: #f4f4f5; color: var(--texte-2); }
.statut-payment_failed { background: #fde8ea; color: #9f1239; }

/* ── Ventes directes ── */
.actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0 0 1.25rem; }
.carte-moyenne { max-width: 640px; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.deux-colonnes > div { display: grid; gap: 0.4rem; }
.formulaire select { width: 100%; padding: 0.75rem 0.85rem; border: 1px solid var(--bord); border-radius: 10px; font: inherit; background: #fff; }
.formulaire select:focus { outline: 2px solid var(--jaune); outline-offset: 1px; border-color: var(--jaune-fonce); }
.statut-direct { background: #e0f2fe; color: #075985; }
.btn-danger { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.lien-discret { color: var(--texte-2) !important; font-weight: 500 !important; font-size: 0.85rem; }
@media (max-width: 720px) { .deux-colonnes { grid-template-columns: 1fr; } .actions .btn { width: 100%; } }

/* ── Compteur de clients hors site ── */
.compteur { margin: 0 0 1rem; display: grid; gap: 0.5rem; border-color: var(--jaune-fonce); background: #fffdf2; }
.compteur label { font-size: 0.95rem; }
.compteur-ligne { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.compteur-ligne input { width: 10rem; padding: 0.65rem 0.85rem; border: 1px solid var(--bord); border-radius: 10px; font: inherit; font-size: 1.15rem; font-weight: 700; background: #fff; }
.compteur-ligne input:focus { outline: 2px solid var(--jaune); outline-offset: 1px; }
.compteur p { margin: 0; }

/* ── Téléphone : chaque ligne devient une petite fiche ── */
@media (max-width: 720px) {
  h1 { font-size: 1.35rem; }
  .menu { gap: 0.8rem; font-size: 0.85rem; }
  .tableau-cadre { background: transparent; border: 0; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; margin-bottom: 0.6rem; padding: 0.4rem 0; }
  td { border: 0; padding: 0.3rem 0.9rem; }
  td::before { content: attr(data-titre); display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texte-3); }
  td.vide::before { content: none; }
  .recherche .btn { flex: 1 1 auto; }
}
