/* ------------------------------------------------------------------
   Ruisseau Wellbeing Expertise : styles partages entre pages
   Tokens, reset, header, boutons, titres de section, badges, footer.
   NOTE : index.html porte encore sa propre copie de ces regles (CSS
   inline). Au portage dans le site, ce fichier devient la source unique
   (assets/css/rwe.css) et index.html s'y branche a son tour.
   ------------------------------------------------------------------ */

:root{
  --bg:        #e8f1e4;
  --bg-soft:   #eef5ea;
  --forest:    #1f3d2b;
  --ink:       #1b2420;
  --green:     #3f9d4a;
  --green-d:   #2f7d39;
  --lime:      #b9e337;
  --hl:        #a9d98f;
  --marker:    rgba(150,214,70,.82);
  --sand:      #f3efe4;
  --muted:     #5c6b60;
  --card:      #ffffff;
  --frame:     #9cd23f;
  --shadow:    #234b2c;
  --radius:    22px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; overflow-x:clip; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }
body{
  margin:0;
  font-family:"Work Sans",system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  color:var(--ink);
  background:var(--bg);
  line-height:1.55;
  overflow-x:clip;
}
.wrap{ width:min(1180px,92vw); min-width:0; margin-inline:auto; }
.mono{ font-family:"IBM Plex Mono",ui-monospace,monospace; letter-spacing:.04em; }
img{ max-width:100%; }

/* Légendes photo : ajoutées automatiquement à partir des textes alternatifs. */
.photo-caption-host{ position:relative; isolation:isolate; }
.photo-caption-host > .photo-caption{
  position:absolute; inset:auto 12px 12px; z-index:2;
  width:max-content; max-width:calc(100% - 24px);
  margin:0; padding:7px 10px; border-radius:8px;
  background:rgba(31,61,43,.9); color:#fff;
  font-family:"IBM Plex Mono",ui-monospace,monospace;
  font-size:.62rem; line-height:1.4; letter-spacing:.045em;
  text-transform:uppercase; white-space:normal; overflow-wrap:anywhere;
  opacity:0; transform:translateY(8px); pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}
.photo-caption-host:hover > .photo-caption,
.photo-caption-host:focus-within > .photo-caption{
  opacity:1; transform:translateY(0);
}
@media (prefers-reduced-motion:reduce){
  .photo-caption-host > .photo-caption{ transition:none; }
}

/* Lien d'evitement (accessibilite clavier) */
.skip{
  position:absolute; left:-9999px; top:0; z-index:100;
  background:var(--forest); color:#fff; padding:10px 18px; border-radius:0 0 12px 0;
  text-decoration:none; font-weight:600;
}
.skip:focus{ left:0; }

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:var(--bg-soft);
  border-bottom:1px solid rgba(31,61,43,.12);
}
.site-header .wrap{
  display:flex; align-items:center; gap:32px;
  padding:22px 0;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-family:"Bricolage Grotesque",sans-serif;
  font-weight:800; letter-spacing:.02em; font-size:1.05rem;
  color:var(--forest); text-decoration:none; text-transform:uppercase;
}
.brand{ flex:none; }
.brand svg{ flex:none; }
.brand img{ flex:none; }
.nav{ display:flex; gap:28px; margin-inline:auto; }
.nav a{
  color:var(--ink); text-decoration:none; font-weight:500; font-size:.95rem;
  padding:6px 2px; border-bottom:2px solid transparent; transition:border-color .15s;
  white-space:nowrap;
}
.nav a:hover{ border-color:var(--green); }
.nav a[aria-current="page"]{ border-color:var(--green); font-weight:600; }

/* Lien de retour des pages evenement et des fiches de formation, sous l'en-tete */
.back-bar{ background:var(--bg); border-bottom:1px solid rgba(31,61,43,.08); }
.back-bar .wrap{ padding:10px 0; }
.back-bar .back{ display:inline-flex; align-items:center; gap:8px; min-height:28px; font-weight:600; font-size:.9rem; color:var(--ink); text-decoration:none; }
.back-bar .back:hover{ color:var(--green-d); }
.back-bar .back svg{ width:18px; height:18px; }

