/* ==========================================================================
   IN-VIVA — feuille de style unique
   Reconstruction statique du site WordPress (thème OceanWP + Elementor).
   Aucune dépendance externe : pas de CDN, pas de webfont distante.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables
   -------------------------------------------------------------------------- */
:root {
  /* palette reprise du site d'origine */
  --red:     #e74c3c;
  --orange:  #ef4f3a;
  --amber:   #fa873d;
  --green:   #3ee9aa;
  --blue:    #2980b9;
  --purple:  #cb60c4;

  --ink:     #1c1c1c;
  --body:    #444;
  --muted:   #6f6f6f;
  --line:    #e6e6e6;
  --paper:   #fff;
  --sand:    #fdf6ee;

  --container: 1220px;
  --header-h:  76px;

  --font: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Helvetica Neue", Arial, sans-serif;
  /* le kit Elementor d'origine utilisait Roboto pour les titres
     et Roboto Slab en police secondaire. Changez ici pour tout le site. */
  --font-title: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI",
                "Helvetica Neue", Arial, sans-serif;

  --radius: 30px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--orange); text-decoration: none; transition: color .2s var(--ease); }
a:hover, a:focus-visible { color: var(--ink); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  color: var(--ink);
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.25;
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem); }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: .8rem 1.2rem;
}
.skip:focus { left: 0; }

/* --------------------------------------------------------------------------
   3. Grille (transposition des sections / colonnes Elementor)
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}
.wrap-full  { width: 100%; padding-inline: clamp(16px, 4vw, 48px); }
.wrap-bleed { width: 100%; }

.sec { position: relative; padding-block: clamp(20px, 3vw, 40px); }
.sec-tiles { padding-block: 0; }
.sec-img { background-color: #222; color: #fff; }
.sec-fixed { background-attachment: fixed; }

/* voile appliqué sur les sections à image de fond */
.sec-overlay::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--ov-color, rgba(0, 0, 0, .45));
  opacity: var(--ov-opacity, .5);
  pointer-events: none;
}
.sec-overlay > * { position: relative; z-index: 1; }

.row { display: flex; flex-wrap: wrap; align-items: stretch; }
.row-tiles { align-items: stretch; }

.col { flex: 0 0 var(--col, 100%); max-width: var(--col, 100%); min-width: 0; }
/* gouttière par défaut d'Elementor ; toute valeur définie en ligne la remplace */
.col-in { height: 100%; padding-inline: 10px; }

/* les tuiles purement décoratives n'ont pas de contenu : on leur donne un format */
.col-tile .col-in { padding: 0 !important; min-height: 200px; }
/* colonne vide : sert de gouttière entre deux blocs, on la garde sur desktop */
.col-empty .col-in { padding: 0; }

/* une section faite uniquement de tuiles est collée bord à bord */
.row-tiles .col-in { display: flex; flex-direction: column; justify-content: center; }

/* --------------------------------------------------------------------------
   4. Widgets
   -------------------------------------------------------------------------- */
.wg + .wg { margin-top: 6px; }
/* tailles de police d'Elementor : desktop / tablette / mobile.
   Une valeur absente laisse la taille héritée du parent. */
.wg[style*="--fs"] { font-size: var(--fs); }
.wg[style*="--lh"] { line-height: var(--lh); }
.wg-heading { margin-bottom: .5em; }
.wg-text > :last-child { margin-bottom: 0; }
.wg-text a { text-decoration: underline; text-underline-offset: 2px; }

.spacer { height: var(--h, 20px); flex: 0 0 auto; }

.anchor { position: relative; top: calc(var(--header-h) * -1); }

.wg-image img { margin-inline: auto; }
.wg-image[style*="left"]  img { margin-inline: 0 auto; }
.wg-image[style*="right"] img { margin-inline: auto 0; }
.wg-image figcaption {
  margin-top: .6em; font-size: .85rem; color: var(--muted); text-align: center;
}

