/* A MO BELLA VITTURA — charte : noir / blanc argenté / rouge */
:root {
  --bg: #0a0a0a;
  --bg2: #111;
  --card: #161616;
  --card2: #1d1d1d;
  --line: #2b2b2b;
  --text: #f3f3f3;
  --muted: #a9a9a9;
  --red: #e3201b;
  --red-hi: #ff3b33;
  --red-lo: #a8130f;
  --silver: linear-gradient(180deg, #ffffff 0%, #d9d9d9 45%, #9c9c9c 100%);
  --ok: #3ccf7a;
  --warn: #f0b429;
  --radius: 14px;
  --script: "Kaushan Script", cursive;
  --sans: "Montserrat", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.red { color: var(--red); }
.script { font-family: var(--script); font-weight: 400; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Titres façon logo ---------- */
.kicker { font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; color: var(--red); font-weight: 600; display: inline-flex; align-items: center; gap: 12px; }
.kicker::before, .kicker::after { content: ""; width: 28px; height: 2px; background: var(--red); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1.script, h2.script { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2.script { font-size: clamp(2rem, 4vw, 2.8rem); }
.silver { background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rule { height: 2px; background: linear-gradient(90deg, transparent, #cfcfcf 30%, #cfcfcf 70%, transparent); border: 0; margin: 0; opacity: .6; }

/* ---------- Header ---------- */
.demo-banner { background: #2a1614; color: #ffb4ad; text-align: center; font-size: .8rem; padding: 6px 12px; border-bottom: 1px solid #4a1f1b; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10,10,10,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--script); font-size: 1.45rem; white-space: nowrap; }
.brand img { border-radius: 50%; }
.brand .r { color: var(--red); }
.links { display: flex; gap: 6px; align-items: center; }
.links a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: .9rem; font-weight: 500; color: #d8d8d8; transition: .2s; }
.links a:hover { color: #fff; background: #1c1c1c; }
.links a.active { color: #fff; box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.links a.account { border: 1px solid #5a5a5a; margin-left: 8px; }
.links a.account:hover, .links a.account.active { border-color: var(--red); box-shadow: none; border-radius: 999px; }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.burger span { display: block; height: 2px; background: #fff; margin: 5px 0; transition: .25s; }
@media (max-width: 880px) {
  .burger { display: block; }
  .links { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #0d0d0d; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; }
  .site-header.open .links { display: flex; }
  .links a { padding: 12px 8px; border-radius: 8px; }
  .links a.active { box-shadow: inset 3px 0 0 var(--red); }
  .links a.account { margin: 8px 0 0; text-align: center; }
  .site-header.open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.open .burger span:nth-child(2) { opacity: 0; }
  .site-header.open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 999px; font: 600 .92rem var(--sans); letter-spacing: .04em; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: .2s; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 8px 24px -10px rgba(227,32,27,.8); }
.btn-red:hover { background: var(--red-hi); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: #6a6a6a; }
.btn-ghost:hover { border-color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-danger { background: transparent; border-color: #5b1a17; color: #ff8a83; }
.btn-danger:hover { background: #2a1210; }
.btn:disabled { opacity: .5; cursor: wait; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.page-hero { padding: 64px 0 40px; text-align: center; background: radial-gradient(ellipse at top, #241010 0%, transparent 60%); border-bottom: 1px solid var(--line); }
.page-hero p { color: var(--muted); max-width: 640px; margin: 0 auto; }

.hero { position: relative; padding: 56px 0 72px; overflow: hidden; background: radial-gradient(circle at 75% 40%, #2a0e0c 0%, transparent 55%), radial-gradient(circle at 10% 90%, #1a1a1a 0%, transparent 50%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.hero p.lead { font-size: 1.12rem; color: #cfcfcf; max-width: 540px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-logo { width: min(460px, 100%); margin-inline: auto; border-radius: 50%; box-shadow: 0 0 0 1px #262626, 0 30px 80px -20px rgba(227,32,27,.35); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 32px; font-size: .85rem; color: var(--muted); }
.hero-badges b { color: #fff; display: block; font-size: 1.05rem; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; text-align: center; } .hero p.lead { margin-inline: auto; } .hero .cta, .hero-badges { justify-content: center; } .hero-logo { width: 260px; order: -1; } }

/* ---------- Cartes ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; transition: .25s; }
.card:hover { border-color: #3d3d3d; }
.card h3 { font-size: 1.08rem; font-weight: 700; }
.card .price { font-size: 1.35rem; font-weight: 700; color: #fff; margin-top: auto; }
.card .price small { font-size: .78rem; color: var(--muted); font-weight: 500; display: block; }
.card.service { display: flex; flex-direction: column; gap: 6px; }
.card.service::before { content: ""; position: absolute; left: 24px; top: 0; width: 40px; height: 3px; background: var(--red); border-radius: 0 0 3px 3px; }
.card .meta { display: flex; justify-content: space-between; align-items: end; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.tag { display: inline-block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.feature { text-align: center; padding: 30px 22px; }
.feature .ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: #1f0f0e; border: 1px solid #4a1a17; }
.feature .ico svg { width: 26px; height: 26px; stroke: var(--red); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
.cat-title { font-family: var(--script); font-size: 1.9rem; margin: 40px 0 16px; display: flex; align-items: center; gap: 16px; }
.cat-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, #444, transparent); }

.promo { background: linear-gradient(135deg, #1d0c0b 0%, #151515 60%); border-color: #4a1a17; overflow: hidden; }
.promo .badge { position: absolute; top: 18px; right: -42px; transform: rotate(35deg); background: var(--red); color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .08em; padding: 6px 48px; }
.promo h3 { font-family: var(--script); font-weight: 400; font-size: 1.6rem; padding-right: 60px; }
.promo .until { font-size: .82rem; color: #ffb4ad; margin-top: 12px; }

.steps { counter-reset: s; }
.step { text-align: center; }
.step::before { counter-increment: s; content: counter(s); font-family: var(--script); font-size: 3rem; color: var(--red); display: block; line-height: 1; margin-bottom: 8px; }

.cta-band { background: linear-gradient(90deg, var(--red-lo), var(--red)); border-radius: 22px; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-family: var(--script); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }
.cta-band .btn { background: #0a0a0a; color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 40px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Formulaires ---------- */
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { form .row { grid-template-columns: 1fr; } }
label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 14px; color: #d0d0d0; }
input, select, textarea { width: 100%; margin-top: 6px; padding: 12px 14px; background: #0e0e0e; border: 1px solid #343434; border-radius: 10px; color: var(--text); font: 400 .95rem var(--sans); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(227,32,27,.18); }
textarea { min-height: 130px; resize: vertical; }
input[type=checkbox] { width: auto; margin: 0 8px 0 0; accent-color: var(--red); }
.check { display: flex; align-items: center; font-weight: 500; }
.form-note { font-size: .78rem; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 880px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.card, .info-list a { overflow-wrap: anywhere; }
.grid { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
@media (max-width: 520px) { dialog label[style*="inline-block"] { width: 100% !important; margin-right: 0 !important; } dialog form { padding: 20px; } .cta-band { padding: 28px 22px; } section { padding: 52px 0; } .user-bar > div:last-child { width: 100%; } }
.info-list p { margin: 0 0 14px; }
.info-list b { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--red); }

/* ---------- Espaces client / admin ---------- */
.auth-box { max-width: 460px; margin: 0 auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--muted); font: 600 .9rem var(--sans); padding: 12px 16px; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs button.on { color: #fff; border-bottom-color: var(--red); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar h2 { margin: 0; font-size: 1.3rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--bg2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td .btn + .btn { margin-left: 6px; }
.status { display: inline-block; align-self: flex-start; height: fit-content; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #262626; white-space: nowrap; }
.status.nouveau { background: #3a1210; color: #ff8a83; }
.status.en_cours, .status.devis { background: #3a2e10; color: var(--warn); }
.status.planifie { background: #10263a; color: #7cc4ff; }
.status.termine { background: #0f2e1d; color: var(--ok); }
.off { opacity: .45; }
.req { margin-bottom: 14px; }
.req header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.reply { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--red); background: #1b1111; border-radius: 0 10px 10px 0; font-size: .92rem; }
.user-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

dialog { background: var(--card); color: var(--text); border: 1px solid #3a3a3a; border-radius: 18px; padding: 0; width: min(560px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.7); }
dialog form { padding: 26px; }
dialog h3 { margin-bottom: 18px; }
dialog .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: #1f1f1f; border: 1px solid #3a3a3a; border-left: 4px solid var(--ok); padding: 14px 20px; border-radius: 10px; z-index: 999; transition: .3s; max-width: calc(100% - 32px); }
#toast.show { transform: translate(-50%, 0); }
#toast.err { border-left-color: var(--red); }

/* ---------- Footer ---------- */
.site-footer { background: #070707; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 48px; font-size: .9rem; }
.fgrid { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 32px; }
.flogo { border-radius: 50%; }
.site-footer h4 { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--red); margin: 0 0 12px; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { text-decoration: none; color: #d6d6d6; }
.site-footer a:hover { color: #fff; }
.fbottom { border-top: 1px solid var(--line); margin-top: 36px; padding: 18px 0; font-size: .78rem; color: #7a7a7a; text-align: center; }
@media (max-width: 880px) { .fgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .fgrid { grid-template-columns: 1fr; text-align: center; } .flogo { margin: 0 auto; } }

.loader { text-align: center; padding: 40px; color: var(--muted); }

/* Tableaux en fiches sur téléphone */
@media (max-width: 640px) {
  .table-wrap { border: 0; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 8px 4px; }
  .table-wrap td { border: 0; padding: 6px 14px; text-align: left; }
  .table-wrap td::before { content: attr(data-label); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 2px; }
  .table-wrap td[data-label=""]::before { display: none; }
  .table-wrap td[data-label=""] { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; }
  .table-wrap td { white-space: normal !important; min-width: 0; overflow-wrap: anywhere; }
  td .btn + .btn { margin-left: 0; }
}
