/* ==========================================================================
   Crescéa — feuille de style unique
   Charte : bleu ardoise #16455C · terracotta #C9663E · blanc calcaire #F6F3EC
            gris ardoise #2E3A40 · vert olivier #6E7C52 (option)
   Typo   : Fraunces (titres) · Inter (texte) — hébergées en local (woff2)
   ========================================================================== */

/* ---------- Polices locales (aucun CDN) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-Light.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- Variables ---------- */
:root {
  --bleu:       #16455C;
  --bleu-fonce: #103445;
  --terracotta: #C9663E;
  --terracotta-fonce: #B0542F;
  --olivier:    #6E7C52;
  --calcaire:   #F6F3EC;
  --calcaire-2: #EFEAE0;
  --gris:       #2E3A40;
  --gris-doux:  #5d676d;

  /* couleurs des strates du symbole — variables car elles doivent traverser <use> */
  --s-main:   #16455C;
  --s-accent: #C9663E;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1140px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --radius: 6px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.7;
  color: var(--gris);
  background: var(--calcaire);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--bleu); text-decoration-color: rgba(201,102,62,.5); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--terracotta); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--bleu); letter-spacing: -0.01em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

.visually-hidden, .skip-link:not(:focus):not(:focus-within) {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; z-index: 100; left: 1rem; top: 1rem;
  background: var(--bleu); color: var(--calcaire); padding: .6rem 1rem; border-radius: var(--radius);
}

/* ---------- Symbole / logo ---------- */
/* var() résout dans l'arbre d'ombre de <use> → permet de recolorer en pied de page */
.strate-bleu   { stroke: var(--s-main); }
.strate-accent { stroke: var(--s-accent); }

.logo { display: inline-flex; align-items: baseline; gap: .3em; text-decoration: none; color: var(--bleu); }
.logo-symbol { width: auto; aspect-ratio: 117 / 142; flex: 0 0 auto; }
.logo-word {
  font-family: var(--serif); font-weight: 600; color: var(--bleu);
  line-height: 1; letter-spacing: -0.01em;
}

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem var(--pad);
  background: rgba(246, 243, 236, 0.82);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(22, 69, 92, .10);
}
.site-header .logo-symbol { height: 26px; }
.site-header .logo-word { font-size: 1.5rem; }

.site-nav { display: flex; align-items: center; gap: clamp(.9rem, 2.4vw, 2rem); }
.site-nav a {
  font-size: .82rem; font-weight: 500; letter-spacing: .02em;
  color: var(--gris); text-decoration: none; position: relative; padding: .25rem 0;
}
.site-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--terracotta); transition: width .3s var(--ease);
}
.site-nav a:not(.nav-cta):hover::after { width: 100%; }
.site-nav .nav-cta {
  background: var(--bleu); color: var(--calcaire); padding: .5rem 1.05rem;
  border-radius: 100px; transition: background .25s var(--ease);
}
.site-nav .nav-cta:hover { background: var(--bleu-fonce); color: var(--calcaire); }
@media (max-width: 620px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--sans); font-weight: 500; font-size: .95rem; letter-spacing: .01em;
  padding: .85rem 1.6rem; border-radius: 100px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: all .25s var(--ease);
}
.btn-primary { background: var(--bleu); color: var(--calcaire); }
.btn-primary:hover { background: var(--bleu-fonce); transform: translateY(-2px); box-shadow: 0 10px 26px -12px rgba(16,52,69,.6); }
.btn-ghost { background: transparent; color: var(--bleu); border-color: rgba(22,69,92,.35); }
.btn-ghost:hover { border-color: var(--bleu); background: rgba(22,69,92,.05); }

