/* Interface app.gigaweb.be — Gigaweb Webbuilder
   Palette alignée sur la charte www.gigaweb.be (gigaweb-design-system.css) */
:root {
  --brand: #044568;        /* gw-blue */
  --brand-dark: #032f47;   /* gw-blue-dark */
  --accent: #21a249;       /* gw-lime */
  --accent-dark: #1a8a3d;  /* gw-lime-dark */
  --ink: #044568;
  --muted: rgba(4, 69, 104, .62);
  --line: rgba(4, 69, 104, .12);
  --bg: #faf5ea;           /* gw-cream */
  --mist: #eef6f7;
  --cream-shade: #f1ead9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); }
body {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: transparent;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Fond « mesh gradient » animé aux couleurs Gigaweb : une couche de halos
   bleus et une couche de halos lime qui dérivent lentement l'une contre
   l'autre (effet de vague), cœur clair pour la lisibilité du contenu. */
body::before, body::after {
  content: '';
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
}
body::before {
  /* Bande bleue saturée sur tout le haut, renforcée aux angles */
  background:
    radial-gradient(120% 55% at 50% -12%, rgba(4, 69, 104, .95) 0%, rgba(4, 69, 104, .55) 52%, transparent 74%),
    radial-gradient(50% 34% at 8% 6%, rgba(3, 47, 71, .85), transparent 62%),
    radial-gradient(46% 30% at 94% 4%, rgba(23, 64, 86, .70), transparent 60%);
  animation: gw-vague-bleue 26s ease-in-out infinite alternate;
}
body::after {
  /* Bande lime saturée sur tout le bas + cœur blanc lumineux au centre */
  background:
    radial-gradient(120% 60% at 50% 114%, rgba(33, 162, 73, .92) 0%, rgba(33, 162, 73, .50) 52%, transparent 76%),
    radial-gradient(48% 32% at 92% 96%, rgba(26, 138, 61, .80), transparent 60%),
    radial-gradient(85% 42% at 50% 46%, rgba(255, 255, 255, .88) 0%, rgba(255, 255, 255, .45) 55%, transparent 76%);
  animation: gw-vague-lime 21s ease-in-out infinite alternate;
}
@keyframes gw-vague-bleue {
  from { transform: translate3d(-2.5%, -1.5%, 0) scale(1); }
  to   { transform: translate3d(2.5%, 2%, 0) scale(1.07); }
}
@keyframes gw-vague-lime {
  from { transform: translate3d(2%, 1.8%, 0) scale(1.06); }
  to   { transform: translate3d(-2.2%, -2%, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}

/* Page d'accueil : mosaïque de sites inclinée à 45°, sous les voiles de
   couleur (fichier attendu : public/assets/img/mosaique.webp) */
.mosaique {
  position: fixed;
  inset: -65%;
  z-index: -2;
  /* Voile noir 45 % par-dessus la mosaïque (textes clairs par-dessus) */
  background:
    linear-gradient(rgba(0, 0, 0, .45), rgba(0, 0, 0, .45)),
    url('../img/mosaique.webp') center / 900px auto repeat;
  transform: rotate(45deg);
  opacity: 1;
  pointer-events: none;
}

/* Funnel étapes 2-5 : image de fond dédiée (dégradé bleu/vert Gigaweb) */
.fond-funnel {
  position: fixed; inset: 0; z-index: -2;
  background: url('../img/fond-funnel.jpg') center / cover no-repeat;
  pointer-events: none;
}
body:has(.fond-funnel)::before,
body:has(.fond-funnel)::after { display: none; }

/* Quand la mosaïque est là (accueil), les voiles s'allègent pour la révéler */
body:has(.mosaique)::before {
  background:
    radial-gradient(120% 55% at 50% -12%, rgba(4, 69, 104, .78) 0%, rgba(4, 69, 104, .30) 48%, transparent 70%);
}
body:has(.mosaique)::after {
  background:
    radial-gradient(120% 60% at 50% 114%, rgba(33, 162, 73, .75) 0%, rgba(33, 162, 73, .28) 48%, transparent 72%),
    radial-gradient(85% 42% at 50% 46%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .08) 52%, transparent 74%);
}
main { flex: 1; padding: 32px 0 56px; }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); }

/* En-tête translucide sur le fond mesh */
.app-header {
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--brand); text-decoration: none; }
.logo span { color: var(--accent); font-weight: 600; }
.app-header nav a { margin-left: 18px; text-decoration: none; color: var(--muted); font-weight: 500; }
.app-header nav a:hover { color: var(--brand); }
.nav-cta { background: var(--accent); color: #fff !important; padding: 8px 16px; border-radius: 999px; }

/* Alertes */
.alert { padding: 13px 18px; border-radius: 10px; margin: 18px 0 0; font-weight: 500; }
.alert-error { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c2; }
.alert-success { background: #e7f4ec; color: var(--accent-dark); border: 1px solid #c2e4cd; }
.alert-info { background: var(--mist); color: var(--brand-dark); border: 1px solid var(--line); font-weight: 400; }

/* Panneaux */
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 30px; box-shadow: 0 8px 24px rgba(4, 69, 104, .08);
}
.panel + .panel, .panel + .steps-strip, .steps-strip + .panel { margin-top: 22px; }
.panel h1 { font-size: 1.55rem; color: var(--brand-dark); margin-bottom: 8px; }
.panel h2 { font-size: 1.2rem; color: var(--brand-dark); margin: 18px 0 10px; }
.panel .sub { color: var(--muted); margin-bottom: 22px; }

/* Landing */
.hero-app { text-align: center; padding: 40px 0 10px; }
.hero-app h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.7rem); color: #fff; margin-bottom: 14px;
  text-shadow: 0 2px 14px rgba(3, 47, 71, .55);
}
.hero-app p {
  max-width: 640px; margin: 0 auto 26px; color: rgba(255, 255, 255, .95);
  font-size: 1.08rem; font-weight: 500; text-shadow: 0 1px 10px rgba(3, 47, 71, .55);
}
.section-title {
  text-align: center; color: #fff; font-size: 1.5rem; font-weight: 700;
  text-shadow: 0 2px 14px rgba(3, 47, 71, .55); margin: 34px 0 4px;
}
.steps-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 18px 0 34px; }
.step-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; text-align: left; }
.step-box b { color: var(--accent); display: block; font-size: 1.4rem; }
.step-box h3 { font-size: 1.05rem; font-weight: 700; margin: 10px 0 6px; }

