/* Naturel Fitness · espace membre et administration (maquette)
   Ajuster les couleurs ci-dessous pour coller au CSS du site. */
:root {
  /* Couleurs, polices et arrondis : réglés par le thème actif (themes.css).
     Les noms --green viennent d'une version précédente : ils portent la couleur principale. */
  --green: var(--t-strong);      /* couleur principale (liens, actifs, focus) */
  --green-d: var(--t-strong);
  --green-h: var(--t-hover);
  --green-l: var(--t-soft);
  --pink: var(--t-pop);
  --orange: var(--t-accent);
  --orange-l: var(--t-accent-soft);
  --ok: #2c8a57;
  --ok-l: #e4f4eb;
  --bg: var(--t-bg-alt);
  --card: var(--t-card);
  --text: var(--t-ink);
  --muted: var(--t-muted);
  --line: var(--t-line);
  --dark: var(--t-dark);
  --red: #c8372d;
  --red-l: #fdeceb;
  --blue: #3a64a5;
  --blue-l: #eaf0f9;
  --grey-l: color-mix(in srgb, var(--t-line) 60%, var(--t-bg-alt));
  --radius: calc(var(--t-radius) - 4px);
  --shadow: var(--t-shadow);
  --font: var(--t-body);
  --title: var(--t-title);
  --script: var(--t-script);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15.5px; line-height: 1.55; }
a { color: var(--green); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-family: var(--title); letter-spacing: -.01em; }
h1 { font-weight: 800; }
h2, h3, h4 { font-weight: 700; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }

/* Bandeau maquette */
.mock-banner { background: var(--dark); color: #fff; text-align: center; font: 600 .82rem var(--font); padding: 8px 16px; }
.mock-banner strong { color: var(--orange); }

/* En-tête du site */
.site-header { background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-header .inner { max-width: 1160px; margin: 0 auto; padding: 0 20px; height: 76px; display: flex; align-items: center; gap: 24px; }
.site-header .logo img { height: 46px; width: auto; }
.site-header nav { display: flex; gap: 26px; flex-wrap: wrap; flex: 1; justify-content: flex-end; font: 600 .95rem var(--title); }
.site-header nav a { color: var(--text); text-decoration: none; }
.site-header nav a:hover, .site-header nav a.active { color: var(--green-d); }
.site-header nav a.admin-link { color: var(--green-d); font-weight: 700; }
.user-chip { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 4px 14px 4px 4px; border: 1px solid var(--line); border-radius: 999px; font: 600 .9rem var(--title); background: var(--card); flex: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--pink); color: #fff; display: grid; place-items: center; font: 700 .78rem var(--title); flex: none; }
.avatar.admin { background: var(--dark); }
.burger { display: none; font-size: 1.5rem; background: none; border: 0; cursor: pointer; color: var(--text); }
@media (max-width: 900px) { .site-header nav { display: none; } .burger { display: block; } .site-header .inner { justify-content: space-between; } }
.nf-drawer { position: fixed; inset: 0; z-index: 110; background: color-mix(in srgb, var(--dark) 45%, transparent); }
.nf-drawer[hidden] { display: none; }
.nf-drawer .panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(340px, 86vw); background: var(--card); padding: 72px 28px 28px; display: flex; flex-direction: column; overflow-y: auto; }
.nf-drawer .panel a { font: 700 1.15rem var(--title); text-decoration: none; color: var(--text); padding: 12px 0; border-bottom: 1px solid var(--line); }
.nf-drawer .panel a.admin-link { color: var(--green-d); }
.nf-drawer .x { position: absolute; top: 18px; right: 18px; border: 0; background: var(--bg); width: 42px; height: 42px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--t-btn-radius); padding: 10px 20px; font: 700 .88rem var(--title); cursor: pointer; text-decoration: none; background: var(--green-d); color: #fff; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { background: var(--green-h); transform: translateY(-1px); }
[hidden] { display: none !important; }
.btn.secondary { background: var(--card); color: var(--text); border-color: transparent; box-shadow: inset 0 0 0 2px var(--text); }
.btn.secondary:hover { background: var(--text); color: var(--card); }
.btn.orange { background: var(--t-grad); }
.btn.orange:hover { background: var(--green-h); }
.btn.danger { background: var(--card); color: var(--red); border-color: transparent; box-shadow: inset 0 0 0 2px #f1c4c0; }
.btn.danger:hover { background: var(--red-l); }
.btn.ghost { background: transparent; color: var(--green-d); padding: 6px 10px; }
.btn.ghost:hover { background: var(--green-l); }
.btn.sm { padding: 6px 13px; font-size: .8rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Cartes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font: 700 .72rem var(--title); letter-spacing: .02em; background: var(--grey-l); color: var(--muted); white-space: nowrap; }
.badge.green { background: var(--ok-l); color: var(--ok); }
.badge.pink { background: var(--green-l); color: var(--green-d); }
.badge.orange { background: var(--orange-l); color: #b8501f; }
.badge.red { background: var(--red-l); color: var(--red); }
.badge.blue { background: var(--blue-l); color: var(--blue); }

/* Statistiques */
.stat .label { font-size: .82rem; color: var(--muted); }
.stat .value { font: 800 1.8rem var(--title); margin: 2px 0; }
.stat .delta { font-size: .8rem; color: var(--ok); }
.stat .delta.down { color: var(--red); }

/* Tableaux */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--bg); }
td.actions { text-align: right; white-space: nowrap; }
.thumb { width: 64px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--grey-l); }

