/* ==========================================================
   EscaleMC — feuille de style
   ==========================================================
   Une seule feuille pour le site public et le panneau : les deux
   partagent les memes composants, seules quelques classes different.
   ========================================================== */

:root {
  --fond:        #0d1017;
  --fond-doux:   #131822;
  --carte:       #161c27;
  --carte-haut:  #1c2331;
  --bord:        #252d3d;
  --bord-clair:  #323c50;

  --texte:       #e8ecf3;
  --doux:        #8b95a8;
  --tres-doux:   #5d6779;

  --or:          #ffb03a;
  --or-sombre:   #c77f16;
  --rouge:       #ef5f63;
  --vert:        #46cf78;
  --bleu:        #4f9dff;
  --violet:      #a97bff;

  --rayon:       14px;
  --rayon-petit: 9px;
  --ombre:       0 4px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(255, 176, 58, .10), transparent 60%),
    radial-gradient(800px 420px at 92% 4%, rgba(169, 123, 255, .09), transparent 60%),
    var(--fond);
  background-attachment: fixed;
  color: var(--texte);
  font: 15px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------------------------------------------------------- barre */

.barre {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 26px;
  height: 62px;
  background: rgba(19, 24, 34, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bord);
  position: sticky;
  top: 0;
  z-index: 50;
}

