/* Espace client NETFILM — mêmes tokens que la page d'accueil (index.html) */
:root {
  --void: #050505; --deep: #0F0F0F; --card: #181818; --card2: #202020;
  --border: #2A2A2A; --red: #C41818; --red-h: #D82020;
  --silver: #C8C8C8; --text: #F2F0ED; --muted: #909090;
  --ok: #2e9e5b; --warn: #d9a21b;
  --gutter: clamp(1rem, 4vw, 2rem);
}
@media (prefers-color-scheme: light) {
  :root {
    --void: #F0EEEB; --deep: #E4E2DE; --card: #FFFFFF; --card2: #F8F6F3;
    --border: #DDDAD5; --red: #B01414; --red-h: #C41818;
    --silver: #555; --text: #0A0A0A; --muted: #5A5A5A;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--void); color: var(--text);
  font: 1rem/1.6 "Helvetica Neue", Arial, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: inherit; }
main { flex: 1; padding-block: 2rem 3rem; }
.wrap { width: 100%; max-width: 980px; margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3 { font-family: Georgia, "Palatino Linotype", serif; letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 1.25rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .85rem; }
h3 { font-size: 1.05rem; }
h3.section { margin: 1.5rem 0 .75rem; color: var(--silver); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-family: inherit; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.accent { color: var(--red); }

/* Barre du haut */
.topbar { background: var(--deep); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 58px; flex-wrap: wrap; }
.brand { font: 700 1.4rem Georgia, serif; text-decoration: none; letter-spacing: -0.03em; }
.brand-net { color: var(--red); } .brand-film { color: var(--silver); }
.menu { display: flex; gap: 1rem; margin-right: auto; }
.menu a { text-decoration: none; color: var(--muted); padding: .25rem .1rem; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--text); }
.menu a.on { color: var(--text); border-bottom-color: var(--red); }
.logout { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.who { color: var(--muted); font-size: .85rem; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.link { background: none; border: none; color: var(--text); cursor: pointer; text-decoration: underline; font: inherit; font-size: .9rem; }

/* Cartes & formulaires */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.form { display: grid; gap: 1rem; }
.form label { font-size: .9rem; color: var(--muted); }
.form input[type=text], .form input[type=password] {
  width: 100%; padding: .75rem .9rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card2); color: var(--text); font: inherit;
}
.form input:focus-visible, .search:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
fieldset { border: none; display: grid; gap: .6rem; }
legend { font-weight: 600; margin-bottom: .5rem; }

.btn {
  display: inline-block; text-align: center; background: var(--red); color: #fff; border: none;
  padding: .85rem 1.4rem; border-radius: 8px; font: 600 1rem inherit; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--red-h); }
.small-btn { padding: .5rem 1rem; font-size: .9rem; }

.flash { padding: .85rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; border: 1px solid var(--border); background: var(--card); }
.flash-error { border-color: var(--red); }
.flash-success { border-color: var(--ok); }
.note { padding: .7rem .9rem; border-left: 3px solid var(--warn); background: var(--card2); border-radius: 4px; font-size: .9rem; }

.auth { max-width: 420px; margin-inline: auto; }
.auth .muted { margin-bottom: 1.25rem; }
.auth .small { margin-top: 1.25rem; }

/* Statut abonnement */
.status-title { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: .6rem; }
.dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--muted); }
.status-on .dot { background: var(--ok); } .status-on { border-color: color-mix(in srgb, var(--ok) 50%, var(--border)); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-top: 1rem; }
.facts dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.facts dd { font-size: 1.15rem; font-weight: 600; }

/* Choix de formule / durée */
.choices { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.choices.inline { grid-template-columns: repeat(auto-fit, minmax(90px, max-content)); }
.choice, .chip { cursor: pointer; position: relative; }
.choice input, .chip input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body { display: grid; gap: .25rem; padding: 1rem; border: 2px solid var(--border); border-radius: 12px; background: var(--card2); height: 100%; }
.choice-body ul { list-style: none; margin-top: .4rem; font-size: .88rem; }
.choice-body li::before { content: "✓ "; color: var(--red); }
.choice input:checked + .choice-body { border-color: var(--red); }
.choice input:focus-visible + .choice-body, .chip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.chip span { display: block; padding: .55rem 1rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card2); text-align: center; }
.chip input:checked + span { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.total { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-radius: 8px; background: var(--card2); }
.total strong { font-size: 1.35rem; color: var(--red); }

/* Tableaux */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
tr:last-child td { border-bottom: none; }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--card2); border: 1px solid var(--border); color: var(--muted); }
.badge.on { background: color-mix(in srgb, var(--ok) 18%, var(--card)); border-color: var(--ok); color: var(--ok); }

/* Locations */
.rentals { list-style: none; padding: 0; }
.rentals li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1.25rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.rentals li:last-child { border-bottom: none; }
.search { width: 100%; margin: 1rem 0; padding: .75rem .9rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card2); color: var(--text); font: inherit; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.movie { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.poster { aspect-ratio: 2 / 3; background: var(--card2) center / cover no-repeat; }
.movie-body { padding: .85rem; display: grid; gap: .35rem; align-content: start; flex: 1; }
.movie-body h3 { font-size: .98rem; }
.price { font-weight: 700; color: var(--red); }

.foot { border-top: 1px solid var(--border); padding-block: 1.25rem; color: var(--muted); font-size: .85rem; }

@media (max-width: 560px) {
  .topbar-inner { gap: .5rem 1rem; padding-block: .5rem; }
  .logout { width: 100%; justify-content: space-between; margin-left: 0; }
  .menu { order: 3; width: 100%; }
}
