/* base.css — Reset, Typographie, Layout et Composants (Optimisé No-Scroll & Haute Densité) */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg1);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: clamp(2.6rem, 5.2vw, 3.5rem); /* Espace cohérent équivalent à la taille du grand titre Hero */
}

main > .section:first-child,
main > section:first-of-type {
  padding-top: 0;
}

/* Typographie */
.disp {
  font-family: var(--font-disp);
  font-weight: 400; /* Cormorant Regular pour la finesse */
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h1.disp,
.hero h1.disp,
.hero .disp {
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  letter-spacing: -0.02em;
}

h2.disp {
  font-weight: 500;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.015em;
}

h3.disp {
  font-weight: 600;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
}

p {
  color: var(--soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--soft);
  display: inline-block;
  margin-bottom: clamp(2rem, 3.5vw, 2.8rem); /* Espacement généreux et aéré au-dessus du grand titre Hero */
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section {
  padding-top: clamp(1rem, 2vw, 1.75rem);
  padding-bottom: clamp(1rem, 2vw, 1.75rem);
}

.hero {
  padding-top: 0;
  padding-bottom: clamp(0.4rem, 1vw, 0.75rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero .hero-content {
  max-width: 820px;
}

.hero p.subtitle {
  font-size: 1.05rem;
  margin-top: 0.4rem;
  margin-bottom: 1rem;
  color: var(--soft);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0.75rem;
  z-index: 100;
  margin: 0 auto;
  width: calc(100% - 2rem);
  max-width: 1200px;
  border-radius: var(--radius-pill);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1.25rem;
}

.brand-link {
  font-family: var(--font-disp);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--soft);
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Boutons & Toggles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-weight: 600; /* Strict 600 */
  font-size: 0.9rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn.gold {
  background: var(--gold-bg);
  border-color: var(--gold);
  color: var(--ink);
}

.btn.gold:hover {
  background: rgba(224, 181, 106, 0.22);
  box-shadow: 0 4px 16px rgba(224, 181, 106, 0.18);
}

.btn.secondary,
.btn.glass {
  background: var(--glass);
  border-color: var(--glassborder);
  color: var(--ink);
}

.btn.secondary:hover,
.btn.glass:hover {
  background: var(--glass-hover);
  border-color: var(--glassborder-glow);
}

.btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.toggle-btn {
  background: var(--glass);
  border: 1px solid var(--glassborder);
  border-radius: var(--radius-pill);
  color: var(--soft);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.toggle-btn:hover {
  color: var(--ink);
  border-color: var(--glassborder-glow);
}

.toggle-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Badges & Statuts */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* SCEAU / OR (Plein, définitif, glyphe ◆) */
.badge.b-scelle {
  background: var(--gold-dark);
  color: #ffffff;
  border: 1px solid var(--gold);
  font-weight: 600;
}

/* ABSTENTION / AMBRE (Contour tireté, glyphe …) */
.badge.b-abst {
  background: var(--ambre-bg);
  border: 1.5px dashed var(--ambre);
  color: var(--ambre);
  font-weight: 500;
}

/* INCOHÉRENTE / ROUGE (Contour plein, glyphe ✕) */
.badge.b-incoh {
  background: var(--rouge-bg);
  border: 1px solid var(--rouge-border);
  color: var(--rouge);
  font-weight: 500;
}

/* PROUVÉE / NEUTRE (Encre, glyphe ✓) */
.badge.b-prouve {
  background: var(--glass);
  border: 1px solid var(--glassborder);
  color: var(--ink);
  font-weight: 500;
}

.badge.b-bientot {
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* Cartes & Composants (Radius 16px) */
.card {
  border-radius: 16px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card h3 {
  color: var(--ink);
  font-size: 1.25rem;
}

.card-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--glassborder);
  color: var(--ink);
  margin-bottom: 0.25rem;
}

/* Frise & Cycle */
.cycle-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.step-card {
  border-radius: 16px;
  padding: 1.15rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 600;
}

.step-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
}

.step-desc {
  font-size: 0.82rem;
  color: var(--soft);
  line-height: 1.4;
}

/* Formulaire Self-Hosted */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  margin-bottom: 0.9rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}

.form-input,
.form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--glass);
  border: 1px solid var(--glassborder);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--focus);
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--glassborder);
  padding: 1.25rem 0 1rem;
  font-size: 0.82rem;
  color: var(--soft);
}

.footer-doctrine {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--soft);
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  border: 1px solid var(--glassborder);
}

.footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.footer-links a:hover {
  color: var(--ink);
}

/* Animations de Révélation */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Gestion du Multilingue [data-lang] */
html[data-lang="fr"] [data-en] { display: none !important; }
html[data-lang="en"] [data-fr] { display: none !important; }
