/* Malie Coiffure — styles communs + site client (mobile d'abord) */
:root {
  --primary: #c4670a;
  --primary-d: #934d07;
  --primary-l: #fcefe2;
  --accent: #f49a19;
  --bg: #faf7f5;
  --card: #fff;
  --text: #262321;
  --muted: #756d67;
  --border: #e9e2dc;
  --ok: #2e7d32;
  --warn: #b26a00;
  --ko: #c62828;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 32, 36, .06), 0 4px 16px rgba(43, 32, 36, .06);
  --tap: 44px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .6em 0 .5em; }
h2 { font-size: 1.2rem; margin: 1.2em 0 .5em; }
h3 { font-size: 1rem; margin: 1em 0 .4em; }
.container { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.lead { font-size: 1.15rem; font-weight: 600; }
[hidden] { display: none !important; }

/* Formulaires */
label { display: block; font-weight: 600; font-size: .92rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-weight: 400; color: inherit;
  min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; margin: 0; display: inline-block; accent-color: var(--primary); flex: none; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.stack > * + * { margin-top: 14px; }
.row2, .row3 { display: grid; gap: 12px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); } }
.field > label { margin-bottom: 4px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap);
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .05s;
}
.btn:active { transform: scale(.98); }
.btn:hover { background: #f6f0f3; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-danger { color: var(--ko); border-color: #f1c6c6; }
.btn-danger:hover { background: #fdecec; }
.btn-lg { width: 100%; min-height: 52px; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-link { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 8px; }
.icon-btn { background: none; border: 0; font-size: 1.1rem; min-width: 40px; min-height: 40px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: #f3edf0; }

/* Cartes, alertes, badges */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 14px 0; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 12px 0; }
.alert-success { background: #e8f5e9; color: #1b5e20; }
.alert-error { background: #fdecec; color: #8e1c1c; }
.alert-info { background: #eef3fb; color: #1d3f72; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: #f0eaed; color: var(--muted); vertical-align: middle; }
.badge-ok { background: #e8f5e9; color: var(--ok); }
.badge-warn { background: #fff3e0; color: var(--warn); }
.badge-ko { background: #fdecec; color: var(--ko); }
.tag { font-size: .78rem; background: var(--primary-l); color: var(--primary); padding: 1px 7px; border-radius: 6px; font-weight: 600; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; vertical-align: middle; }
.dot.lg { width: 22px; height: 22px; }
.back { display: inline-block; margin: 14px 0 0; text-decoration: none; font-weight: 600; min-height: 32px; }

/* En-tête site */
.topbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 58px; gap: 10px; }
.brand { font-weight: 800; font-size: 1.1rem; color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.brand.big { font-size: 1.5rem; justify-content: center; width: 100%; margin: 30px 0 10px; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; background: var(--primary); color: #fff; border-radius: 9px; font-size: 1rem; }
.topnav { display: flex; gap: 4px; }
.topnav a { text-decoration: none; color: var(--text); padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: .92rem; }
.topnav a:hover { background: var(--primary-l); }
.footer { margin-top: 50px; padding: 24px 0 40px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); }
main.container { padding-bottom: 110px; }

/* Accueil / prestations */
.hero { padding: 10px 0 0; }
.steps-bar { display: flex; gap: 6px; list-style: none; padding: 0; margin: 10px 0 16px; font-size: .82rem; }
.steps-bar li { flex: 1; text-align: center; padding: 6px 4px; border-radius: 8px; background: #efe8eb; color: var(--muted); font-weight: 600; }
.steps-bar li.on { background: var(--primary); color: #fff; }
.steps-bar li.done { background: var(--primary-l); color: var(--primary); }
.service-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .service-grid { grid-template-columns: 1fr 1fr; } }
.service-card {
  display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; border: 2px solid transparent; transition: border-color .15s, transform .1s;
}
.service-card:hover { border-color: var(--primary); }
.service-card:active { transform: scale(.99); }
.service-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.service-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.service-price { font-weight: 800; color: var(--primary); font-size: 1.1rem; }
.service-icon { display: grid; place-items: center; width: 52px; height: 52px; font-size: 1.7rem; background: var(--primary-l); border-radius: 14px; flex: none; }
.service-icon.sm { width: 40px; height: 40px; font-size: 1.3rem; border-radius: 10px; }
.service-summary { display: flex; gap: 14px; align-items: center; }

/* Choix du créneau */
.day-strip-wrap { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.nav-btn { flex: none; width: 40px; height: 72px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-size: 1.6rem; cursor: pointer; color: var(--primary); }
.nav-btn:disabled { opacity: .3; }
.day-strip { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; flex: 1; padding: 4px 2px; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-btn {
  flex: 1 0 64px; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; gap: 0;
  border: 1px solid var(--border); background: #fff; border-radius: 12px; cursor: pointer; font: inherit; color: inherit; min-height: 72px;
}
.day-btn .dow { font-size: .75rem; text-transform: uppercase; color: var(--muted); }
.day-btn .num { font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.day-btn .mon { font-size: .72rem; color: var(--muted); }
.day-btn .cnt { font-size: .68rem; color: var(--ok); font-weight: 600; margin-top: 2px; }
.day-btn.empty { opacity: .45; cursor: default; }
.day-btn.empty .cnt { color: var(--muted); }
.day-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.day-btn.on .dow, .day-btn.on .mon, .day-btn.on .cnt { color: #fff; }
.day-title { margin-top: 18px; }
.slot-group h3 { font-size: .85rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot {
  min-height: var(--tap); border-radius: 10px; border: 1.5px solid var(--primary); background: #fff; color: var(--primary);
  font: inherit; font-weight: 700; cursor: pointer;
}
.slot:hover { background: var(--primary-l); }
.slot.on { background: var(--primary); color: #fff; }
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 20px rgba(0, 0, 0, .1);
}
.sticky-cta form { margin: 0; }

/* Onglets identification */
.tabs { display: flex; gap: 4px; background: #efe8eb; padding: 4px; border-radius: 12px; margin-top: 14px; }
.tabs button { flex: 1; min-height: 42px; border: 0; background: none; border-radius: 9px; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--primary); box-shadow: var(--shadow); }

/* RDV / compte */
.code-box { background: var(--primary-l); padding: 12px 16px; border-radius: 10px; text-align: center; }
.code-box strong { display: block; font-size: 1.6rem; letter-spacing: .2em; color: var(--primary); font-family: ui-monospace, Menlo, Consolas, monospace; }
.code-input { text-transform: uppercase; letter-spacing: .2em; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.2rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.actions form { margin: 0; }
.big-icon { font-size: 3rem; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  text-decoration: none; color: inherit; min-height: 60px;
}
.list-item:hover { box-shadow: 0 0 0 2px var(--primary-l), var(--shadow); }
.list-item .chev { margin-left: auto; color: var(--muted); font-size: 1.4rem; }
.faded { opacity: .55; }
details > summary { cursor: pointer; font-weight: 600; min-height: 32px; list-style-position: inside; }
details[open] > summary { margin-bottom: 12px; }

/* Bandeau d'environnement de test */
.env-banner { background: repeating-linear-gradient(135deg, #ffcc00 0 14px, #ffd633 14px 28px); color: #3b2a00; text-align: center; font-weight: 700; font-size: .82rem; padding: 4px 10px; }

/* Mode test : emails affichés à l'écran */
.dev-mails { border: 2px dashed #e0a800; background: #fffbea; border-radius: 12px; padding: 10px 14px; margin: 12px 0; }
.dev-mails-head { font-weight: 700; color: #7a5a00; margin-bottom: 6px; }
.dev-mails details { border-top: 1px solid #f0e2a8; padding: 6px 0; }
.dev-mail-body { background: #fff; border-radius: 8px; padding: 12px 16px; margin-top: 6px; font-size: .92rem; }

/* Page de connexion back-office */
.login-box { max-width: 400px; margin: 0 auto; }
body.bare { min-height: 100vh; background: linear-gradient(160deg, #fcefe2, #faf7f5 60%); }

/* Pages du site (mini-CMS) */
.topbar-inner { min-width: 0; }
.topnav { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.topnav a { white-space: nowrap; }
.page-content { line-height: 1.65; }
.page-content img { max-width: 100%; height: auto; border-radius: 10px; }
.page-content figure { margin: 18px 0; }
.page-content figcaption { color: var(--muted); font-size: .875rem; text-align: center; }
.page-content blockquote { margin: 16px 0; padding: 8px 16px; border-left: 4px solid var(--accent); color: var(--muted); font-style: italic; }
.page-content table { border-collapse: collapse; width: 100%; }
.page-content th, .page-content td { border-bottom: 1px solid var(--border); padding: 8px; text-align: left; }
.page-content .align-center { text-align: center; }
.page-content .align-right { text-align: right; }
.page-content a.btn { text-decoration: none; }
.page-content h2 { margin-top: 1.4em; }

/* Icônes au trait (SVG) */
.ico { width: 1em; height: 1em; flex: none; }
.ico-inline { width: 1.05em; height: 1.05em; vertical-align: -.17em; }
.btn .ico { width: 1.15em; height: 1.15em; vertical-align: -.2em; }
.service-icon { color: var(--primary); }
.service-icon .ico { width: 26px; height: 26px; }
.service-icon.sm .ico { width: 20px; height: 20px; }
.big-icon .ico { width: 56px; height: 56px; color: var(--primary); }
.icon-picker button .ico { width: 22px; height: 22px; }
.icon-picker button.on { color: var(--primary); }
