/* ═══════════════════════════════════════════════
   CalcHeure.fr — Dark Modern Theme
   Brand: Deep navy + Emerald green + White
   ═══════════════════════════════════════════════ */

:root {
  --bg:        #0A0F1E;
  --bg-card:   #111827;
  --bg-soft:   #1A2235;
  --border:    #1F2D42;
  --primary:   #10B981;
  --primary-d: #059669;
  --primary-l: #34D399;
  --accent:    #6366F1;
  --accent-l:  #818CF8;
  --text:      #F1F5F9;
  --text-muted:#94A3B8;
  --text-dim:  #64748B;
  --danger:    #EF4444;
  --warning:   #F59E0B;
  --success:   #10B981;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.6);
  --glow:      0 0 20px rgba(16,185,129,.2);
  --font:      'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.1rem; font-weight: 700; }
p  { color: var(--text-muted); line-height: 1.75; }
a  { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-l); }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.main-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 32px; max-width: 1200px; margin: 0 auto; padding: 32px 5%; }
.main-content { min-width: 0; }
@media (max-width: 900px) { .main-wrap { grid-template-columns: 1fr; padding: 16px; } }

/* ── Header ── */
.site-header {
  background: rgba(10,15,30,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 5%;
  display: flex; align-items: center; gap: 32px; height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem; color: var(--text);
  text-decoration: none; white-space: nowrap;
}
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; box-shadow: var(--glow);
}
.logo span.brand { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav a {
  color: var(--text-muted); font-size: .875rem; font-weight: 500;
  padding: 6px 12px; border-radius: 8px; transition: all .2s;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--bg-soft); }

.header-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.btn-header {
  background: var(--primary); color: #000; font-weight: 700;
  font-size: .8rem; padding: 8px 16px; border-radius: 8px;
  border: none; cursor: pointer; transition: all .2s;
}
.btn-header:hover { background: var(--primary-l); transform: translateY(-1px); }

/* ── Mobile nav ── */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-muted); border-radius: 2px; transition: .3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-nav {
  display: none; flex-direction: column; padding: 16px 24px;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { color: var(--text-muted); padding: 10px 0; font-weight: 500; border-bottom: 1px solid var(--border); font-size: .9rem; }
.mobile-nav a:last-child { border-bottom: none; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #0A0F1E 0%, #0F1F35 50%, #0D1A2E 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 5% 64px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -40%; left: 60%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -30%; left: -10%;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 860px; margin: 0 auto; text-align: center; position: relative; z-index: 1; padding: 0 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3);
  color: var(--primary); font-size: .8rem; font-weight: 600;
  padding: 6px 16px; border-radius: 999px; margin-bottom: 24px;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 36px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-stats {
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
  padding-top: 32px; border-top: 1px solid var(--border); margin-top: 8px;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.hero-stat span { font-size: .8rem; color: var(--text-dim); }

/* ── Breadcrumb ── */
.breadcrumb { padding: 12px 0; font-size: .8rem; color: var(--text-dim); }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { margin: 0 8px; color: var(--border); }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .2s;
}
.card:hover { border-color: rgba(16,185,129,.3); }
.card + .card { margin-top: 24px; }

.card-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.05rem; font-weight: 700; margin-bottom: 20px; color: var(--text);
}
.card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.2);
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  flex-shrink: 0;
}

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--bg); padding: 4px; border-radius: 10px; }
.tab-btn {
  flex: 1; padding: 8px 12px; border: none; background: none;
  color: var(--text-muted); font-size: .85rem; font-weight: 600;
  border-radius: 8px; cursor: pointer; transition: all .2s; font-family: var(--font);
}
.tab-btn.active { background: var(--primary); color: #000; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Forms ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.form-input, .form-select {
  width: 100%; padding: 10px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: .9rem;
  font-family: var(--font-mono); transition: border-color .2s;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,.15); }
.form-select { font-family: var(--font); }
.form-hint { font-size: .75rem; color: var(--text-dim); margin-top: 4px; }

/* ── Result box ── */
.result-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin: 20px 0;
}
.result-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.result-row:last-child { border-bottom: none; padding-bottom: 0; }
.result-label { font-size: .85rem; color: var(--text-muted); }
.result-value { font-family: var(--font-mono); font-weight: 700; font-size: 1rem; color: var(--text); }
.result-value.big { font-size: 1.4rem; color: var(--primary); }
.result-value.green { color: var(--success); }
.result-value.red { color: var(--danger); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px; font-weight: 600;
  font-size: .875rem; cursor: pointer; border: none; transition: all .2s;
  font-family: var(--font);
}
.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { background: var(--primary-l); transform: translateY(-1px); box-shadow: var(--glow); }
.btn-secondary { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; }
.export-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ── Data table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table thead th { background: rgba(16,185,129,.1); color: var(--primary); font-weight: 700; padding: 10px 14px; text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.data-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-soft); color: var(--text); }

