/* ==========================================================================
   CAPTIA — même système que RushB (Inter, cartes arrondies), couleur propre : sarcelle
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Material Symbols Rounded";
  src: url("../fonts/symbols.woff2") format("woff2");
  font-weight: 400;
  font-display: block;
}

:root {
  --base-100: #ffffff;
  --base-200: #f5f5f5;
  --base-300: #ececec;
  --text: #0a0a0a;
  --muted: #525252;
  --line: #e2e2e2;
  --primary: #0F766E;
  --primary-hover: #115E59;
  --primary-soft: rgb(15 118 110 / 0.1);
  --on-primary: #ffffff;
  --gradient: linear-gradient(135deg, #0d9488 0%, #0369a1 100%);

  --radius-box: 1rem;
  --radius-field: 0.75rem;
  --shadow: 0 1px 3px rgb(0 0 0 / 0.06), 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.06);
  --shadow-hover: 0 1px 3px rgb(0 0 0 / 0.06), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.08);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--base-100);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
.text-primary { color: var(--primary); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.icon {
  font-family: "Material Symbols Rounded";
  font-weight: normal; font-style: normal;
  font-size: 1.25em; line-height: 1;
  letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; direction: ltr;
  -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}
.icon-inline { font-size: 1em; vertical-align: -0.15em; font-variation-settings: "FILL" 1; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: 0.6rem 1rem; border-radius: var(--radius-field); font-weight: 600;
}
.skip:focus { top: 1rem; }

.container { width: min(100% - 2rem, 72rem); margin-inline: auto; }

/* ==========================================================================
   Boutons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 0.95rem/1 "Inter", sans-serif;
  height: 2.75rem; padding: 0 1.25rem;
  border-radius: var(--radius-field);
  border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border-color: var(--text); color: var(--text); background: transparent; }
.btn-outline:hover { background: var(--text); color: var(--base-100); }
.btn-light { background: var(--base-100); color: var(--primary); }
.btn-light:hover { background: #e6f4f1; }
.btn-lg { height: 3.25rem; padding: 0 1.6rem; font-size: 1.05rem; }
.btn-sm { height: 2.25rem; padding: 0 0.9rem; font-size: 0.875rem; border-radius: 999px; }
.btn .icon { font-size: 1.2rem; }

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: var(--base-100);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 4rem; padding-inline: 1rem;
}
.wordmark {
  font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em;
  text-decoration: none; color: var(--text);
}
.wordmark span { color: var(--primary); }

.nav { display: flex; gap: 0.25rem; }
.nav a {
  text-decoration: none; font-size: 0.925rem; font-weight: 500;
  padding: 0.45rem 0.8rem; border-radius: 0.5rem;
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--primary); background: var(--base-200); }

.navbar-end { display: flex; align-items: center; gap: 0.25rem; }
.nav-toggle.btn-square { display: none; }
.btn-square {
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  border: 0; background: transparent; border-radius: 0.5rem; cursor: pointer; color: var(--text);
}
.btn-square:hover { background: var(--base-200); }
.btn-square .icon { font-size: 1.6rem; }

@media (max-width: 900px) {
  .nav-toggle.btn-square { display: grid; }
  .nav {
    position: absolute; inset: 4rem 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--base-100);
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 12px 24px -12px rgb(0 0 0 / 0.2);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.9rem 0.75rem; font-size: 1.05rem; }
}
@media (max-width: 420px) { .hide-sm { display: none; } }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 6rem 1rem 4rem;
  overflow: hidden;
}
#particles { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-content { position: relative; max-width: 56rem; text-align: center; }
.hero h1 {
  font-size: clamp(2.75rem, 1.5rem + 5.5vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 1.5rem;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 0.08em;
}
.typewriter { display: inline-block; min-width: 1ch; white-space: nowrap; vertical-align: bottom; }
.typewriter::after {
  content: "|"; font-weight: 700;
  color: #0369a1; -webkit-text-fill-color: #0369a1;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-lead { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); max-width: 42rem; margin: 0 auto 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.hero-meta { margin-top: 2.5rem; font-size: 0.875rem; color: var(--muted); }

@media (max-width: 480px) {
  .hero-ctas .btn { width: 100%; }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding-block: 5rem; }
.section-alt { background: var(--base-300); }
.section-head { text-align: center; margin-bottom: 3.5rem; }
.section-head h2, .split h2 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.5rem); font-weight: 800; margin-bottom: 0.9rem; }
.section-head p { font-size: 1.1rem; max-width: 40rem; margin-inline: auto; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ==========================================================================
   Cartes
   ========================================================================== */

.card {
  background: var(--base-100);
  border-radius: var(--radius-box);
  box-shadow: var(--shadow);
  padding: 2rem;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.95rem; }

.card-icon {
  display: grid; place-items: center;
  width: 3rem; height: 3rem; margin-bottom: 1.25rem;
  border-radius: 0.75rem;
  background: var(--primary-soft); color: var(--primary);
  font-size: 1.6rem;
}
.card-center { text-align: center; }
.card-center .card-icon { margin-inline: auto; }
.card-icon-round { width: 4rem; height: 4rem; border-radius: 50%; font-size: 2rem; }

