/* ==========================================================================
   PREV'IMPACT — Système de design "Les Mains du Soin"
   Tokens extraits pixel par pixel du logo officiel (PREVIMPACT_Logo_Carre.png).
   Ne jamais modifier les valeurs de marque ci-dessous sans un asset source à l'appui.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* --- Couleurs de marque (source: logo officiel) --- */
  --navy-900: #142A38;   /* navy profond — fond signature */
  --navy-700: #1A3547;   /* navy médian */
  --navy-500: #2B4558;   /* navy clair (dégradés, bordures sur navy) */
  --emerald:  #3D9B85;   /* vert émeraude — accent principal (anneau) */
  --sage:     #8BC2AC;   /* vert sauge clair — texte/accents sur navy */
  --gold:     #C79F63;   /* or — point focal, CTA, filets */
  --cream:    #F7F1E6;   /* crème chaud — fond clair principal */
  --cream-2:  #EDEBE3;   /* crème anneau — cartes, surfaces */
  --white:    #FFFFFF;

  /* --- Rôles sémantiques --- */
  --bg:            var(--cream);
  --bg-alt:        var(--cream-2);
  --bg-dark:       var(--navy-900);
  --surface:       var(--white);
  --text:          var(--navy-900);
  --text-muted:    #4E5D66;
  --text-on-dark:  var(--cream);
  --text-on-dark-muted: var(--sage);
  --accent:        var(--emerald);
  --accent-warm:   var(--gold);
  --border:        rgba(20, 42, 56, 0.12);
  --border-dark:   rgba(255, 255, 255, 0.14);

  /* --- Typographie --- */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif; /* écho du wordmark serif */
  --font-body:    'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; /* système établi */

  --step--1: clamp(0.83rem, 0.78rem + 0.2vw, 0.9rem);
  --step-0:  clamp(1rem, 0.95rem + 0.25vw, 1.12rem);
  --step-1:  clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.4rem + 1vw, 2.1rem);
  --step-3:  clamp(2.1rem, 1.7rem + 2vw, 3rem);
  --step-4:  clamp(2.7rem, 2rem + 3.4vw, 4.2rem);

  /* --- Espacement & rythme --- */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;
  --container: 1140px;
  --radius:   14px;
  --radius-sm: 8px;
  --shadow:   0 10px 30px rgba(20, 42, 56, 0.10);
  --shadow-lg: 0 24px 60px rgba(20, 42, 56, 0.16);
  --ease:     cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ========================= Reset & base ========================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0 0 var(--space-sm); }
h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-family: var(--font-body); font-weight: 600; font-size: var(--step-1); margin: 0 0 var(--space-xs); }
p  { margin: 0 0 var(--space-sm); color: var(--text-muted); max-width: 62ch; }

/* Eyebrow / label — encode une vraie hiérarchie, pas de la déco */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: var(--space-sm);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--gold);
  display: inline-block;
}

/* ========================= Layout ========================= */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding-block: var(--space-xl); }
.section--tight { padding-block: var(--space-lg); }
.section--dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section--dark p { color: var(--text-on-dark-muted); }
.section--alt { background: var(--bg-alt); }
.lead { font-size: var(--step-1); color: var(--text-muted); max-width: 60ch; }
.section--dark .lead { color: var(--text-on-dark-muted); }

.grid { display: grid; gap: var(--space-md); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ========================= Header / Navigation ========================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20, 42, 56, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-dark);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 0.85rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand__mark { width: 40px; height: 40px; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--white);
}
.brand__name span { color: var(--gold); } /* apostrophe/accent optionnel */
.nav__links { display: flex; align-items: center; gap: var(--space-md); list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-weight: 500; font-size: var(--step--1); letter-spacing: 0.02em;
  color: var(--sage); padding: 0.4rem 0; position: relative; transition: color 0.2s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--white); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gold); transition: width 0.25s var(--ease);
}
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { width: 100%; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--cream); margin: 5px 0; transition: 0.25s var(--ease); }

/* ========================= Boutons ========================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: var(--step--1); letter-spacing: 0.02em;
  padding: 0.85rem 1.6rem; border-radius: 999px; cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--gold); color: var(--navy-900); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(199, 159, 99, 0.4); }
.btn-outline { background: transparent; border-color: var(--emerald); color: var(--emerald); }
.btn-outline:hover { background: var(--emerald); color: var(--white); transform: translateY(-2px); }
.section--dark .btn-outline { border-color: var(--sage); color: var(--sage); }
.section--dark .btn-outline:hover { background: var(--sage); color: var(--navy-900); }

/* ========================= Hero (fond signature navy) ========================= */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 70% 20%, var(--navy-500), var(--navy-900) 60%);
  color: var(--text-on-dark);
  padding-block: clamp(4rem, 3rem + 8vw, 8rem);
}
.hero__inner { position: relative; z-index: 2; max-width: 44rem; }
.hero h1 { color: var(--white); }
.hero .lead { color: var(--sage); margin-bottom: var(--space-md); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
/* Motif "anneau" en filigrane — signature reprise du logo */
.hero__ring {
  position: absolute; z-index: 1; right: -8%; top: 50%; transform: translateY(-50%);
  width: min(42vw, 520px); aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(139, 194, 172, 0.18);
  pointer-events: none;
}
.hero__ring::before {
  content: ""; position: absolute; inset: 14%; border-radius: 50%;
  border: 2px solid rgba(199, 159, 99, 0.18);
}

/* ========================= Cartes (services / valeurs) ========================= */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-md);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(61, 155, 133, 0.12);
  display: grid; place-items: center; margin-bottom: var(--space-sm);
  color: var(--emerald);
}
.card h4 { color: var(--navy-900); }
.card p { margin-bottom: 0; }

/* ========================= Footer ========================= */
.site-footer { background: var(--navy-900); color: var(--text-on-dark-muted); padding-block: var(--space-lg) var(--space-md); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-md); margin-bottom: var(--space-md); }
.footer__brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: var(--space-sm); }
.footer__brand img { width: 44px; }
.footer h4 { color: var(--white); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; }
.footer a { color: var(--sage); transition: color 0.2s var(--ease); }
.footer a:hover { color: var(--white); }
.footer__bottom {
  border-top: 1px solid var(--border-dark); padding-top: var(--space-md);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-sm);
  font-size: var(--step--1); color: rgba(139, 194, 172, 0.7);
}

/* ========================= Accessibilité & focus ========================= */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--navy-900);
  padding: 0.6rem 1rem; z-index: 200; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ========================= Responsive ========================= */
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--navy-900); padding: var(--space-sm) 1.25rem var(--space-md);
    border-bottom: 1px solid var(--border-dark);
    max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease);
  }
  .nav__links.is-open { max-height: 420px; }
  .nav__links a { width: 100%; padding: 0.7rem 0; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ========================= Motion réduit ========================= */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
