/* ============================================
   Couche commune à tous les sites générés
   ============================================
   Ce que le moteur ajoute au-dessus du thème : les pages légales, le bandeau
   de consentement, les contenus tiers en attente d'accord, la mention sous
   les formulaires. Tout s'appuie sur les variables du thème quand il en
   expose, et sur des valeurs sobres sinon. Thème clair, uniquement. */

.kw-legal {
  max-width: 72ch;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  line-height: 1.6;
}
.kw-legal h1 { font-size: 2rem; margin: 0 0 1.5rem; }
.kw-legal h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; }
.kw-legal h3 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.kw-legal p { margin: 0 0 1rem; }
.kw-legal a { color: var(--accent, #1d4ed8); }
.kw-legal dl { margin: 0 0 1rem; }
.kw-row { display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr; gap: .25rem 1rem; padding: .35rem 0; border-top: 1px solid rgba(0,0,0,.08); }
.kw-row dt { font-weight: 600; margin: 0; }
.kw-row dd { margin: 0; }
@media (max-width: 40rem) { .kw-row { grid-template-columns: 1fr; } }
.kw-table { width: 100%; border-collapse: collapse; font-size: .95em; }
.kw-table th, .kw-table td { text-align: left; vertical-align: top; padding: .5rem .5rem; border-top: 1px solid rgba(0,0,0,.1); }
.kw-table th { border-top: 0; }
.kw-table code { font-size: .9em; }
.kw-table-wrap { overflow-x: auto; }

.kw-btn {
  font: inherit;
  padding: .6rem 1.1rem;
  border: 1px solid var(--ink, #1f1f1f);
  border-radius: .4rem;
  background: #fff;
  color: var(--ink, #1f1f1f);
  cursor: pointer;
}
.kw-btn:hover, .kw-btn:focus-visible { background: var(--ink, #1f1f1f); color: #fff; outline: none; }

/* Pied : liens légaux, tous sur une ligne, en retrait du reste. */
.kw-legal-links { display: inline-flex; flex-wrap: wrap; justify-content: inherit; gap: .25rem 1.25rem; margin: 1rem 0 0; padding: 0; font-size: .85em; }
.kw-legal-links a, .kw-legal-links button { color: inherit; opacity: .8; text-decoration: none; }
.kw-legal-links button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.kw-legal-links a:hover, .kw-legal-links button:hover { opacity: 1; text-decoration: underline; }

/* Bandeau : bas de page, deux boutons jumeaux. */
.kw-consent { position: fixed; inset: auto 0 0 0; z-index: 1000; padding: 1rem; background: rgba(0,0,0,.04); }
.kw-consent-box {
  max-width: 56rem; margin: 0 auto; padding: 1.25rem 1.5rem;
  background: #fff; color: #1f1f1f; border: 1px solid rgba(0,0,0,.12); border-radius: .6rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}
.kw-consent-title { margin: 0 0 .35rem; font-weight: 700; }
.kw-consent-text { margin: 0 0 1rem; line-height: 1.5; }
.kw-consent-text a { color: inherit; }
.kw-consent-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.kw-consent-actions .kw-btn { flex: 1 1 12rem; }

/* Contenu tiers en attente d'accord : même emprise que ce qu'il remplace. */
.kw-gate {
  display: grid; place-content: center; gap: .75rem; text-align: center;
  min-height: 18rem; padding: 1.5rem; background: rgba(0,0,0,.04); border: 1px dashed rgba(0,0,0,.2); border-radius: .6rem;
}
.kw-gate p { margin: 0; max-width: 40ch; }

/* Sous chaque formulaire : ce qu'on prend, pourquoi, combien de temps. */
.kw-form-notice { font-size: .85em; line-height: 1.5; opacity: .85; margin: .75rem 0 0; }
.kw-form-notice a { color: inherit; }

/* Brouillon : visible de loin, pour ne jamais partir en production par erreur. */
.kw-draft { position: sticky; top: 0; z-index: 1001; padding: .5rem 1rem; text-align: center; background: #fde68a; color: #1f1f1f; font-weight: 600; }