/* Formulaires */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: .84rem; font-weight: 600; }
.field .hint { font-size: .78rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  font: inherit; font-size: .92rem; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green-l); border-color: var(--green); }
textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: #d6d1c7; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { left: 19px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search] { max-width: 260px; }
.toolbar select { width: auto; }

/* Dépôt de fichier */
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted); cursor: pointer; background: color-mix(in srgb, var(--card) 60%, var(--bg)); }
.drop:hover { border-color: var(--green); color: var(--green); }
.progress { height: 10px; border-radius: 999px; background: var(--grey-l); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); width: 0; transition: width .2s; }

/* Onglets */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: none; font: 600 .9rem var(--title); padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--green-d); border-bottom-color: var(--pink); font-weight: 700; }

/* Encadrés */
.notice { border-radius: 12px; padding: 12px 16px; font-size: .9rem; display: flex; gap: 12px; align-items: flex-start; }
.notice.info { background: var(--blue-l); color: #24496f; }
.notice.warn { background: var(--orange-l); color: #8a3d17; }
.notice.ok { background: var(--ok-l); color: #1f6640; }
.notice.phase2 { background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 10px, var(--grey-l) 10px, var(--grey-l) 20px); color: var(--muted); border: 1px dashed #d8d2c6; }
.locked { position: relative; }
.locked > .lock-overlay { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 72%, transparent); display: grid; place-items: center; border-radius: var(--radius); z-index: 2; }

/* Fenêtre modale et panneau latéral */
.overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--dark) 45%, transparent); z-index: 80; display: none; }
.overlay.open { display: block; }
.modal { position: fixed; z-index: 90; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.2); padding: 24px; display: none; }
.modal.open { display: block; }
.modal .close, .drawer .close { position: absolute; top: 14px; right: 14px; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }
.drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--card); box-shadow: -10px 0 40px rgba(0,0,0,.15); padding: 24px; overflow: auto; transform: translateX(100%); transition: transform .2s; }
.drawer.open { transform: none; }

/* Notifications */
.toast-zone { position: fixed; top: 16px; right: 16px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--dark); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow); animation: tin .2s; max-width: 340px; }
.toast.err { background: var(--red); }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } }

/* Divers */
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.dots { display: flex; gap: 6px; }
.dots span { width: 16px; height: 16px; border-radius: 50%; background: var(--green); }
.dots span.used { background: var(--green-l); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.list-plain li:last-child { border-bottom: none; }
.grid > .card + .card, .grid > .card { margin-top: 0; }
.switch input { flex: none; }

/* Pages de compte (auth.js) */
input[type=tel] { font: inherit; font-size: .92rem; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); width: 100%; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=tel], select, textarea { border-color: #a99fae; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--pink); outline-offset: 1px; border-color: var(--green-d); }
input[aria-invalid=true] { border-color: var(--red); }
.auth-wrap { max-width: 1100px; margin: 40px auto 120px; padding: 0 16px; }
.auth-card { max-width: 460px; margin: 0 auto; padding: 32px; }
.auth-card.wide { max-width: 620px; }
.auth-card.center { text-align: center; }
.auth-card h1 { font-size: 1.8rem; }
.auth-card form { margin-top: 20px; }
.auth-card .script { font-family: var(--script); font-size: 1.8rem; color: var(--green-d); margin: 0; line-height: 1.1; }
.auth-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--green-l); display: grid; place-items: center; font-size: 1.8rem; }
.field .optional { font-weight: 400; color: var(--muted); }
.field-error { color: var(--red); font-size: .84rem; font-weight: 600; margin: 2px 0 0; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 90px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 6px 10px; border-radius: 8px; cursor: pointer; font: 700 .8rem var(--title); color: var(--green-d); }
.pw-toggle:hover { background: var(--green-l); }
.check-line { margin: 4px 0 20px; font-size: .9rem; }
.check-line label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check-line input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--green-d); }
.btn.block { width: 100%; padding: 13px 20px; font-size: .95rem; }
.auth-alt { text-align: center; margin: 20px 0 0; font-size: .9rem; color: var(--muted); }
.auth-card .notice { margin: 16px 0; text-align: left; }
.demo-hint { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); font-size: .82rem; color: var(--muted); text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Proposition de l'IA pour une vidéo (admin-ia.js) */
.ia-card { margin-top: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--orange-l) 40%, var(--card)); }
.ia-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ia-head h3 { margin: 0; }
.ia-card h4 { margin: 16px 0 8px; font-size: .9rem; }
.ia-card .notice { margin-bottom: 12px; }
.ia-dl { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; margin: 0; font-size: .92rem; }
.ia-dl dt { font-weight: 700; }
.ia-dl dd { margin: 0; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--green-l); color: var(--green-d); font: 700 .8rem var(--title); }
.chip.fixed { padding-right: 12px; background: var(--grey-l); color: var(--muted); }
.chip button { border: 0; background: none; cursor: pointer; width: 24px; height: 24px; border-radius: 50%; color: inherit; font-size: 1rem; line-height: 1; }
.chip button:hover { background: rgba(0, 0, 0, .08); }
.chip-add { display: flex; gap: 8px; margin-top: 8px; max-width: 420px; }
.ia-chap { margin: 0; padding-left: 0; list-style: none; font-size: .9rem; }
.ia-chap span { display: inline-block; min-width: 48px; font-variant-numeric: tabular-nums; color: var(--muted); }
.ia-actions { margin: 16px 0 10px; }

