/* =================================================================
   INSTITUT CHOIX & CONSCIENCE — Système visuel
   Palette : Sauge + Terracota (ambiance) · Doré (accent)
   Type    : Playfair Display (titres) · Poppins (corps)
   ================================================================= */

:root {
  /* — Fonds — */
  --paper:        #FDFBF7;   /* fond principal, blanc cassé chaud   */
  --paper-2:      #F6EFE4;   /* fond secondaire, beige sable        */
  --paper-3:      #EFE6D7;   /* beige plus marqué (séparateurs doux)*/
  --forest:       #232A1E;   /* fond sombre, vert forêt profond     */
  --forest-2:     #2C3426;   /* fond sombre alternatif              */

  /* — Sauge (vert ambiance) — */
  --sage:         #7C9266;   /* sauge profond : texte/accent vert   */
  --sage-mid:     #9DAE86;   /* sauge moyen (logo)                  */
  --sage-soft:    #C6D2B2;   /* sauge clair (fills, tints)          */
  --sage-wash:    #E9EEDF;   /* lavis sauge très pâle (fond section)*/

  /* — Terracota (orange ambiance) — */
  --terra:        #BC6B3C;   /* terracota principal : CTA, action   */
  --terra-deep:   #9F562E;   /* terracota foncé : hover, texte fort */
  --terra-soft:   #E7C7AE;   /* terracota clair (tints)             */
  --terra-wash:   #F6E7DA;   /* lavis terracota pâle                */

  /* — Doré (accent / lumière) — */
  --gold:         #C39A3C;   /* or doux : labels, rules, ornement   */
  --gold-bright:  #D9B85A;   /* or lumineux (sur fond sombre)       */

  /* — Encre / texte — */
  --ink:          #23291F;   /* titres : presque noir, nuance verte */
  --body:         #43483D;   /* corps : gris chaud anthracite       */
  --body-soft:    #6E7263;   /* texte secondaire / légendes         */
  --on-dark-1:    #F4F0E7;   /* texte clair sur fond sombre         */
  --on-dark-2:    #C7C8B8;   /* texte clair secondaire sur sombre   */

  /* — Hairlines — */
  --line:         rgba(35, 41, 30, 0.12);
  --line-strong:  rgba(35, 41, 30, 0.22);
  --line-dark:    rgba(244, 240, 231, 0.15);

  /* — Mesures — */
  --maxw:         1240px;
  --maxw-text:    760px;
  --radius:       14px;
  --radius-sm:    10px;
  --radius-lg:    22px;

  /* — Mouvement — */
  --ease:         cubic-bezier(0.22, 0.61, 0.36, 1);
  --d1: 180ms;  --d2: 320ms;  --d3: 520ms;

  /* — Tweakables (overridés par le panneau Tweaks) — */
  --cta:          var(--terra);
  --cta-hover:    var(--terra-deep);
  --accent:       var(--gold);
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--sage-soft); color: var(--ink); }

/* ---------- Typographie ---------- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 5.2vw, 4.1rem); font-weight: 600; line-height: 1.08; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.85rem); }
h4 { font-size: clamp(1.15rem, 1.5vw, 1.35rem); font-weight: 600; }
p  { margin: 0 0 1.1em; }
em, .italic { font-family: 'Playfair Display', serif; font-style: italic; }

.serif { font-family: 'Playfair Display', serif; }

/* Label — UPPERCASE, lettrage large, doré */
.label {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.label::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.label.no-rule::before { display: none; }
.label.centered { justify-content: center; }

.eyebrow {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--sage);
}