.faq { margin: 18px 0 10px; }
.faq-item {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 22px; margin-bottom: 14px;
}
.faq-item h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; }
.faq-item p { color: var(--muted); font-size: .95rem; }

/* Formulaires */
label { display: block; font-weight: 600; margin: 16px 0 6px; }
label .opt, .opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url],
textarea, select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff;
}
input[type=file] { display: block; margin-top: 4px; }
input[type=color] { width: 72px; height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: #fff; cursor: pointer; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(4, 69, 104, .28); border-color: var(--brand); }
textarea { min-height: 110px; resize: vertical; }
.hint { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.fieldset { border: none; margin-top: 16px; }
.fieldset legend { font-weight: 600; margin-bottom: 6px; }
.radio-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.radio-card { flex: 1 1 200px; border: 2px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; background: #fff; font-weight: 400; }
.radio-card input { margin-right: 8px; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--mist); }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
.tpl-card { border: 2px solid var(--line); border-radius: 14px; padding: 18px; cursor: pointer; background: #fff; display: block; font-weight: 400; }
.tpl-card:has(input:checked) { border-color: var(--brand); background: var(--mist); }
.tpl-card b { color: var(--brand-dark); }
.tpl-card p { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.tpl-swatches { margin-top: 10px; }
.tpl-swatches i { display: inline-block; width: 20px; height: 20px; border-radius: 50%; margin-right: 6px; border: 1px solid rgba(0, 0, 0, .1); }

/* Boutons */
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none; font: inherit;
  background: var(--brand); color: #fff; padding: 12px 28px; border-radius: 999px; font-weight: 600;
}
.btn:hover { background: var(--brand-dark); color: var(--accent); }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn.small { padding: 8px 18px; font-size: .92rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 12px; flex-wrap: wrap; }

/* Progression du funnel */
.progress { display: flex; gap: 6px; margin-bottom: 24px; }
.progress i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.progress i.done { background: var(--accent); }

/* Page de statut */
.status-box { text-align: center; padding: 40px 20px; }
.gen-progress {
  max-width: 420px; height: 10px; margin: 26px auto 10px;
  background: var(--line); border-radius: 999px; overflow: hidden;
}
.gen-progress i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width .6s ease;
}
.spinner {
  width: 46px; height: 46px; margin: 0 auto 20px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tableau de bord */
.site-row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.site-row:last-of-type { border-bottom: none; }
/* Boutons d'action : même ligne dédiée pour tous les statuts */
.site-actions { flex-basis: 100%; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.badge.generated, .badge.deployed { background: #e7f4ec; color: var(--accent-dark); }
.badge.draft { background: var(--cream-shade); color: #174056; }
.badge.ordered { background: var(--mist); color: var(--brand-dark); }
.quota { color: var(--muted); font-size: .92rem; }
.regen-form { flex-basis: 100%; display: flex; gap: 10px; align-items: center; }
.regen-form input[type=text] { flex: 1; }

/* Éditeur M7 : grille des images remplaçables */
.edit-img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 10px; }
.edit-img-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff;
  box-shadow: 0 6px 18px rgba(4, 69, 104, .10);
  transition: box-shadow .25s ease, transform .25s ease;
}
.edit-img-card:hover {
  box-shadow: 0 14px 32px rgba(4, 69, 104, .18);
  transform: translateY(-2px);
}
.edit-img-card img { width: 100%; height: 220px; object-fit: contain; background: #f2f2f2; border-radius: 8px; display: block; }
.edit-img-card b { display: block; margin: 8px 0 6px; font-size: .9rem; }
.edit-img-card input[type=file] { font-size: .8rem; width: 100%; }

/* Connexion : les deux panneaux côte à côte (empilés sur mobile) */
.auth-duo { display: flex; gap: 22px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.auth-duo .panel { flex: 1 1 380px; max-width: 460px; }
.auth-duo .panel + .panel { margin-top: 0; }

/* Commande : choix du domaine */
.domaine-form { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.domaine-form input { flex: 1 1 260px; }
.domaine-choix { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.domaine-choix .dom-nom { font-weight: 600; }
.domaine-choix:has(input:disabled) { opacity: .6; cursor: not-allowed; }

/* Offres (M5) */
.offres-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 12px; }
.offre-card { position: relative; border: 2px solid var(--line); border-radius: 14px; padding: 22px; background: #fff; text-align: center; }
.offre-card.populaire { border-color: var(--accent); }
.offre-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: .8rem; font-weight: 700;
  padding: 3px 14px; border-radius: 999px;
}
.offre-card h2 { margin: 6px 0 4px; }
.offre-prix { font-size: 1.7rem; font-weight: 800; color: var(--brand-dark); }
.offre-prix span { font-size: .85rem; font-weight: 400; color: var(--muted); }
.offre-card ul { list-style: none; margin: 14px 0 18px; color: var(--muted); font-size: .93rem; }
.offre-card li { padding: 4px 0; }

/* Pied de page */
.app-footer {
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: .9rem;
}

@media (max-width: 720px) {
  .steps-strip, .tpl-grid, .offres-grid { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
}