.wg-icon svg { width: 46px; height: 46px; fill: currentColor; display: inline-block; }

.wg-divider { display: flex; justify-content: var(--dv-align, center); }
.wg-divider hr {
  margin: 0;
  width: var(--dv-width, 100%);
  border-top: var(--dv-weight, 1px) solid var(--dv-color, var(--line));
}

.wg-counter { text-align: center; }
.counter-num { display: block; font-size: 3rem; font-weight: 700; color: var(--ink); }
.counter-title { display: block; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Boutons ---------------------------------------------------------------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-block;
  padding: .8em 1.9em;
  border: 0;
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              transform .25s var(--ease);
}
.btn:hover, .btn:focus-visible {
  background: var(--btn-bg-hover, var(--amber));
  color: var(--btn-fg-hover, #fff);
  text-decoration: none;
  transform: translateY(-2px);
}
.btn-xs { padding: .5em 1.2em; font-size: .85rem; }
.btn-sm { padding: .65em 1.5em; font-size: .92rem; }
.btn-lg { padding: 1em 2.4em; font-size: 1.1rem; }
.btn-xl { padding: 1.15em 2.8em; font-size: 1.25rem; }

/* Accordéon (widget « toggle ») ------------------------------------------ */
.wg-toggle { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.4rem 1rem 0;
  position: relative;
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--ink);
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary::after {
  content: "+";
  position: absolute; right: .4rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem; line-height: 1; color: var(--orange);
  transition: transform .25s var(--ease);
}
.acc-item[open] summary::after { content: "–"; }
.acc-item summary:hover { color: var(--orange); }
.acc-body { padding: 0 0 1.2rem; }
.acc-body > :last-child { margin-bottom: 0; }

/* Carrousel --------------------------------------------------------------- */
.wg-carousel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--sand);
}
.wg-carousel .cs-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.wg-carousel .cs-slide.is-on { opacity: 1; }

/* --------------------------------------------------------------------------
   5. En-tête
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.header-in {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: var(--header-h);
}
.brand { margin-right: auto; display: flex; align-items: center; }
.brand img { height: 46px; width: auto; }

.site-nav ul {
  display: flex; flex-wrap: wrap; gap: .2rem;
  margin: 0; padding: 0; list-style: none;
}
.site-nav a {
  display: block;
  padding: .5rem .7rem;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 500;
  border-radius: 4px;
}
.site-nav a:hover, .site-nav a:focus-visible {
  color: var(--orange); text-decoration: none; background: rgba(0, 0, 0, .04);
}
.site-nav a.is-current { color: var(--orange); box-shadow: inset 0 -2px 0 var(--orange); }

.burger {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  border: 0; background: none; cursor: pointer;
}
.burger span {
  display: block; height: 2px; margin: 4px 0;
  background: var(--ink);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* En-tête transparent superposé au visuel d'accueil */
.page-hero .site-header {
  position: fixed; left: 0; right: 0;
  background: rgba(255, 255, 255, .28);
  border-bottom-color: rgba(255, 255, 255, .5);
}
.page-hero .site-header.is-stuck {
  background: rgba(255, 255, 255, .97);
  border-bottom-color: var(--line);
}
.page-hero main > .sec:first-child { padding-top: calc(var(--header-h) + 40px); }

/* --------------------------------------------------------------------------
   6. Pages « contenu simple » (mentions légales, données personnelles…)
   -------------------------------------------------------------------------- */
.wrap-narrow { max-width: 780px; }
.sec-page { padding-block: clamp(40px, 7vw, 90px); }
.page-title { margin-bottom: 1.2em; }
.rte h2 { margin-top: 1.8em; }
.rte img { margin-block: 1.5em; }
.rte figure { margin: 1.5em 0; }
.wp-block-media-text { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; align-items: start; }

/* --------------------------------------------------------------------------
   7. Formulaire de contact
   -------------------------------------------------------------------------- */