/* ============================ HERO ============================ */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(4rem, 12vh, 8.5rem) var(--pad) clamp(3.5rem, 9vh, 6rem);
  background:
    radial-gradient(120% 90% at 78% -10%, rgba(201,102,62,.10), transparent 55%),
    radial-gradient(100% 80% at 10% 110%, rgba(22,69,92,.08), transparent 60%),
    var(--calcaire);
}
/* léger grain pour la profondeur, sans tracker ni image externe */
.hero-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}
.hero-inner { position: relative; max-width: 900px; margin-inline: auto; text-align: center; }

.badge {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--terracotta-fonce);
  border: 1px solid rgba(201,102,62,.4); border-radius: 100px;
  padding: .45rem 1rem; margin-bottom: clamp(1.5rem, 5vh, 2.6rem); background: rgba(201,102,62,.06);
}

.hero-lockup {
  display: flex; align-items: center; justify-content: center; gap: .12em;
  margin: 0; line-height: .9;
}
.hero-symbol { height: clamp(60px, 12vw, 124px); width: auto; aspect-ratio: 117 / 142; flex: 0 0 auto; }
.hero-word {
  font-family: var(--serif); font-weight: 600; color: var(--bleu);
  font-size: clamp(4rem, 16vw, 9.5rem); letter-spacing: -0.02em; line-height: .9;
}

.hero-baseline {
  margin-top: 1.4rem; font-size: clamp(.74rem, 1.6vw, .95rem);
  font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: var(--gris);
  padding-left: .34em;
}
.hero-baseline::after {
  content: ""; display: block; width: 54px; height: 2px; background: var(--terracotta);
  margin: 1.6rem auto 0; border-radius: 2px;
}

.hero-accroche {
  margin-top: 2rem; font-family: var(--serif); font-weight: 400; font-style: normal;
  font-size: clamp(1.35rem, 2.8vw, 2rem); line-height: 1.35; color: var(--bleu);
}
.hero-sub {
  margin: 1rem auto 0; max-width: 46ch; color: var(--gris-doux); font-size: 1.05rem;
}
.hero-actions { margin-top: 2.4rem; display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* ============================ SECTIONS ============================ */
.section { padding: clamp(3.5rem, 10vh, 7rem) 0; }
.section-alt { background: var(--calcaire-2); }

.section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.6rem; }
.section-index {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--terracotta); line-height: 1;
}
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }

.lead { font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--gris); }
.section p + p { margin-top: 1rem; }

/* ---------- Piliers (concept) ---------- */
.pillars {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.pillar {
  position: relative; background: var(--calcaire); border: 1px solid rgba(22,69,92,.12);
  border-top: 3px solid var(--bleu); border-radius: var(--radius);
  padding: 2rem 1.7rem; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.section-alt .pillar { background: var(--calcaire); }
.pillar:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(16,52,69,.5); }
.pillar-accent { border-top-color: var(--terracotta); background: var(--bleu); }
.pillar-accent h3, .pillar-accent .pillar-num { color: var(--calcaire); }
.pillar-accent p { color: rgba(246,243,236,.82); }
.pillar-accent .pillar-num { color: var(--terracotta); }
.pillar-num {
  font-family: var(--serif); font-weight: 300; font-size: 1.5rem; color: var(--terracotta);
  display: block; margin-bottom: .4rem; letter-spacing: .05em;
}
.pillar h3 { font-size: 1.5rem; margin-bottom: .7rem; }
.pillar p { color: var(--gris-doux); font-size: .98rem; }

.concept-note {
  margin-top: 2.2rem; font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--bleu); font-size: 1.15rem;
}
.concept-note::before { content: "— "; color: var(--terracotta); }

/* ---------- Features (produit) ---------- */
.features {
  margin-top: clamp(2.5rem, 6vh, 3.5rem); list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: rgba(22,69,92,.12); border: 1px solid rgba(22,69,92,.12); border-radius: var(--radius); overflow: hidden;
}
.features li { background: var(--calcaire-2); padding: 1.8rem 1.6rem; position: relative; }
.features li::before {
  content: ""; position: absolute; left: 1.6rem; top: 1.55rem;
  width: 22px; height: 2px; background: var(--terracotta);
}
.features h3 { font-size: 1.18rem; margin: 1rem 0 .5rem; }
.features p { color: var(--gris-doux); font-size: .95rem; line-height: 1.6; }