/* ── Alert ── */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; font-size: .875rem; border-left: 3px solid; margin-bottom: 16px; }
.alert-info { background: rgba(99,102,241,.08); border-color: var(--accent); color: var(--accent-l); }
.alert-success { background: rgba(16,185,129,.08); border-color: var(--primary); color: var(--primary-l); }
.alert-warning { background: rgba(245,158,11,.08); border-color: var(--warning); color: var(--warning); }

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.sidebar-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 16px; }
.sidebar-links { display: flex; flex-direction: column; gap: 2px; }
.sidebar-links a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 8px; font-size: .85rem; color: var(--text-muted);
  transition: all .15s;
}
.sidebar-links a:hover, .sidebar-links a.active { background: rgba(16,185,129,.1); color: var(--primary); }
.ad-slot { background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--radius-lg); padding: 20px; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.ad-slot span { font-size: .75rem; color: var(--text-dim); }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 4px; }
.faq-item { border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: left; padding: 14px 18px;
  background: none; border: none; color: var(--text);
  font-weight: 600; font-size: .9rem; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font); transition: background .2s;
}
.faq-question::after { content: '+'; font-size: 1.2rem; color: var(--primary); flex-shrink: 0; transition: transform .3s; }
.faq-question:hover { background: var(--bg-soft); }
.faq-question.open { background: rgba(16,185,129,.05); color: var(--primary); }
.faq-question.open::after { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 18px 16px; }
.faq-answer.open { display: block; }
.faq-answer p { font-size: .875rem; color: var(--text-muted); line-height: 1.75; }

/* ── Info grid ── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 16px 0; }
.info-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.info-card h3 { font-size: .9rem; color: var(--text); margin-bottom: 8px; }
.info-card p { font-size: .82rem; color: var(--text-muted); margin: 0; }

/* ── Tools grid ── */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tool-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; text-decoration: none;
  color: var(--text); display: flex; flex-direction: column; gap: 10px;
  transition: all .2s;
}
.tool-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--glow); }
.tool-card-icon { font-size: 1.6rem; }
.tool-card h3 { font-size: .95rem; color: var(--text); }
.tool-card p { font-size: .8rem; color: var(--text-muted); margin: 0; }
.tool-badge { font-size: .65rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(16,185,129,.15); color: var(--primary); border: 1px solid rgba(16,185,129,.3); width: fit-content; }

/* ── Article/Blog content ── */
.article-body h2 { font-size: 1.3rem; margin: 32px 0 16px; color: var(--text); padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.article-body h3 { font-size: 1.05rem; margin: 24px 0 12px; color: var(--text); }
.article-body p { margin-bottom: 16px; color: var(--text-muted); line-height: 1.8; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; color: var(--text-muted); line-height: 2; }
.article-body li { margin-bottom: 4px; }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body a { color: var(--primary); text-decoration: underline; text-decoration-color: rgba(16,185,129,.3); }
.article-body a:hover { text-decoration-color: var(--primary); }
.article-body blockquote { border-left: 3px solid var(--primary); padding: 12px 20px; background: rgba(16,185,129,.05); border-radius: 0 8px 8px 0; margin: 20px 0; }
.article-body blockquote p { margin: 0; font-style: italic; color: var(--text-muted); }
.article-meta { display: flex; gap: 16px; font-size: .8rem; color: var(--text-dim); margin-bottom: 24px; flex-wrap: wrap; }
.article-meta span { display: flex; align-items: center; gap: 4px; }
.tag { display: inline-block; font-size: .7rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--text-muted); border: 1px solid var(--border); margin: 2px; }
.tag.green { background: rgba(16,185,129,.1); color: var(--primary); border-color: rgba(16,185,129,.2); }

/* ── Cookie banner ── */
#cookie-banner {
  position: fixed; bottom: 24px; left: 24px; right: 24px; max-width: 600px;
  margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 24px;
  display: none; align-items: center; justify-content: space-between; gap: 16px;
  box-shadow: var(--shadow-lg); z-index: 999; flex-wrap: wrap;
}
#cookie-banner.show { display: flex; }
#cookie-banner p { font-size: .85rem; color: var(--text-muted); margin: 0; flex: 1; }
#cookie-banner a { color: var(--primary); }
.cookie-btn { background: var(--primary); color: #000; border: none; padding: 8px 20px; border-radius: 8px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: var(--font); }

/* ── Footer ── */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 48px 24px 24px; margin-top: 64px; }
.footer-top { max-width: 1200px; margin: 0 auto; padding: 0 5%; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { font-size: .85rem; color: var(--text-muted); margin-top: 12px; line-height: 1.7; }
.footer-col h4 { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 16px; }
.footer-col a { display: block; font-size: .85rem; color: var(--text-muted); margin-bottom: 8px; transition: color .2s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 24px 5% 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom span { font-size: .8rem; color: var(--text-dim); }
@media (max-width: 768px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; } }

/* ── Animations ── */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.fade-up { animation: fadeUp .5s ease forwards; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.flash { animation: pulse .4s ease 2; }

/* ── Misc ── */
.content-section { line-height: 1.75; }
.content-section p { margin-bottom: 14px; }
.content-section h2 { font-size: 1.2rem; font-weight: 700; margin: 24px 0 12px; color: var(--text); }
.content-section h3 { font-size: 1rem; font-weight: 700; margin: 20px 0 8px; color: var(--text); }
.content-section ul { margin: 0 0 14px 20px; color: var(--text-muted); line-height: 1.9; }
.content-section a { color: var(--primary); text-decoration: underline; text-decoration-color: transparent; }
.content-section a:hover { text-decoration-color: var(--primary); }

/* ── Print ── */
@media print {
  .site-header, .sidebar, .export-bar, #cookie-banner, footer, .breadcrumb { display: none !important; }
  .main-wrap { display: block; }
  body { background: white; color: black; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ── Focus ── */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
