/* assets/css/platform.css — plateforme de création de sites */
:root {
  --navy: #1f2d5c;
  --navy-2: #253675;
  --pink: #e83362;
  --ink: #1b2233;
  --muted: #5d6679;
  --line: #e3e6ee;
  --bg: #f6f7fb;
  --card: #ffffff;
  --ok: #12805c;
  --warn: #b25e00;
  --err: #c0392b;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(23, 33, 66, .08);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
a { color: var(--navy-2); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }

/* Barre du haut */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--navy); text-decoration: none; font-size: 1.05rem; }
.brand__mark { color: var(--pink); font-size: 1.2rem; }
.topbar__nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .95rem; }
.topbar__nav a { text-decoration: none; color: var(--ink); }
.topbar__nav a:hover { color: var(--pink); }
.topbar__nav .btn { color: #fff; }

.main { padding: 2rem 0 4rem; min-height: 60vh; }
.foot { border-top: 1px solid var(--line); background: #fff; font-size: .9rem; color: var(--muted); }
.foot__in { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.foot a { color: var(--muted); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 0; border-radius: 10px; background: var(--pink); color: #fff; font: inherit; font-weight: 700; padding: .8rem 1.3rem; cursor: pointer; text-decoration: none; line-height: 1.2; transition: transform .12s, box-shadow .12s, background .12s; }
.btn:hover { box-shadow: 0 6px 18px rgba(232, 51, 98, .28); transform: translateY(-1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--small { padding: .5rem .9rem; font-size: .92rem; }
.btn--navy { background: var(--navy-2); }
.btn--navy:hover { box-shadow: 0 6px 18px rgba(37, 54, 117, .25); }
.btn--ghost { background: #fff; color: var(--navy-2); border: 1px solid var(--line); }
.btn--ghost:hover { box-shadow: var(--shadow); }
.btn--danger { background: var(--err); }
.btn--link { background: none; color: var(--navy-2); padding: 0; text-decoration: underline; font-weight: 600; }
.btn--link:hover { box-shadow: none; transform: none; }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }

/* Alertes */
.alert { padding: .8rem 1rem; border-radius: 10px; margin: 0 0 1rem; border: 1px solid; }
.alert--success { background: #e9f7f1; border-color: #b6e3cf; color: #0d5c41; }
.alert--error { background: #fdecea; border-color: #f5c2bc; color: #8f2318; }
.alert--info { background: #eef2fd; border-color: #c9d4f6; color: #1f2d5c; }
.alert--warn { background: #fff5e6; border-color: #f6d39d; color: #7a4100; }

/* Cartes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; margin-bottom: 1.25rem; }
.card h2 { font-size: 1.25rem; }
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Accueil */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(232, 51, 98, .18), transparent 60%), linear-gradient(135deg, #1f2d5c, #2c3f86); color: #fff; padding: 4.5rem 0 4rem; margin-top: -2rem; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.hero p.lead { font-size: 1.15rem; opacity: .92; max-width: 36rem; }
.hero .btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.hero__visual { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 18px; padding: 1rem; }
.mock { background: #fff; border-radius: 12px; overflow: hidden; color: var(--ink); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.mock__bar { height: 26px; background: #eef0f5; display: flex; gap: 6px; align-items: center; padding: 0 10px; }
.mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: #cfd4df; }
.mock__hero { background: linear-gradient(135deg, #2f4f3e, #4a7c59); color: #fff; padding: 1.4rem 1.2rem; }
.mock__hero b { display: block; font-size: 1.05rem; margin-bottom: .3rem; }
.mock__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: .9rem; }
.mock__cards span { height: 52px; border-radius: 8px; background: #f3f5f9; }
.mock__ai { margin: 0 .9rem .9rem; padding: .55rem .7rem; border-radius: 8px; background: #f5f1ff; color: #5b3fd1; font-size: .85rem; }
.section { padding: 3.5rem 0 1rem; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.steps li { list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--pink); color: #fff; font-weight: 800; margin-bottom: .6rem; }
.steps { padding: 0; margin: 0; }

/* Offres */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: stretch; }
.plan { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem 1.4rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan--pro { border: 2px solid var(--pink); }
.plan--pro::after { content: "Le plus choisi"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--pink); color: #fff; font-size: .78rem; font-weight: 700; padding: .2rem .7rem; border-radius: 99px; }
.plan--off { opacity: .8; }
.plan__soon { position: absolute; top: 14px; right: 14px; background: #fff5e6; color: var(--warn); font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: 99px; }
.plan__tag { color: var(--muted); margin-bottom: .8rem; }
.plan__price { margin: 0; }
.plan__price strong { font-size: 2.2rem; }
.plan__price span { color: var(--muted); }
.plan__plus { font-size: .9rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: .9rem; }
.plan__plus b { color: var(--ink); }
.plan__feat { padding: 0; margin: .4rem 0 1.2rem; list-style: none; flex: 1; }
.plan__feat li { padding: .3rem 0 .3rem 1.6rem; position: relative; }
.plan__feat li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.plan__pick { display: flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid var(--line); border-radius: 10px; padding: .65rem; cursor: pointer; font-weight: 700; }
.plan:has(input:checked) { outline: 3px solid rgba(232, 51, 98, .35); }
.plan:has(input:checked) .plan__pick { background: var(--pink); color: #fff; border-color: var(--pink); }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: .7rem; }
.faq summary { font-weight: 700; cursor: pointer; }

/* Formulaires */
.form { display: grid; gap: 1rem; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.field small { display: block; color: var(--muted); font-size: .84rem; margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=number], select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid #cfd4e0; border-radius: 10px; padding: .65rem .8rem; transition: border-color .12s, box-shadow .12s; }
textarea { min-height: 5.5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(37, 54, 117, .14); }
.check { display: flex; gap: .55rem; align-items: flex-start; }
.check input { margin-top: .3rem; }

/* Tunnel */
.wizard { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; align-items: start; }
.wizard__nav { position: sticky; top: 84px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; }
.wizard__nav ol { list-style: none; margin: 0; padding: 0; }
.wizard__nav button { width: 100%; text-align: left; background: none; border: 0; font: inherit; padding: .6rem .7rem; border-radius: 8px; cursor: pointer; color: var(--muted); display: flex; gap: .6rem; align-items: center; }
.wizard__nav button b { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #eef0f5; color: var(--muted); font-size: .85rem; flex: none; }
.wizard__nav button.is-active { background: #f1f3fa; color: var(--ink); font-weight: 700; }
.wizard__nav button.is-active b, .wizard__nav button.is-done b { background: var(--navy-2); color: #fff; }
.wizard__panel { display: none; }
.wizard__panel.is-active { display: block; }
.wizard__foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; flex-wrap: wrap; }
.ai-box { border: 1px dashed #c7b8ff; background: #faf8ff; border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1.25rem; }
.ai-btn { display: inline-flex; align-items: center; gap: .25rem; margin-left: .35rem; padding: .05rem .5rem; border: 1px solid #c7b8ff; border-radius: 99px; background: #f5f1ff; color: #5b3fd1; font-size: .78rem; cursor: pointer; font-weight: 600; vertical-align: middle; }
.ai-btn:hover { background: #ebe4ff; }
.ai-menu { position: absolute; z-index: 999; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: .3rem; min-width: 13rem; }
.ai-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; padding: .45rem .6rem; border-radius: 6px; cursor: pointer; }
.ai-menu button:hover { background: #f3f0ff; }
.busy { position: relative; pointer-events: none; opacity: .65; }
.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.repeat { display: grid; gap: .8rem; }
.repeat__item { border: 1px solid var(--line); border-radius: 12px; padding: .9rem; background: #fcfcfe; }
.repeat__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; font-weight: 700; font-size: .9rem; color: var(--muted); }

.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem; }
.theme { border: 2px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; background: #fff; display: block; }
.theme input { position: absolute; opacity: 0; pointer-events: none; }
.theme:has(input:checked) { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(232, 51, 98, .2); }
.theme:has(input:focus-visible) { outline: 3px solid var(--navy-2); }
.theme__mini { height: 92px; padding: .6rem; display: flex; flex-direction: column; gap: .35rem; }
.theme__mini i { display: block; height: 10px; border-radius: 4px; }
.theme__mini .t { font-weight: 800; font-size: .95rem; }
.theme__mini .b { width: 46%; height: 16px; border-radius: 99px; }
.theme__name { padding: .5rem .7rem; font-size: .88rem; border-top: 1px solid var(--line); }
.theme__name small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.3; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; }
.photo { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: #eef0f5; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo span { position: absolute; left: .4rem; top: .4rem; background: rgba(0, 0, 0, .6); color: #fff; font-size: .72rem; padding: .1rem .45rem; border-radius: 99px; }
.photo button { position: absolute; right: .35rem; top: .35rem; border: 0; background: rgba(255, 255, 255, .92); border-radius: 50%; width: 1.8rem; height: 1.8rem; cursor: pointer; font-size: 1rem; line-height: 1; }
.drop { border: 2px dashed #cfd4e0; border-radius: 12px; padding: 1.2rem; text-align: center; background: #fff; }
.drop.is-over { border-color: var(--pink); background: #fff6f9; }

.domain-opts { display: grid; gap: .75rem; }
.opt { display: flex; gap: .75rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; background: #fff; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(37, 54, 117, .12); }
.opt input { margin-top: .35rem; }
.dom-results { display: grid; gap: .4rem; margin-top: .6rem; }
.dom-results label { display: flex; justify-content: space-between; gap: .75rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dom-results .no { color: var(--muted); text-decoration: line-through; }

.summary { width: 100%; border-collapse: collapse; }
.summary td { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.summary td:last-child { text-align: right; }
.summary td:first-child { padding-right: .75rem; }
.summary tr.total td { font-weight: 800; border-bottom: 0; font-size: 1.05rem; }

/* Suivi / espace client */
.progress { height: 12px; background: #e9ecf3; border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-2), var(--pink)); border-radius: 99px; transition: width .6s; }
.badge { white-space: nowrap; display: inline-block; font-size: .78rem; font-weight: 700; padding: .15rem .6rem; border-radius: 99px; background: #eef0f5; color: var(--muted); }
.badge--active { background: #e2f5ec; color: var(--ok); }
.badge--provisioning, .badge--pending_payment { background: #eef2fd; color: var(--navy-2); }
.badge--suspended, .badge--past_due { background: #fff5e6; color: var(--warn); }
.badge--cancelled, .badge--error { background: #fdecea; color: var(--err); }
.site-card { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: start; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; font-size: .95rem; margin: .5rem 0 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #f3f4f8; padding: .1rem .35rem; border-radius: 5px; font-size: .9em; overflow-wrap: anywhere; }

/* Tableaux (admin) */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: .93rem; }
table.data th, table.data td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { background: #f6f7fb; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
pre.log { background: #10151f; color: #d7dde8; padding: 1rem; border-radius: 10px; overflow: auto; max-height: 340px; font-size: .82rem; white-space: pre-wrap; }

.auth { max-width: 440px; margin: 0 auto; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .wizard { grid-template-columns: 1fr; }
  .wizard__nav { position: static; overflow-x: auto; }
  .wizard__nav ol { display: flex; gap: .25rem; }
  .wizard__nav button { white-space: nowrap; }
  .wizard__nav button span { display: none; }
  .wizard__nav button.is-active span { display: inline; }
  .site-card { grid-template-columns: 1fr; }
}