.card-lg { padding: 2.5rem; display: flex; flex-direction: column; align-items: flex-start; }
.card-lg h3 { font-size: 1.5rem; }
.card-lg p { font-size: 1rem; flex: 1; }
.card-lg .btn { margin-top: 1.75rem; }
.card-primary { background: var(--primary); color: var(--on-primary); }
.card-primary p { color: rgb(255 255 255 / 0.82); }
.card-primary .card-icon { background: rgb(255 255 255 / 0.14); color: var(--on-primary); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.25rem; }
.badge {
  display: inline-flex; align-items: center; height: 1.5rem; padding: 0 0.65rem;
  border-radius: 999px; border: 1px solid var(--text);
  font-size: 0.78rem; font-weight: 500;
}
.badge-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.badge-light { border-color: rgb(255 255 255 / 0.6); color: var(--on-primary); }

@media (max-width: 640px) {
  .card, .card-lg { padding: 1.5rem; }
}

/* ==========================================================================
   L'association
   ========================================================================== */

.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; }
.split .lead { font-size: 1.2rem; font-weight: 500; margin-bottom: 1rem; }
.split p:not(.lead) { color: var(--muted); }

.acronym { list-style: none; margin: 0; padding: 2.25rem 2.5rem; }
.acronym li {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  font-weight: 300; letter-spacing: -0.02em; line-height: 1.35;
  color: var(--muted);
}
.acronym b {
  font-weight: 800; display: inline-block; width: 1.05em;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ==========================================================================
   Méthode
   ========================================================================== */

.steps {
  list-style: none; margin: 0 auto; padding: 0; max-width: 64rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem;
  position: relative;
}
.steps::before {
  content: ""; position: absolute; top: 1.75rem; left: 16.66%; right: 16.66%;
  height: 2px; background: repeating-linear-gradient(90deg, var(--primary) 0 8px, transparent 8px 16px);
  opacity: 0.35;
}
.step { text-align: center; position: relative; }
.step-num {
  display: grid; place-items: center; margin: 0 auto 1.25rem;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--primary); color: var(--on-primary);
  font-size: 1.35rem; font-weight: 800;
  box-shadow: 0 0 0 8px var(--base-100);
}
.step h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.step p { color: var(--muted); max-width: 20rem; margin-inline: auto; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .steps::before { display: none; }
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-card { max-width: 48rem; margin-inline: auto; padding: 2.5rem; }
.contact-card:hover { transform: none; box-shadow: var(--shadow); }
.form { display: grid; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field textarea {
  font: inherit; color: inherit;
  background: var(--base-100);
  border: 1px solid #d4d4d4;
  border-radius: var(--radius-field);
  padding: 0.75rem 0.9rem; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 8.5rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field [aria-invalid="true"] { border-color: #dc2626; }
.form-error { color: #b91c1c; font-weight: 600; font-size: 0.9rem; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.5rem; }
.form-note { font-size: 0.85rem; color: var(--muted); }
.form-note a { color: var(--primary); font-weight: 600; }
@media (max-width: 640px) {
  .contact-card { padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--primary); color: var(--on-primary);
  text-align: center; padding: 3.5rem 1rem 2.5rem;
  display: grid; justify-items: center; gap: 0.5rem;
}
.wordmark-footer { font-size: 2rem; color: var(--on-primary); margin-bottom: 0.5rem; }
.wordmark-footer span { color: var(--on-primary); opacity: 0.75; }
.footer-title { font-weight: 700; font-size: 1.05rem; }
.footer-sub { opacity: 0.8; font-size: 0.9rem; }
.btn-circle {
  display: grid; place-items: center; width: 3rem; height: 3rem; margin-top: 1rem;
  border-radius: 50%; color: var(--on-primary); text-decoration: none;
  transition: background-color 0.2s;
}
.btn-circle:hover { background: rgb(255 255 255 / 0.12); }
.btn-circle .icon { font-size: 1.5rem; }
.footer-links { margin-top: 0.75rem; font-size: 0.875rem; }
.footer-links a { opacity: 0.8; text-underline-offset: 0.2em; }
.footer-links a:hover { opacity: 1; }
.footer-copy { font-size: 0.85rem; opacity: 0.7; }
.footer :focus-visible { outline-color: var(--on-primary); }

/* ==========================================================================
   Apparition au scroll (remplace AOS, sans librairie)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* ==========================================================================
   Pages texte (mentions légales)
   ========================================================================== */

.legal { padding: 7rem 0 4rem; }
.legal h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.5rem); font-weight: 800; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.2rem; font-weight: 700; margin: 2.25rem 0 0.6rem; }
.legal p { max-width: 65ch; color: var(--muted); margin-bottom: 0.75rem; }
.legal a { color: var(--primary); }

@media (prefers-reduced-motion: no-preference) {
  .hero-content > * { animation: rise 0.8s var(--ease) both; }
  .hero-content > :nth-child(2) { animation-delay: 0.12s; }
  .hero-content > :nth-child(3) { animation-delay: 0.24s; }
  .hero-content > :nth-child(4) { animation-delay: 0.36s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
