/* ======================
   THEME VARIABLES
====================== */

/* Default: Light mode */
:root {
  --bg: #ffffff;
  --card: #f7f7f7;
  --muted: #555555;
  --text: #111111;
  --accent: #0077ff;
  --accent-2: #58d68d;
  --border: #dddddd;
  --shadow: 0 4px 16px rgba(0,0,0,.1);
  --radius: 16px;
  --highlight: #0077ff;
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #0f1222;
  --card: #171a2f;
  --muted: #8e93b5;
  --text: #eef0ff;
  --accent: #7c9cf0;
  --accent-2: #58d68d;
  --border: #2a2e4a;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --highlight: #4da3ff;
}

/* ======================
   BASE STYLES
====================== */

*{box-sizing:border-box}
html,body{height:100%}

body {
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

/* Layout principale + colonne pub */
.layout{
  width:min(1200px, 94%);
  margin: 16px auto 40px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 980px){
  .layout{
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.app-header{
  padding: 28px 16px 8px;
  text-align:center;
}
.app-header h1{ margin:0; font-size: clamp(22px, 4vw, 32px); }
.tagline{ margin:6px 0 0; color: var(--muted); }

.card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card h2{ margin: 4px 0 14px; font-size: 18px; color: var(--text); }

.grid{ display:grid; gap:14px; }
@media (min-width: 760px){ .grid{ grid-template-columns: repeat(2, 1fr); } }

.field{ display:flex; flex-direction:column; gap:6px; }
.field span{ color: var(--muted); font-size: 14px; }
.field input, .field select{
  background: var(--card); color: var(--text);
  border:1px solid var(--border); border-radius: 12px;
  padding: 12px; font-size:16px; outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus{
  border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124,156,240,.15);
}

.actions{ margin-top: 14px; display:flex; gap:10px; flex-wrap:wrap; }
button{
  border-radius: 12px; padding: 10px 14px; border:1px solid var(--border);
  background: var(--card); color: var(--text); cursor:pointer; font-weight:600;
  transition: transform .06s ease, background .15s ease, border .15s ease;
}
button:hover{ transform: translateY(-1px); }
button:active{ transform: translateY(0px) scale(.99); }
button.primary{ background: linear-gradient(135deg, var(--accent), #6f86e9); border-color: transparent; color:#fff; }
button.ghost{ background: transparent; }

.results{ border:1px solid var(--border); border-radius: 12px; overflow:hidden; }
.result-row{ display:flex; align-items:center; justify-content:space-between; padding: 12px 14px; border-bottom: 1px dashed var(--border); }
.result-row:last-child{border-bottom:none}
.label{ color: var(--muted) }
.value{ font-variant-numeric: tabular-nums; }
.value.strong{ font-weight:800 }
.value.highlight{ color: var(--accent-2); }
.divider{ height:1px; background: var(--border); }
.footnote{ margin-top:10px; color: var(--muted); font-size: 13px; }

.app-footer{ text-align:center; padding: 22px 10px 36px; color: var(--muted); }

/* Zones publicité — placeholders sobres */
.ad-slot{
  background: var(--card); border:1px dashed var(--border); color: var(--muted);
  border-radius: 12px; text-align:center; padding: 14px; box-shadow: var(--shadow);
  font-size: 14px;
}
.ad-top{ width:min(1200px,94%); margin: 8px auto 0; }
.ad-incontent{ margin: 14px 0; min-height: 90px; }
.ad-col{  display: flex;
  flex-direction: column;
  gap: 14px;
  align-content: center;
justify-content: center;   }
.ad-side{ position: sticky; top: 16px; min-height: 250px; }
.ad-footer{ width:min(1200px,94%); margin: 16px auto; }

/* Accessibilité */
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }
input[type=number]{ -moz-appearance: textfield; }

.ad-slot .ad-cta{
  display:flex; flex-direction:column; gap:4px;
  text-decoration:none; color: var(--text);
}
.ad-slot .ad-cta strong{ font-size:15px; }
.ad-slot .ad-cta .email{ opacity:.9; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; }
.ad-slot .ad-cta:hover{ text-decoration:underline; }

/* Theme toggle button */
.theme-toggle {
  margin-top: 10px;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: var(--highlight);
  color: #fff;
  transition: background 0.3s;
}

.ad-col {
  text-align: center; /* centers inline text content */
}

.ad-col .ad-slot {
  display: flex;              /* makes the slot use flexbox */
  flex-direction: column;     /* stack child elements vertically */
  align-items: center;        /* center horizontally */
  justify-content: center;    /* center vertically (if it has a fixed height) */
  text-align: center;         /* center text inside child elements too */
}
/* ======================
   NAVBAR
====================== */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar .logo {
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text);
}

.navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.navbar .nav-links li a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.navbar .nav-links li a:hover {
  background: var(--highlight);
  color: #fff;
}

@media (max-width: 768px) {
  .navbar .nav-links {
    display: none; /* hide links for mobile for now */
  }
  /* You could add a burger menu here for full responsiveness */
}