/* Réservation des séances côté cliente (espace-resa.js) */
.resa-top { margin-bottom: 16px; }
.resa-week { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.resa-day h3 { font-size: .95rem; margin: 0 0 8px; }
.resa-slots { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.resa-slot { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: .88rem; }
.resa-act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; max-width: 50%; }
.resa-pay { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 14px 0; display: grid; gap: 10px; }
.resa-pay legend { font-weight: 700; padding: 0 6px; }
.resa-pay label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.resa-pay input { accent-color: var(--green-d); width: 18px; height: 18px; }

/* Photos d'Émilie : cadrage sur le visage, quel que soit le format du cadre */
img[src$="portrait.jpg"] { object-position: 50% 4%; }
img[src$="emilie02.jpg"] { object-position: 35% 22%; }
img[src$="salle03.jpg"] { object-position: 50% 8%; }

/* Ajout d'une vidéo : barre en quatre étapes (avenant, partie vidéos) */
.chip.tag { padding-right: 12px; }
.ia-steps { margin: 4px 0 14px; }
.ia-steps ol { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ia-steps li { display: flex; align-items: center; gap: 8px; font: 700 .85rem var(--title); color: var(--muted); padding: 8px 10px; border-radius: 10px; background: var(--grey-l); }
.ia-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--muted); font-size: .8rem; flex: none; }
.ia-steps li.cur { color: var(--green); background: var(--green-l); }
.ia-steps li.cur span { background: var(--green); color: #fff; }
.ia-steps li.ok { color: var(--ok); background: var(--ok-l); }
.ia-steps li.ok span { background: var(--ok); color: #fff; }
.ia-steps li.err { color: var(--red); background: var(--red-l); }
.ia-steps li.err span { background: var(--red); color: #fff; }
.progress.ia-indet > span { width: 35%; animation: ia-indet 1.4s ease-in-out infinite; }
@keyframes ia-indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .progress.ia-indet > span { animation: none; width: 100%; opacity: .5; } }
@media (max-width: 600px) { .ia-steps ol { grid-template-columns: repeat(2, 1fr); } }

/* À classer : relecture des fiches proposées par Gemini (admin.js, classement.js) */
.cl-tabs { gap: 8px; margin-bottom: 12px; }
.cl-bar { height: 8px; border-radius: 999px; background: var(--grey-l); overflow: hidden; }
.cl-bar span { display: block; height: 100%; background: var(--green-d); }
.cl-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.cl-head img, .cl-ph { width: 150px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; flex: none; background: var(--grey-l); display: grid; place-items: center; color: var(--muted); font-size: .8rem; }
.cl-tog { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-t { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: 600 .85rem var(--title); cursor: pointer; }
.cl-t:hover { border-color: var(--green-d); }
.cl-t.on { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.cl-t.on.doute { background: #fff3c4; border: 2px dashed #b8860b; color: #6b4e00; }
.cl-t small { font-weight: 500; opacity: .85; }
.cl-der { margin-top: 10px; }
.cl-der summary { cursor: pointer; font-weight: 700; }
.cl-der .ia-chap li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.cl-der .ia-chap li.doute { background: #fff8dc; }
@media (max-width: 800px) { #cl .grid { grid-template-columns: 1fr !important; } .cl-head img, .cl-ph { width: 110px; } }
