/* =====================================================
   GLOBAL – BASE
===================================================== */
html[dir="rtl"] body {
  text-align: right;
}

a, button {
  transition: all .2s ease;
}

h1, h2, h3 {
  letter-spacing: -0.3px;
}

p {
  max-width: 75ch;
}

/* =====================================================
   CONTENEUR CENTRAL – PAR DÉFAUT
===================================================== */
main {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 24px;
  padding-bottom: 80px;
}

/* =====================================================
   HOME – EXCEPTIONS AU CONTENEUR
===================================================== */
.home main {
  max-width: none;
  padding: 0;
}

/* =====================================================
   HOME – HERO PRINCIPAL
===================================================== */
.home .home-hero {
  position: relative;
  min-height: 50vh;
  width: 100%;
  padding: 120px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #1e88e5, #7b2cbf);
  color: #ffffff;
  overflow: hidden;
}

/* Voile narratif */
.home .home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.15), transparent 40%),
    linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.45));
  pointer-events: none;
}

/* Contenu hero */
.home .home-hero > * {
  max-width: 680px;
  margin-inline: auto;
  text-align: right;
  position: relative;
  z-index: 2;
}

.home .home-hero {
  align-items: center;
}

/* Badge */
.home .archive-hero-pill {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  font-size: 14px;
}

/* Titre */
.home .home-hero h1 {
  font-size: clamp(3.2rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 24px;
}

/* Sous-titre */
.home .home-hero .hero-subtitle {
  font-size: 1.15rem;
  opacity: .95;
  margin-bottom: 36px;
}

/* =====================================================
   HOME – ACTIONS HERO
===================================================== */
.home .hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.home .hero-actions .btn {
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all .2s ease;
}

.home .hero-actions .btn-primary {
  background: #ffffff;
  color: #7b2cbf;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

.home .hero-actions .btn-secondary {
  border: 2px solid rgba(255,255,255,.8);
  color: #ffffff;
  background: transparent;
}

.home .hero-actions .btn:hover {
  transform: translateY(-2px);
}

/* =====================================================
   HOME – SECTIONS ÉDITORIALES
===================================================== */
.home section:not(.home-hero) {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 24px;
  margin-block: 100px;
}

.home section.light {
  background: #f7f7fb;
  padding-block: 100px;
}

/* Titres */
.home h2 {
  font-size: 2.2rem;
  margin-bottom: 40px;
  position: relative;
}

.home h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  margin-top: 12px;
  background: linear-gradient(90deg,#7b2cbf,#e0aaff);
}

/* =====================================================
   HOME – CARTES (POURQUOI)
===================================================== */
.home .feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.home .feature-card {
  background: #ffffff;
  padding: 35px 30px;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.home .feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

.home .feature-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

/* =====================================================
   HOME – LISTES
===================================================== */
.home ul {
  list-style: none;
  padding: 0;
}

.home ul li {
  position: relative;
  padding-right: 28px;
  margin-bottom: 14px;
}

.home ul li::before {
  content: "✔";
  position: absolute;
  right: 0;
  color: #7b2cbf;
  font-weight: bold;
}

/* =====================================================
   ARCHIVES – MICRO UX (NE CHANGE PAS LE HTML)
===================================================== */
.archive-card,
.archive-related-card {
  transition: transform .25s ease, box-shadow .25s ease;
}

.archive-card:hover,
.archive-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

/* =====================================================
   CONTRIBUTION – PAGE
===================================================== */
.contribution-page {
  max-width: 900px;
  margin: auto;
  padding: 60px 20px;
}

.contribution-page section {
  margin-bottom: 50px;
}

/* Header */
.contribution-header {
  text-align: center;
  margin-bottom: 60px;
}

.contribution-header h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.contribution-header .subtitle {
  font-size: 18px;
  opacity: 0.8;
}

/* Boxes */
.contribution-page section:not(.contribution-cta) {
  background: #ffffff;
  padding: 32px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.05);
}

/* Titres */
.contribution-page h2 {
  font-size: 22px;
  margin-bottom: 16px;
  border-right: 4px solid #7b2cbf;
  padding-right: 12px;
}

/* Listes */
.contribution-page ul {
  padding-right: 20px;
}

.contribution-page li {
  margin-bottom: 10px;
  font-size: 15px;
}

/* Warning */
.contribution-warning {
  background: #fff4f4 !important;
  border-right: 4px solid #d93025;
}

.contribution-warning h2 {
  color: #b42318;
}

/* Protection */
.contribution-protection {
  background: #f7f7f7 !important;
}

.contribution-protection h2 {
  color: #0f766e;
}

.protection-list li {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* CTA Final */
.contribution-cta {
  background: linear-gradient(135deg, #7b2cbf, #e0aaff);
  color: #ffffff;
  padding: 50px 30px;
  border-radius: 24px;
  text-align: center;
}

.contribution-cta h2,
.contribution-cta p {
  color: #ffffff;
}

.final-consent-note {
  margin-top: 20px;
  opacity: 0.9;
}

/* Gravity Forms */
.gform_wrapper {
  margin-top: 40px;
}

.gform_wrapper input,
.gform_wrapper textarea,
.gform_wrapper select {
  border-radius: 10px;
  padding: 10px;
}

/* =====================================================
   CHARTE ÉTHIQUE – PAGE DÉDIÉE
===================================================== */
.ethics-page {
  max-width: 900px;
  margin-inline: auto;
  padding: 80px 24px;
}

/* Header */
.ethics-page header {
  text-align: center;
  margin-bottom: 80px;
}

.ethics-page h1 {
  font-size: clamp(2.4rem, 4vw, 3rem);
  margin-bottom: 20px;
}

.ethics-page .ethics-intro {
  font-size: 1.05rem;
  opacity: 0.85;
  max-width: 70ch;
  margin-inline: auto;
}

/* Sections */
.ethics-page section {
  background: #ffffff;
  padding: 36px;
  border-radius: 20px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,.05);
}

.ethics-page section h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
  border-right: 4px solid #7b2cbf;
  padding-right: 12px;
}

/* Listes */
.ethics-page ul {
  list-style: none;
  padding: 0;
}

.ethics-page li {
  position: relative;
  padding-right: 28px;
  margin-bottom: 14px;
}

.ethics-page li::before {
  content: "✔";
  position: absolute;
  right: 0;
  color: #7b2cbf;
  font-weight: bold;
}

/* Avertissement */
.ethics-page .ethics-warning {
  background: #fff4f4;
  border-right: 4px solid #d93025;
}

.ethics-page .ethics-warning h2 {
  color: #b42318;
}

/* Note finale */
.ethics-page .ethics-note {
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.75;
  margin-top: 60px;
}

/* =====================================================
   RESPONSIVE – COMMUN
===================================================== */
@media (max-width: 768px) {
  /* Home */
  .home .home-hero {
    padding: 100px 20px;
  }
  
  .home .home-hero h1 {
    font-size: 2.6rem;
  }
  
  .home section:not(.home-hero) {
    margin-block: 70px;
  }
  
  /* Contribution */
  .contribution-header h1 {
    font-size: 26px;
  }
  
  .contribution-page section {
    padding: 24px;
  }
}