.contact-form { max-width: 620px; }
.field { margin-bottom: 1.1rem; }
.field label {
  display: block; margin-bottom: .35rem;
  font-size: .9rem; font-weight: 600; color: var(--ink);
}
.field input, .field textarea {
  width: 100%;
  padding: 10px 18px;
  border: 1px solid #f0f0f0;
  border-radius: var(--radius);
  background: #f9f9f9;
  font: inherit;
  color: var(--ink);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field textarea { border-radius: 18px; resize: vertical; }
.field input:focus, .field textarea:focus {
  border-color: var(--amber); background: #fff; outline: none;
}
.form-note { margin-top: 1rem; font-size: .92rem; color: var(--muted); min-height: 1.5em; }
.form-note.is-error { color: var(--red); }

/* --------------------------------------------------------------------------
   8. Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--sand);
  border-top: 1px solid var(--line);
  padding-block: clamp(40px, 6vw, 70px) 30px;
  font-size: .93rem;
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.footer-col h2 {
  font-size: 1.05rem; margin-bottom: .8em;
  font-family: var(--font); font-weight: 700; color: var(--ink);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .45em; }
.footer-col a { color: var(--ink); }
.footer-col a:hover { color: var(--orange); }
.footer-col .btn { color: var(--btn-fg); }
.footer-col .btn:hover { color: var(--btn-fg-hover, #fff); }
.footer-logo { width: 92px; margin-bottom: 1rem; }
.tags { font-size: .78rem; letter-spacing: .04em; color: var(--muted); }
.footer-contact { line-height: 1.9; color: var(--body); }
.copyright {
  margin: 3rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
}

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #eee; color: var(--ink);
  font-size: 1.2rem; text-decoration: none;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), background-color .2s var(--ease);
}
.to-top.is-on { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--amber); color: #fff; text-decoration: none; }

/* --------------------------------------------------------------------------
   9. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .burger { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: 0; overflow: hidden;
    transition: max-height .3s var(--ease);
  }
  .site-nav.is-open { max-height: 70vh; overflow-y: auto; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem 0; }
  .site-nav a { padding: .8rem clamp(16px, 4vw, 40px); font-size: 1rem; }
  .site-nav a.is-current { box-shadow: inset 3px 0 0 var(--orange); }

  .c-quarter, .c-third, .c-half { flex-basis: 50%; max-width: 50%; }
  .c-twothirds, .c-threequarters { flex-basis: 100%; max-width: 100%; }
  .wg[style*="--fs-t"] { font-size: var(--fs-t); }
}

@media (max-width: 700px) {
  .col { flex-basis: 100% !important; max-width: 100% !important; }
  .col-empty { display: none; }
  .col-in { padding-left: clamp(16px, 5vw, 30px) !important;
            padding-right: clamp(16px, 5vw, 30px) !important; }
  .row-tiles .col-in { padding-block: 12% !important; }
  .col-tile .col-in { min-height: 160px; padding-block: 0 !important; }
  .sec-fixed { background-attachment: scroll; }
  .wp-block-media-text { grid-template-columns: 1fr; }
  .spacer { height: var(--hm, var(--h, 20px)); }
  /* taille mobile d'Elementor si elle existe, sinon on plafonne les très
     grandes tailles pour qu'elles tiennent dans l'écran */
  .wg[style*="--fs"]   { font-size: min(var(--fs), 9vw); }
  .wg[style*="--fs-m"] { font-size: var(--fs-m); }
  /* un interligne fixé en px devient illisible sur petit écran */
  .wg[style*="--lh"]   { line-height: var(--lh-m, 1.6); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .to-top, .burger { display: none; }
  body { color: #000; }
}

/* Leurre anti-robots du formulaire de contact (contact.html).
   `position:absolute` + `left:-9999px` plutôt que `display:none` : certains robots ignorent les
   champs en `display:none`, mais remplissent ceux qui sont simplement hors écran. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