/* ---------- Boutons ---------- */
.btn{
  --bd:transparent;
  display:inline-flex; align-items:center; gap:14px;
  padding:8px 8px 8px 22px;
  border-radius:999px; border:1.5px solid var(--bd);
  font:inherit; font-weight:600; font-size:.98rem;
  text-decoration:none; cursor:pointer; white-space:nowrap;
  transition:transform .12s ease, box-shadow .12s ease;
}
.btn:hover{ transform:translateY(-1px); }
.btn .disc{
  width:34px; height:34px; border-radius:50%;
  display:grid; place-items:center; flex:none;
}
.btn .disc svg{ width:16px; height:16px; }
.btn-primary{ background:var(--green); color:#fff; }
.btn-primary .disc{ background:var(--lime); color:var(--forest); }
.btn-ghost{ background:var(--card); color:var(--ink); --bd:rgba(31,61,43,.15); }
.btn-ghost .disc{ background:var(--green); color:#fff; }
.btn-sm{ padding:7px 7px 7px 18px; font-size:.9rem; }
.btn-sm .disc{ width:28px; height:28px; }

/* Bouton WhatsApp (inscription / prise de contact) */
.btn-wa{ background:#1f9d55; color:#fff; }
.btn-wa .disc{ background:#fff; color:#1f9d55; }
.btn-wa:hover{ background:#17864a; }

/* ---------- Titres de section ---------- */
.eyebrow{
  display:inline-block; font-family:"IBM Plex Mono",monospace;
  font-size:.72rem; text-transform:uppercase; letter-spacing:.12em;
  color:var(--forest); background:var(--lime);
  padding:6px 15px; border-radius:999px; margin-bottom:16px;
}
.sec{ padding:96px 0; }
.sec-soft{ background:var(--bg-soft); }
.sec-head{ text-align:center; max-width:60ch; margin:0 auto 54px; }
.sec-head h2{
  font-family:"Bricolage Grotesque",sans-serif; font-weight:800;
  font-size:clamp(1.8rem,3.6vw,2.6rem); letter-spacing:-.02em;
  margin:0 0 14px; color:var(--ink);
}
.sec-head p{ color:var(--muted); margin:0; font-size:1.05rem; }

/* ---------- Badges de type d'evenement ---------- */
.ev-type{
  display:inline-block;
  font-family:"IBM Plex Mono",monospace; font-size:.66rem;
  text-transform:uppercase; letter-spacing:.08em;
  padding:5px 12px; border-radius:999px; background:var(--green); color:#fff;
}
.ev-type-seminaire{ background:#5a8f3c; }
.ev-type-formation{ background:var(--green-d); }
.ev-type-atelier{   background:var(--green); }
.ev-type-annonce{   background:#7a6f57; }
.ev-type-retraite{  background:#1f4e4a; }

/* ---------- Footer ---------- */
.site-footer{ background:var(--ink); color:#b9c7bd; padding:64px 0 30px; }
.footer-top{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:40px; margin-bottom:44px; }
.site-footer h4{
  color:#fff; font-family:"Bricolage Grotesque",sans-serif; font-size:.8rem;
  text-transform:uppercase; letter-spacing:.12em; margin:0 0 16px;
}
.site-footer ul{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.site-footer a{ color:#b9c7bd; text-decoration:none; font-size:.92rem; }
.site-footer a:hover{ color:#fff; }
.footer-brand p{ margin:14px 0 0; font-size:.92rem; line-height:1.6; max-width:32ch; }
.footer-social{ display:flex; gap:12px; margin-top:18px; }
.footer-social a{
  width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,.08);
  display:grid; place-items:center;
}
.footer-social svg{ width:16px; height:16px; }
/* Les boutons flottants (WhatsApp, haut/bas) ne couvrent pas la derniere ligne */
.site-footer{ padding-bottom:88px; }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.1); padding-top:22px;
  display:flex; justify-content:center; flex-wrap:wrap; gap:12px; font-size:.84rem; text-align:center;
}

/* ---------- Responsive partage ---------- */
/* Le menu passe a 7 entrees : mesure faite, l'en-tete complet (logo 227 +
   menu 599 + bouton 205 + gouttieres) demande 1095px de .wrap, soit 1190px
   de fenetre. En dessous on resserre le menu, puis on retire le bouton :
   Contact figure deja dans le menu. */
@media (max-width:1280px){
  .site-header .wrap{ gap:22px; }
  .nav{ gap:16px; }
  .nav a{ font-size:.88rem; }
}
@media (max-width:1100px){
  .site-header .btn-primary{ display:none; }
}
@media (max-width:860px){
  .site-header .wrap{ justify-content:space-between; padding:12px 0; }
  .site-header .btn-primary{ display:none; }
  /* Sur mobile, le menu est le panneau plein ecran cree par js/rwe-shared.js. */
  .nav{ display:none; }
  /* 88px en bas : les boutons flottants ne couvrent pas la derniere ligne */
  .site-footer{ padding-bottom:88px; }
  .sec{ padding:64px 0; }
  .footer-top{ grid-template-columns:1fr 1fr; gap:30px; }
}
@media (max-width:520px){
  .footer-top{ grid-template-columns:1fr; }
  .btn{ width:100%; max-width:100%; justify-content:space-between; white-space:normal; }
}

/* ---------- Grands titres : interligne propre (sinon herite du corps, 1.55) ---------- */
body .page-head h1, body .ar-head h1, body .sv-hero h1{ line-height:1.1; }

/* ---------- Ordinateurs portables : ecran large mais peu haut ----------
   Le prefixe body l'emporte sur les styles propres a chaque page, charges apres. */
@media (min-width:861px) and (max-height:820px){
  body .page-head h1, body .ar-head h1, body .sv-hero h1{ font-size:clamp(2rem,3.2vw,2.6rem); }
  body .page-head .wrap{ padding-top:52px; padding-bottom:46px; }
  body .sv-hero{ padding-top:36px; padding-bottom:44px; }
  body .ar-head .chapo{ margin-bottom:22px; }
  body .ar-photo{ aspect-ratio:21/9; }
  body .event-hero{ min-height:440px; margin-top:20px; }
  body .event-hero .wrap{ padding:72px 0 36px; }
  body .event-hero h1{ font-size:clamp(2.25rem,3.6vw,3.1rem); }
}

/* ---------- Arrivee du haut de page ----------
   Le reste des animations : js/motion.js. Le fondu entre deux pages (@view-transition) est
   ecrit dans chaque page : lu depuis ce fichier, il arrive trop tard et le fondu est annule. */
@keyframes rise{ from{ opacity:0; translate:0 18px; } }
@media (prefers-reduced-motion:no-preference){
  .page-head .wrap > *, .ar-head .wrap > *, .sv-hero .wrap > *, .p404 .wrap > *, .event-hero-copy > *{
    animation:rise .9s cubic-bezier(.16,1,.3,1) backwards;
  }
  .page-head .wrap > :nth-child(2), .ar-head .wrap > :nth-child(2), .sv-hero .wrap > :nth-child(2),
  .p404 .wrap > :nth-child(2), .event-hero-copy > :nth-child(2){ animation-delay:.08s; }
  .page-head .wrap > :nth-child(3), .ar-head .wrap > :nth-child(3), .sv-hero .wrap > :nth-child(3),
  .p404 .wrap > :nth-child(3), .event-hero-copy > :nth-child(3){ animation-delay:.16s; }
  .page-head .wrap > :nth-child(n+4), .ar-head .wrap > :nth-child(n+4), .sv-hero .wrap > :nth-child(n+4),
  .p404 .wrap > :nth-child(n+4), .event-hero-copy > :nth-child(n+4){ animation-delay:.24s; }
}

/* Elements masques : contenu a fournir par le cabinet, reactivable depuis le futur back office */
[data-masque]{ display:none !important; }