/* ---------- Territoire ---------- */
.territory-tags { list-style: none; padding: 0; margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.territory-tags li {
  font-size: .82rem; font-weight: 500; color: var(--bleu);
  border: 1px solid rgba(22,69,92,.25); border-radius: 100px; padding: .35rem .85rem; background: rgba(22,69,92,.03);
}

/* ---------- Contact ---------- */
.section-contact { background: var(--bleu); color: var(--calcaire); }
.section-contact h2 { color: var(--calcaire); }
.section-contact .section-index { color: var(--terracotta); }
.section-contact .lead { color: rgba(246,243,236,.85); }

.contact-form {
  margin-top: clamp(2rem, 5vh, 3rem); display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem;
  max-width: 720px;
}
.field { display: flex; flex-direction: column; gap: .45rem; }
.field-full { grid-column: 1 / -1; }
.contact-form label { font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: rgba(246,243,236,.8); }
.contact-form input, .contact-form textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--calcaire);
  background: rgba(246,243,236,.06); border: 1px solid rgba(246,243,236,.25);
  border-radius: var(--radius); padding: .8rem .9rem; transition: border-color .2s var(--ease), background .2s var(--ease);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--terracotta); background: rgba(246,243,236,.1);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.section-contact .btn-primary { background: var(--terracotta); color: #fff; }
.section-contact .btn-primary:hover { background: var(--terracotta-fonce); }
.form-fallback { font-size: .9rem; color: rgba(246,243,236,.75); margin: 0; }
.section-contact a { color: var(--calcaire); text-decoration-color: var(--terracotta); }

/* messages serveur (contact.php) */
.form-message {
  grid-column: 1/-1; padding: .9rem 1.1rem; border-radius: var(--radius); font-size: .95rem;
}
.form-message.ok  { background: rgba(110,124,82,.25); border: 1px solid var(--olivier); }
.form-message.err { background: rgba(201,102,62,.22); border: 1px solid var(--terracotta); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--bleu-fonce); color: var(--calcaire); padding: clamp(2.5rem, 6vh, 4rem) 0; }
.footer-inner { display: grid; gap: .8rem; text-align: center; justify-items: center; }
.logo-footer { justify-self: center; }
.site-footer .logo-symbol { height: 24px; }
.site-footer { --s-main: var(--calcaire); }  /* strates claires sur fond bleu */
.site-footer .logo-word { color: var(--calcaire); font-size: 1.4rem; }
.footer-tag { font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: rgba(246,243,236,.6); }
.footer-note { font-size: .9rem; color: rgba(246,243,236,.7); line-height: 1.7; }
.footer-note a, .site-footer a { color: var(--calcaire); text-decoration-color: var(--terracotta); }
.footer-copy { font-size: .8rem; color: rgba(246,243,236,.5); margin-top: .6rem; }

/* ============================ ANIMATIONS ============================ */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
/* stagger doux dans une même section */
.js .pillars [data-reveal].is-visible:nth-child(2) { transition-delay: .08s; }
.js .pillars [data-reveal].is-visible:nth-child(3) { transition-delay: .16s; }
.js .hero [data-reveal] { transition-duration: .8s; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn:hover, .pillar:hover { transform: none !important; }
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 880px) {
  .pillars { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .hero-inner { width: 100%; }
  .badge {
    font-size: .62rem; letter-spacing: .08em; white-space: normal;
    max-width: 100%; line-height: 1.5;
  }
  .hero-baseline { letter-spacing: .12em; font-size: .66rem; white-space: normal; line-height: 1.8; }
  .hero-word { font-size: clamp(3.2rem, 18vw, 5rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}
