:root {
  --navy: #1a2744;
  --navy-2: #24345a;
  --gold: #c8a951;
  --cream: #f8f5ee;
  --ink: #1d2433;
  --muted: #5b6475;
  --line: #e4ddcc;
  --ok: #2f6b45;
  --err: #a33a2b;
  --card: #fffdf8;
  --titre: "Playfair Display", Georgia, "Times New Roman", serif;
  --texte: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--cream); color: var(--ink); font: 16px/1.5 var(--texte); }
a { color: var(--navy); }
h1, h2 { font-family: var(--titre); color: var(--navy); font-weight: 600; line-height: 1.2; }
h1 { font-size: 1.9rem; margin: 0 0 .4rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .8rem; }
p.sous { color: var(--muted); margin: 0 0 1.6rem; }

.entete { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; padding: .8rem 1.2rem; background: var(--navy); color: var(--cream); }
.marque { font-family: var(--titre); font-size: 1.35rem; letter-spacing: .01em; }
.marque span { color: var(--gold); }
.officine { opacity: .85; border-left: 1px solid rgba(248,245,238,.3); padding-left: 1.2rem; }
.qui { margin-left: auto; display: flex; align-items: center; gap: .8rem; }
.qui form { margin: 0; }
.entete .lien { color: var(--gold); }

.page { max-width: 960px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.centre { max-width: 440px; margin: 4rem auto; text-align: center; }
.carte { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; box-shadow: 0 1px 0 rgba(26,39,68,.04); }

form.pile { display: grid; gap: .9rem; text-align: left; }
label { display: grid; gap: .3rem; font-weight: 500; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], select {
  font: inherit; padding: .65rem .8rem; border: 1px solid #cfc7b4; border-radius: 9px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, button:focus-visible { outline: 3px solid rgba(200,169,81,.55); outline-offset: 1px; }
input.pin { font-size: 1.6rem; letter-spacing: .5em; text-align: center; }
button, .bouton {
  font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: 9px; padding: .7rem 1.1rem;
  background: var(--navy); color: var(--cream); text-decoration: none; display: inline-block; text-align: center;
}
button:hover, .bouton:hover { background: var(--navy-2); }
button.secondaire { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
button.danger { background: var(--err); }
button.lien { background: none; padding: 0; color: var(--navy); text-decoration: underline; font-weight: 500; }

.alerte { border-radius: 10px; padding: .8rem 1rem; margin: 0 0 1.2rem; }
.alerte.ok { background: #e6f0e8; color: var(--ok); }
.alerte.err { background: #f6e3df; color: var(--err); }

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.tuile { display: flex; flex-direction: column; justify-content: center; min-height: 110px; padding: 1.1rem; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); color: var(--navy); text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.tuile:hover { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(200,169,81,.25); }
.tuile small { font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: .2rem; }
.tuile.inactive { opacity: .55; pointer-events: none; }

table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
th { background: #f1ecdf; color: var(--navy); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.tableau { overflow-x: auto; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .7rem 1rem; margin-bottom: .6rem; }
details summary { cursor: pointer; font-weight: 600; color: var(--navy); }
details form { margin-top: .8rem; }
.rangee { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; }
.rangee > * { flex: 1 1 160px; }
.badge { display: inline-block; font-size: .78rem; padding: .1rem .5rem; border-radius: 99px; background: #efe6c9; color: #6b5a22; }
.badge.rouge { background: #f6e3df; color: var(--err); }
.muet { color: var(--muted); font-size: .9rem; }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.google { display: flex; justify-content: center; min-height: 44px; margin: 1.4rem 0 .4rem; }

@media (max-width: 560px) {
  .officine { border: 0; padding: 0; }
  .qui { margin-left: 0; width: 100%; justify-content: space-between; }
  h1 { font-size: 1.6rem; }
}
.espace-haut { margin-top: .7rem; }