.marque {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.3px;
  text-decoration: none;
  background: linear-gradient(100deg, var(--or), #ff7a59);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.marque span { color: var(--doux); font-weight: 400; font-size: 13px; }

.barre nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.barre nav::-webkit-scrollbar { display: none; }

.barre nav a {
  color: var(--doux);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--rayon-petit);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.barre nav a:hover { background: var(--carte-haut); color: var(--texte); }
.barre nav a.actif { background: var(--or); color: #1a1200; font-weight: 650; }

.compte {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  padding: 5px 12px 5px 6px;
  border-radius: 30px;
  background: var(--carte);
  border: 1px solid var(--bord);
  font-size: 14px;
  font-weight: 550;
}
.compte:hover { border-color: var(--bord-clair); }
.compte img { border-radius: 5px; image-rendering: pixelated; }

.sortie { color: var(--tres-doux); text-decoration: none; font-size: 13px; }
.sortie:hover { color: var(--rouge); }

/* La barre du panneau se distingue du site public d'un coup d'oeil :
   on doit savoir ou l'on se trouve sans lire l'adresse. */
.barre.admin {
  background: rgba(22, 16, 30, .9);
  border-bottom-color: #3a2a4d;
}
.barre.admin .marque {
  background: linear-gradient(100deg, var(--violet), #6fa8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.barre.admin nav a.actif { background: var(--violet); color: #140b22; }

/* ---------------------------------------------------------- page */

main { max-width: 1180px; margin: 0 auto; padding: 34px 24px 80px; }
main.etroit, section.etroit { max-width: 560px; margin: 0 auto; }

h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.6px;
  margin: 0 0 24px;
  font-weight: 750;
}
h2 {
  font-size: 15px;
  margin: 40px 0 14px;
  color: var(--doux);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .8px;
}
h3 { font-size: 16.5px; margin: 0 0 8px; font-weight: 650; }
p { margin: 0 0 12px; }

/* ---------------------------------------------------------- heros */

.heros {
  position: relative;
  overflow: hidden;
  padding: 42px 40px;
  border-radius: 20px;
  border: 1px solid var(--bord);
  background:
    linear-gradient(135deg, rgba(255, 176, 58, .12), transparent 52%),
    linear-gradient(210deg, rgba(169, 123, 255, .10), transparent 56%),
    var(--carte);
  margin-bottom: 26px;
}
.heros::after {
  /* Un halo discret, purement decoratif */
  content: "";
  position: absolute;
  inset: auto -80px -140px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 176, 58, .16), transparent 70%);
  pointer-events: none;
}
.accroche { font-size: 21px; font-weight: 600; margin: 0 0 22px; max-width: 620px; }
.adresse {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 19px;
  font-weight: 700;
  color: var(--or);
  padding: 9px 16px;
  border-radius: var(--rayon-petit);
  background: rgba(255, 176, 58, .09);
  border: 1px solid rgba(255, 176, 58, .22);
  margin-bottom: 18px;
  user-select: all;
}

/* ---------------------------------------------------------- cartes */

.grille {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.carte {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 20px;
  transition: border-color .15s, transform .15s;
}
.carte:hover { border-color: var(--bord-clair); }

.carte .valeur {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -1px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.carte .libelle { color: var(--doux); font-size: 13.5px; margin-top: 5px; }

.article { display: flex; flex-direction: column; }
.article .prix {
  font-size: 20px;
  font-weight: 700;
  color: var(--or);
  margin: 10px 0;
}
.article .bouton { margin-top: auto; text-align: center; }

/* ---------------------------------------------------------- tableaux */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  overflow: hidden;
}
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--bord); }
th {
  background: var(--carte-haut);
  color: var(--doux);
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .9px;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td, tr:hover td { background: rgba(255, 255, 255, .022); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td img { border-radius: 5px; image-rendering: pixelated; vertical-align: middle; }

/* Les trois premieres places ressortent */
tr:nth-child(2) td:first-child { color: var(--or); font-weight: 650; }

/* ---------------------------------------------------------- formulaires */

label { display: block; font-size: 13.5px; color: var(--doux); margin-bottom: 5px; }

input, select, textarea {
  background: #10151e;
  border: 1px solid var(--bord);
  color: var(--texte);
  padding: 10px 13px;
  border-radius: var(--rayon-petit);
  font: inherit;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--or);
  box-shadow: 0 0 0 3px rgba(255, 176, 58, .14);
}
input::placeholder { color: var(--tres-doux); }
textarea { min-height: 95px; font-family: ui-monospace, monospace; font-size: 13px; }

button, .bouton {
  background: linear-gradient(180deg, var(--or), var(--or-sombre));
  color: #1a1200;
  border: none;
  padding: 10px 18px;
  border-radius: var(--rayon-petit);
  font: 650 14.5px inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: filter .15s, transform .1s;
}
button:hover, .bouton:hover { filter: brightness(1.08); }
button:active, .bouton:active { transform: translateY(1px); }

.bouton.discret {
  background: var(--carte-haut);
  color: var(--texte);
  border: 1px solid var(--bord);
}
.bouton.discret:hover { border-color: var(--bord-clair); filter: none; }
.bouton.grand { padding: 13px 26px; font-size: 16px; }
.bouton.danger { background: var(--rouge); color: #fff; }

form.ligne { display: flex; gap: 8px; align-items: center; }
form.ligne input, form.ligne textarea { width: auto; flex: 1; }

/* ---------------------------------------------------------- divers */

.avis {
  padding: 13px 17px;
  border-radius: var(--rayon-petit);
  margin-bottom: 20px;
  font-size: 14.5px;
  border: 1px solid transparent;
}
.avis.succes {
  background: rgba(70, 207, 120, .10);
  border-color: rgba(70, 207, 120, .26);
  color: var(--vert);
}
.avis.erreur {
  background: rgba(239, 95, 99, .10);
  border-color: rgba(239, 95, 99, .26);
  color: var(--rouge);
}

.pastille {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.enligne { background: rgba(70, 207, 120, .15); color: var(--vert); }
.horsligne { background: var(--carte-haut); color: var(--doux); }

.onglets { display: flex; gap: 7px; margin-bottom: 22px; flex-wrap: wrap; }
.onglets a {
  padding: 8px 15px;
  border-radius: var(--rayon-petit);
  background: var(--carte);
  border: 1px solid var(--bord);
  color: var(--doux);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.onglets a:hover { border-color: var(--bord-clair); color: var(--texte); }
.onglets a.actif {
  background: var(--or);
  color: #1a1200;
  border-color: transparent;
  font-weight: 650;
}

.recherche { margin-bottom: 18px; max-width: 430px; }
.doux { color: var(--doux); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13.5px; }
.centre { text-align: center; }

.profil-tete {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}
.profil-tete img { border-radius: 10px; image-rendering: pixelated; }
.moi { color: var(--or); font-weight: 650; }

footer, .bas {
  text-align: center;
  color: var(--tres-doux);
  font-size: 12.5px;
  padding: 30px 24px;
  border-top: 1px solid var(--bord);
  margin-top: 40px;
}

/* ---------------------------------------------------------- ecrans etroits */

@media (max-width: 760px) {
  .barre { height: auto; flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
  .barre nav { order: 3; width: 100%; }
  main { padding: 24px 16px 60px; }
  h1 { font-size: 25px; }
  .heros { padding: 28px 22px; }
  .accroche { font-size: 18px; }
  /* Les tableaux larges defilent plutot que de deborder */
  table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Second mode de connexion, replie par defaut */
details.carte summary { list-style: none; color: var(--doux); }
details.carte summary::-webkit-details-marker { display: none; }
details.carte summary::before { content: "+ "; color: var(--or); font-weight: 700; }
details.carte[open] summary::before { content: "- "; }
details.carte summary:hover { color: var(--texte); }