.lead {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.7;
  color: var(--body);
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.wrap-text { max-width: var(--maxw-text); margin: 0 auto; padding: 0 32px; }
section { padding: clamp(72px, 11vh, 140px) 0; }
.section-tight { padding: clamp(48px, 7vh, 84px) 0; }

.bg-paper   { background: var(--paper); }
.bg-paper-2 { background: radial-gradient(125% 120% at 50% -25%, var(--paper) 0%, var(--paper-2) 62%); }
.bg-sage    { background: radial-gradient(120% 115% at 50% -25%, #EEF2E7 0%, var(--sage-wash) 60%); }
.bg-terra   { background: radial-gradient(120% 115% at 50% -25%, #FBEFE4 0%, var(--terra-wash) 60%); }
/* — Scènes sombres enrichies (nuit chaleureuse : glow + étoiles) — */
.bg-dark {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(140% 135% at 84% -18%, #35412B 0%, var(--forest) 58%);
  color: var(--on-dark-1);
}
.bg-dark::before {
  content: ""; position: absolute; z-index: -1; top: -190px; right: -130px;
  width: 580px; height: 580px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(217,184,90,0.16), transparent 66%);
}
.bg-dark::after {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1.6px 1.6px at 14% 26%, rgba(255,243,216,0.55), transparent),
    radial-gradient(2px 2px at 67% 18%, rgba(255,243,216,0.42), transparent),
    radial-gradient(1.4px 1.4px at 44% 66%, rgba(255,243,216,0.32), transparent),
    radial-gradient(1.6px 1.6px at 86% 60%, rgba(255,243,216,0.3), transparent),
    radial-gradient(1.4px 1.4px at 28% 82%, rgba(255,243,216,0.3), transparent),
    radial-gradient(1.4px 1.4px at 56% 44%, rgba(255,243,216,0.25), transparent);
}
/* Motif lune : injecté par icc.js sur les sections .with-moon */
.with-moon { position: relative; overflow: hidden; }
.deco-moon {
  position: absolute; z-index: 0; pointer-events: none;
  width: 360px; height: 360px; top: -72px; right: -64px; opacity: 0.92;
  filter: drop-shadow(0 24px 60px rgba(0,0,0,0.42));
}
.deco-glow {
  position: absolute; z-index: 0; pointer-events: none;
  top: -150px; right: -40px; width: 540px; height: 540px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217,184,90,0.4), transparent 64%);
}
.with-moon > .wrap, .with-moon > .wrap-text { position: relative; z-index: 2; }
@media (max-width: 760px) { .deco-moon { width: 210px; height: 210px; top: -34px; right: -54px; opacity: 0.55; } }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: var(--on-dark-1); }
.bg-dark .lead { color: var(--on-dark-2); }
.bg-dark .eyebrow { color: var(--sage-mid); }
.bg-dark .label { color: var(--gold-bright); }
.bg-dark .label::before { background: var(--gold-bright); }

.center { text-align: center; }
.measure { max-width: 60ch; }
.measure-narrow { max-width: 44ch; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---------- Rules / ornement ---------- */
.rule-short { width: 52px; height: 2px; background: var(--accent); border: 0; margin: 28px 0; }
.rule-short.centered { margin-left: auto; margin-right: auto; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: 'Poppins', sans-serif;
  font-weight: 600; font-size: 1rem; letter-spacing: 0.01em;
  padding: 16px 30px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: background var(--d1) var(--ease), color var(--d1) var(--ease),
              border-color var(--d1) var(--ease), transform var(--d2) var(--ease),
              box-shadow var(--d2) var(--ease);
  line-height: 1;
}
.btn .arr { transition: transform var(--d2) var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.btn-primary {
  background: var(--cta); color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.btn-primary:hover {
  background: var(--cta-hover);
  box-shadow: 0 12px 30px -12px color-mix(in oklab, var(--cta) 70%, transparent);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(35,41,30,0.03); }

.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #a9842f; transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(195,154,60,0.6); }

.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:hover { background: #647A50; transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(124,146,102,0.6); }

.btn-on-dark { background: var(--on-dark-1); color: var(--ink); }
.btn-on-dark:hover { background: #fff; transform: translateY(-2px); }
.btn-outline-dark { border-color: var(--line-dark); color: var(--on-dark-1); }
.btn-outline-dark:hover { border-color: var(--gold-bright); color: var(--gold-bright); }

.btn-lg { padding: 19px 38px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* link with gold underline on hover */
.tlink {
  color: var(--terra-deep); font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.45em;
  border-bottom: 1.5px solid transparent;
  transition: border-color var(--d1) var(--ease), color var(--d1) var(--ease);
}
.tlink .arr { transition: transform var(--d2) var(--ease); }
.tlink:hover { border-color: var(--accent); color: var(--terra); }
.tlink:hover .arr { transform: translateX(4px); }

/* ---------- Cartes ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  transition: transform var(--d2) var(--ease), box-shadow var(--d2) var(--ease),
              border-color var(--d2) var(--ease);
}
.card.hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 50px -28px rgba(35,41,30,0.28);
  border-color: var(--sage-mid);
}
.card-pad { padding: 36px; }

/* ---------- Fondateurs (partagé index + pages de vente) ---------- */
.founder { display: grid; grid-template-columns: 190px 1fr; gap: 28px; align-items: stretch; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.founder-photo { width: 190px; height: 100%; min-height: 252px; align-self: stretch; }
.founder-body { align-self: center; }
.founder-role { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sage); font-weight: 600; }
.founder-quote { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.2rem; line-height: 1.45; color: var(--ink); margin: 22px 0 0; padding-left: 18px; border-left: 3px solid var(--gold); }
@media (max-width: 760px) { .founder { grid-template-columns: 1fr; } .founder-photo { width: 100%; height: 300px; min-height: 0; } }

/* numéro / badge */
.pill {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px;
}
.pill-sage  { background: var(--sage-wash); color: var(--sage); }
.pill-terra { background: var(--terra-wash); color: var(--terra-deep); }
.pill-gold  { background: color-mix(in oklab, var(--gold) 18%, transparent); color: #8a6b22; }
.pill-soon  { background: rgba(35,41,30,0.06); color: var(--body-soft); }

/* ---------- Grilles ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Header ---------- */
.icc-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklab, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.icc-header.on-dark {
  background: color-mix(in oklab, var(--forest) 80%, transparent);
  border-bottom-color: var(--line-dark);
}
.icc-nav {
  max-width: var(--maxw); margin: 0 auto; padding: 0 32px;
  height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand img { width: 42px; height: 42px; }
.brand .bt { line-height: 1.05; }
.brand .bt .b1 { font-family: 'Playfair Display', serif; font-size: 1.16rem; color: var(--sage); font-weight: 500; }
.brand .bt .b2 { font-family: 'Playfair Display', serif; font-size: 1.16rem; color: var(--sage); font-weight: 700; }
.on-dark .brand .bt .b1, .on-dark .brand .bt .b2 { color: var(--sage-mid); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a.navitem {
  font-size: 0.93rem; font-weight: 500; color: var(--body);
  padding: 9px 15px; border-radius: 999px;
  transition: color var(--d1) var(--ease), background var(--d1) var(--ease);
  position: relative;
}
.nav-links a.navitem:hover { color: var(--terra-deep); background: rgba(35,41,30,0.04); }
.on-dark .nav-links a.navitem { color: var(--on-dark-2); }
.on-dark .nav-links a.navitem:hover { color: var(--gold-bright); background: rgba(244,240,231,0.06); }

/* dropdown */
.nav-drop { position: relative; }
.nav-drop > .navitem { display: inline-flex; align-items: center; gap: 0.4em; }
.nav-drop > .navitem .caret { width: 9px; height: 9px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform var(--d1) var(--ease); }
.nav-drop:hover > .navitem .caret { transform: rotate(45deg) translateY(0); }
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 320px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px;
  box-shadow: 0 26px 60px -24px rgba(35,41,30,0.32);
  opacity: 0; visibility: hidden; transition: opacity var(--d2) var(--ease), transform var(--d2) var(--ease);
}
.nav-drop:hover .dropdown, .nav-drop:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown a { display: block; padding: 13px 16px; border-radius: var(--radius-sm); transition: background var(--d1) var(--ease); }
.dropdown a:hover { background: var(--sage-wash); }
.dropdown a .dt { display: block; font-weight: 600; color: var(--ink); font-size: 0.98rem; }
.dropdown a .ds { display: block; font-size: 0.84rem; color: var(--body-soft); margin-top: 2px; }
.dropdown .ddiv { height: 1px; background: var(--line); margin: 8px 6px; }

.nav-cta { display: flex; align-items: center; gap: 12px; }

/* mobile */
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; border-radius: 10px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.burger span { width: 20px; height: 1.7px; background: var(--ink); display: block; transition: transform var(--d1) var(--ease), opacity var(--d1) var(--ease); }
.on-dark .burger span { background: var(--on-dark-1); }
.on-dark .burger { border-color: var(--line-dark); }
.mobile-menu { display: none; }

@media (max-width: 940px) {
  .nav-links, .nav-cta .btn { display: none; }
  .burger { display: flex; }
  .mobile-menu {
    display: block; position: fixed; inset: 78px 0 0 0; z-index: 99;
    background: var(--paper); padding: 24px 28px; overflow-y: auto;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity var(--d2) var(--ease), transform var(--d2) var(--ease);
    border-top: 1px solid var(--line);
  }
  .mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .mobile-menu a { display: block; padding: 16px 0; font-size: 1.15rem; font-family: 'Playfair Display', serif; color: var(--ink); border-bottom: 1px solid var(--line); }
  .mobile-menu .msub a { font-family: 'Poppins', sans-serif; font-size: 1rem; color: var(--body); padding-left: 18px; border-bottom: none; padding: 10px 0 10px 18px; }
  .mobile-menu .mlabel { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); padding: 22px 0 4px; font-weight: 600; }
  .mobile-menu .btn { display: flex; margin-top: 22px; }
}

/* ---------- Footer ---------- */
.icc-footer { background: var(--forest); color: var(--on-dark-2); padding: 84px 0 40px; }
.icc-footer h4 { color: var(--on-dark-1); font-family: 'Poppins', sans-serif; font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; margin-bottom: 20px; color: var(--gold-bright); }
.icc-footer .fbrand { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--on-dark-1); }
.icc-footer a { color: var(--on-dark-2); transition: color var(--d1) var(--ease); display: inline-block; padding: 5px 0; }
.icc-footer a:hover { color: var(--gold-bright); }
.icc-footer .fgrid { display: grid; grid-template-columns: 1.7fr 1fr 1.15fr 1fr 1.2fr; gap: 40px; }
.icc-footer .fbot { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line-dark); font-size: 0.84rem; color: var(--on-dark-2); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.icc-footer .reg { color: var(--gold-bright); }
@media (max-width: 820px) { .icc-footer .fgrid { grid-template-columns: 1fr 1fr; gap: 36px; } }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--body-soft); margin-bottom: 9px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: 'Poppins', sans-serif; font-size: 1.05rem; color: var(--ink);
  padding: 15px 18px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--paper); transition: border-color var(--d1) var(--ease), box-shadow var(--d1) var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 4px var(--sage-wash); }
.field input::placeholder { color: #a9ab9d; }

/* ---------- Image placeholders / slots ---------- */
.ph {
  background:
    linear-gradient(135deg, var(--sage-wash), var(--terra-wash));
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--body-soft); font-size: 0.85rem; text-align: center;
  border-radius: var(--radius); overflow: hidden; position: relative;
}
.ph span { padding: 16px; max-width: 80%; }
image-slot { border-radius: var(--radius); overflow: hidden; display: block; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--d3) var(--ease), transform var(--d3) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 90ms; }
.reveal.d2 { transition-delay: 180ms; }
.reveal.d3 { transition-delay: 270ms; }
.reveal.d4 { transition-delay: 360ms; }
/* Failsafe : si le contexte de rendu fige les transitions (onglet non focalisé,
   capture hors-écran), on force l'état final après un délai (les timers, eux,
   ne sont pas suspendus comme requestAnimationFrame). Invisible pour l'utilisateur
   réel car l'animation est déjà terminée bien avant. */
.reveal-done .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
/* Pendant l'init, on fige les transitions pour que l'application des réglages
   (couleur, rondeur…) soit instantanée — pas de flash de couleur au chargement. */
.icc-preload .btn, .icc-preload .navitem, .icc-preload .card { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Utilitaires ---------- */
.stack > * + * { margin-top: var(--gap, 20px); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-s { gap: 12px; } .gap-m { gap: 20px; } .gap-l { gap: 40px; }
.wrap-flex { flex-wrap: wrap; }
.mt-s { margin-top: 16px; } .mt-m { margin-top: 32px; } .mt-l { margin-top: 56px; }
.muted { color: var(--body-soft); }
.terra-text { color: var(--terra-deep); }
.sage-text { color: var(--sage); }

@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .wrap, .wrap-text { padding: 0 20px; }
  .icc-nav { padding: 0 20px; }
  .card { padding: 26px; }
}
