/* =============================================
   siteenpanne.fr — style.css
   ============================================= */

/* ---------- Variables / Thèmes ---------- */
:root {
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;

  --text-xs:   clamp(.75rem,  .72rem + .15vw, .875rem);
  --text-sm:   clamp(.875rem, .84rem + .18vw, 1rem);
  --text-base: clamp(1rem,    .96rem + .22vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1.02rem + .6vw, 1.4rem);
  --text-xl:   clamp(1.45rem, 1.15rem + 1vw,  2.1rem);
  --text-2xl:  clamp(2rem,    1.2rem  + 2vw,  3.4rem);

  --space-1:.25rem;  --space-2:.5rem;   --space-3:.75rem;
  --space-4:1rem;    --space-5:1.25rem; --space-6:1.5rem;
  --space-8:2rem;    --space-10:2.5rem; --space-12:3rem;
  --space-16:4rem;

  --radius-sm:.5rem; --radius-md:.85rem;
  --radius-lg:1.1rem; --radius-full:999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 10px 30px rgba(0,0,0,.08);

  --ok:   #198754;
  --warn: #d97706;
  --bad:  #d92d20;
}

/* Light (défaut) */
:root, [data-theme="light"] {
  --bg:        #f6f3ee;
  --surface:   #fdfbf8;
  --surface-2: #f1ece6;
  --border:    #ddd6cf;
  --text:      #1f1b16;
  --muted:     #70685f;
  --primary:   #0f766e;
  --primary-2: #d7efec;
}

/* Dark */
[data-theme="dark"] {
  --bg:        #121110;
  --surface:   #1e1c19;
  --surface-2: #2a2723;
  --border:    #3e3a34;
  --text:      #f1ece5;
  --muted:     #b4ab9f;
  --primary:   #4fd1c5;
  --primary-2: #1e3f3d;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.25);
  --shadow-md: 0 12px 32px rgba(0,0,0,.35);
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  transition: background .25s, color .25s;
}
a { color: inherit; }
button, input { font: inherit; }

/* ---------- Layout ---------- */
.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; justify-content: space-between;
  align-items: center; padding: .9rem 0;
}
.brand { display: flex; gap: .75rem; align-items: center; font-weight: 700; }
.brand-mark {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #4c8bf5);
  display: grid; place-items: center;
  color: #fff; font-size: .95rem;
}
.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  padding: .6rem .9rem; border-radius: var(--radius-full); cursor: pointer;
  transition: background .15s;
}
.theme-toggle:hover { background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero { padding: var(--space-12) 0 var(--space-10); }
.eyebrow {
  display: inline-block; padding: .35rem .7rem;
  border-radius: var(--radius-full);
  background: var(--primary-2); color: var(--primary);
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl); line-height: 1.02;
  margin: var(--space-4) 0 var(--space-8);
}

/* .lead en commentaire HTML — conservé si réactivation */
.lead { max-width: 62ch; color: var(--muted); margin: 0 0 var(--space-8); }

/* Grille 2 colonnes desktop */
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: var(--space-8);
  align-items: start;
}

/* Colonne gauche : checker + conseils empilés */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ---------- Checker ---------- */
.checker { padding: var(--space-6); }
.checker-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.input {
  flex: 1; min-width: 220px;
  padding: 1rem; border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg); color: var(--text);
  transition: border-color .15s;
}
.input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.btn {
  border: 0; border-radius: var(--radius-md);
  padding: 1rem 1.2rem; cursor: pointer; font-weight: 700;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { opacity: .88; }
.btn-soft {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border);
}
.btn-soft:hover { background: var(--primary-2); }
.mini-copy { margin-top: .7rem; color: var(--muted); font-size: var(--text-sm); }

/* ---------- Result box ---------- */
.result {
  margin-top: var(--space-5); padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px dashed var(--border);
  display: none;
}
.result p { margin: .4rem 0; }
.result-hint { color: var(--muted); font-size: var(--text-sm); }

.status-pill {
  display: inline-flex; gap: .5rem; align-items: center;
  border-radius: var(--radius-full); padding: .35rem .75rem;
  font-weight: 700; font-size: var(--text-sm);
  margin-bottom: .6rem;
}
.dot { width: .65rem; height: .65rem; border-radius: 50%; flex-shrink: 0; }

.ok   { background: color-mix(in srgb, var(--ok)   14%, transparent); color: var(--ok); }
.ok   .dot { background: var(--ok); }
.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.warn .dot { background: var(--warn); }
.bad  { background: color-mix(in srgb, var(--bad)  14%, transparent); color: var(--bad); }
.bad  .dot { background: var(--bad); }

/* ---------- Conseils de dépannage ---------- */
.tips { padding: var(--space-6); }
.tips h2 {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-4);
  color: var(--text);
}
.tips ul {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: .65rem;
}
.tips ul li { font-size: var(--text-sm); color: var(--muted); line-height: 1.55; }
.tips ul li strong { color: var(--text); }

/* ---------- Aside / Sites populaires ---------- */
.aside { padding: var(--space-6); }
.aside h2 { font-size: var(--text-xl); line-height: 1.1; margin: 0 0 .4rem; }
.aside > p { margin: 0 0 .5rem; }

.popular-list { display: grid; gap: .65rem; margin-top: .75rem; }
.popular-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: .75rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text);
  font-size: var(--text-sm);
  transition: background .15s, border-color .15s;
  width: 100%;
  text-align: left;
}
.popular-item:hover {
  background: var(--primary-2);
  border-color: var(--primary);
}

/* Correctif mode sombre — contraste sites populaires */
[data-theme="dark"] .popular-item {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .popular-item:hover {
  background: var(--primary-2);
  border-color: var(--primary);
  color: var(--primary);
}
[data-theme="dark"] .aside {
  background: var(--surface);
  border-color: var(--border);
}

/* ---------- Sections ---------- */
.section { padding: var(--space-8) 0; }
.section h2 { font-size: var(--text-xl); line-height: 1.1; margin: 0 0 var(--space-5); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .8rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem;
  transition: background .15s;
}
.faq details[open] { background: var(--surface-2); }
.faq summary {
  cursor: pointer; font-weight: 700;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::after { content: "+"; font-size: 1.2rem; color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; color: var(--primary); }
.faq details p { margin: .75rem 0 0; color: var(--muted); font-size: var(--text-sm); }

/* ---------- Footer ---------- */
.footer {
  padding: var(--space-10) 0 var(--space-8);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-sm);
}
.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem var(--space-4);
  align-items: center;
}
.footer-links a {
  text-decoration: none;
  color: var(--muted);
  transition: color .15s;
  white-space: nowrap;
}
.footer-links a:hover { color: var(--primary); }
.footer-links .sep {
  width: 1px; height: .9rem;
  background: var(--border);
  display: inline-block;
  flex-shrink: 0;
}
.footer-copy {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--muted);
  opacity: .75;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .hero-left  { order: 1; }
  .hero-right { order: 2; }

  .topbar-inner { gap: 1rem; }
  .checker-row { flex-direction: column; }
  .btn { width: 100%; }
  .footer-links { gap: .4rem var(--space-3); }
}

@media (max-width: 480px) {
  .hero { padding: var(--space-8) 0 var(--space-6); }
  h1 { font-size: var(--text-xl); }
  .footer-links .sep { display: none; }
}