/* ==========================================================================
   Solid'AM — Site web · système partagé
   À utiliser sur toutes les maquettes de pages.
   Tokens identiques au Brand Book.
   ========================================================================== */

:root {
  /* ============ COULEURS ============ */
  --green-500: #3fa368;
  --green-600: #348554;
  --green-700: #2d6a4a;
  --green-50:  #ebf3ee;
  --night-700: #152232;
  --night-800: #0f1a26;
  --night-900: #0a121b;
  --sun-500:   #f2b84a;
  --sun-300:   #f7d48b;
  --sun-100:   #fbeac9;
  --terra-500: #d96f4a;
  --terra-300: #e9a48a;
  --cream-100: #fbf7ee;
  --cream-200: #f4ecdc;
  --cream-300: #e9dec4;
  --ink:       #0f1a26;
  --ink-soft:  #3a4a5c;
  --ink-mute:  #7a8794;
  --hairline:  rgba(15, 26, 38, 0.10);
  --hairline-soft: rgba(15, 26, 38, 0.06);
  --hairline-on-night: rgba(251, 247, 238, 0.14);

  /* ============ TYPOGRAPHIE ============ */
  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif:   'Newsreader', Georgia, 'Times New Roman', serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ============ MISES EN PAGE ============ */
  --container: 1200px;
  --gutter: 24px;
  --pad-x-desktop: 48px;
  --pad-x-tablet: 32px;
  --pad-x-mobile: 20px;

  --space-section: 96px;
  --space-section-mobile: 56px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(15, 26, 38, 0.04), 0 4px 14px rgba(15, 26, 38, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(15, 26, 38, 0.06), 0 12px 32px rgba(15, 26, 38, 0.10);
  --shadow-soft: 0 1px 3px rgba(15, 26, 38, 0.05);
  --shadow-button: 0 1px 0 rgba(15, 26, 38, 0.06), 0 1px 2px rgba(15, 26, 38, 0.06);

  --duration-fast: 150ms;
  --duration: 240ms;
  --easing: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }

/* ==========================================================================
   TYPOGRAPHIE — échelle desktop, dégradée mobile
   ========================================================================== */

h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); color: var(--night-700); letter-spacing: -0.02em; line-height: 1.1; font-weight: 700; }
h1 { font-size: clamp(40px, 5.4vw, 68px); letter-spacing: -0.025em; line-height: 1.02; }
h2 { font-size: clamp(30px, 3.4vw, 44px); }
h3 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 600; line-height: 1.25; }
h4 { font-size: 18px; font-weight: 600; line-height: 1.3; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a  { color: inherit; text-decoration: none; }
strong { color: var(--night-700); font-weight: 600; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--green-700);
  display: inline-block;
}
.eyebrow.on-night { color: var(--sun-300); }

.lede {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink-soft);
  font-style: normal;
}
.lede em {
  font-style: italic;
  color: var(--green-700);
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* ==========================================================================
   CONTENEUR
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x-desktop);
  padding-right: var(--pad-x-desktop);
}
@media (max-width: 1024px) {
  .container { padding-left: var(--pad-x-tablet); padding-right: var(--pad-x-tablet); }
}
@media (max-width: 640px) {
  .container { padding-left: var(--pad-x-mobile); padding-right: var(--pad-x-mobile); }
}

.section { padding: var(--space-section) 0; }
@media (max-width: 1024px) { .section { padding: 72px 0; } }
@media (max-width: 640px) { .section { padding: var(--space-section-mobile) 0; } }

.section-head { margin-bottom: 56px; max-width: 720px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 { margin-bottom: 14px; }
.section-head .lede { max-width: 56ch; }

/* ==========================================================================
   BOUTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.005em;
  border: 1.5px solid transparent;
  transition: background var(--duration) var(--easing), color var(--duration) var(--easing), border-color var(--duration) var(--easing), transform var(--duration-fast) var(--easing), box-shadow var(--duration) var(--easing);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  background: transparent;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--green-500);
  color: var(--cream-100);
  border-color: var(--green-500);
  box-shadow: var(--shadow-button);
}
.btn-primary:hover { background: var(--green-600); border-color: var(--green-600); box-shadow: var(--shadow-card); }

.btn-secondary {
  background: transparent;
  color: var(--green-700);
  border-color: var(--green-700);
}
.btn-secondary:hover { background: var(--green-700); color: var(--cream-100); }

.btn-secondary.on-night {
  color: var(--cream-100);
  border-color: var(--cream-100);
}
.btn-secondary.on-night:hover { background: var(--cream-100); color: var(--night-700); }

.btn-tertiary {
  padding: 8px 0;
  border-radius: 0;
  border: none;
  border-bottom: 1.5px solid currentColor;
  color: var(--green-700);
  background: transparent;
}
.btn-tertiary:hover { color: var(--green-500); }
.btn-tertiary .icon { transition: transform var(--duration) var(--easing); }
.btn-tertiary:hover .icon { transform: translateX(3px); }

.btn-sun {
  background: var(--sun-500);
  color: var(--night-700);
  border-color: var(--sun-500);
  box-shadow: var(--shadow-button);
}
.btn-sun:hover { background: #ddaa3e; border-color: #ddaa3e; }

.btn-sm { padding: 10px 18px; font-size: 13.5px; }
.btn-lg { padding: 17px 34px; font-size: 16.5px; }

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--night-700);
  color: var(--cream-100);
  border-bottom: 1px solid var(--hairline-on-night);
}
.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 76px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.site-logo img { height: 38px; width: auto; }
.site-logo .wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--cream-100);
}
.site-logo .wordmark em { font-style: normal; color: var(--green-500); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-item {
  padding: 10px 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--cream-100);
  border-radius: var(--radius-md);
  transition: background var(--duration) var(--easing), color var(--duration) var(--easing);
  position: relative;
}
.nav-item:hover { background: rgba(251, 247, 238, 0.08); }
.nav-item.has-children::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.6;
  transition: transform var(--duration) var(--easing);
}
.nav-item.active { color: var(--sun-300); }

/* Dropdown wrapper */
.nav-group { position: relative; }
.nav-group:hover .nav-item.has-children::after,
.nav-group:focus-within .nav-item.has-children::after { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 280px;
  background: var(--cream-100);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-hover);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration) var(--easing), transform var(--duration) var(--easing), visibility 0s linear var(--duration);
  z-index: 100;
}
.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity var(--duration) var(--easing), transform var(--duration) var(--easing), visibility 0s linear 0s;
}
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0; right: 0;
  height: 16px;
}
.nav-drop-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  align-items: start;
  transition: background var(--duration-fast) var(--easing);
}
.nav-drop-item:hover { background: var(--cream-200); }
.nav-drop-item .icon-wrap {
  width: 28px; height: 28px;
  background: var(--green-50);
  color: var(--green-700);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-drop-item .icon-wrap svg { width: 14px; height: 14px; }
.nav-drop-item .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--night-700);
  line-height: 1.3;
}
.nav-drop-item .desc {
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.4;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Mobile burger */
.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--cream-100);
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
}
.burger:hover { background: rgba(251, 247, 238, 0.08); }
.burger svg { width: 22px; height: 22px; }

@media (max-width: 1024px) {
  .site-nav { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 640px) {
  .site-header .header-inner { height: 64px; gap: 16px; }
  .site-logo img { height: 32px; }
  .site-logo .wordmark { font-size: 18px; }
  .header-actions .btn { padding: 9px 16px; font-size: 13px; }
  .header-actions .btn:not(.btn-primary):not(.always-visible) { display: none; }
}

/* ==========================================================================
   FRISE NUAGES — bandeau de transition entre header et corps
   ========================================================================== */

.cloud-strip {
  position: relative;
  height: 100px;
  background: var(--night-700);
  overflow: hidden;
}
.cloud-strip svg {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}
@media (max-width: 640px) {
  .cloud-strip { height: 60px; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--night-700);
  color: var(--cream-100);
  padding: 80px 0 0;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--hairline-on-night);
}
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; padding-bottom: 40px; }
}

.footer-brand .logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.footer-brand .logo-row img { height: 44px; }
.footer-brand .wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.footer-brand p {
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(251, 247, 238, 0.75);
  max-width: 38ch;
  margin-bottom: 24px;
}
.footer-brand .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(251, 247, 238, 0.06);
  border: 1px solid var(--hairline-on-night);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(251, 247, 238, 0.85);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sun-300);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 14.5px;
  color: rgba(251, 247, 238, 0.85);
  transition: color var(--duration) var(--easing);
  display: inline-block;
}
.footer-col a:hover { color: var(--sun-300); }
.footer-col p {
  font-size: 14.5px;
  color: rgba(251, 247, 238, 0.85);
  margin-bottom: 8px;
}
.footer-col .meta {
  font-size: 13px;
  color: rgba(251, 247, 238, 0.55);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.footer-socials { display: flex; gap: 10px; margin-top: 16px; }
.footer-socials a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(251, 247, 238, 0.06);
  border: 1px solid var(--hairline-on-night);
  border-radius: 50%;
  color: var(--cream-100);
  transition: background var(--duration) var(--easing), transform var(--duration-fast) var(--easing);
}
.footer-socials a:hover {
  background: var(--green-500);
  border-color: var(--green-500);
  transform: translateY(-2px);
}
.footer-socials svg { width: 16px; height: 16px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 0 32px;
  font-size: 13px;
  color: rgba(251, 247, 238, 0.55);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.footer-bottom .footer-legals { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-bottom .footer-legals a { color: rgba(251, 247, 238, 0.75); transition: color var(--duration) var(--easing); }
.footer-bottom .footer-legals a:hover { color: var(--sun-300); }

/* ==========================================================================
   COMPOSANTS PARTAGÉS
   ========================================================================== */

/* —— CARDS —— */
.card {
  background: white;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: box-shadow var(--duration) var(--easing), transform var(--duration) var(--easing);
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.card.no-hover:hover { transform: none; box-shadow: var(--shadow-card); }

/* —— ACTION CARDS —— grandes cards d'action sur la home et nos-actions */
.action-card {
  background: white;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--duration) var(--easing), transform var(--duration) var(--easing);
}
.action-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.action-card .card-image {
  aspect-ratio: 4/3;
  background: var(--cream-200);
  position: relative;
  overflow: hidden;
}
.action-card .card-body { padding: 28px 28px 32px; flex: 1; display: flex; flex-direction: column; }
.action-card .card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-700);
  font-weight: 500;
  margin-bottom: 12px;
}
.action-card h3 { margin-bottom: 10px; }
.action-card .card-desc { font-size: 15px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 20px; flex: 1; }
.action-card .card-cta { margin-top: auto; display: flex; align-items: center; gap: 6px; color: var(--green-700); font-weight: 600; font-size: 14px; }
.action-card .card-cta::after { content: '→'; transition: transform var(--duration) var(--easing); }
.action-card:hover .card-cta::after { transform: translateX(4px); }

/* —— STATS —— chiffres clés */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.stat {
  padding: 32px 24px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1;
  color: var(--green-500);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.stat-num.on-night { color: var(--sun-300); }
.stat-num.on-cream { color: var(--green-500); }
.stat-label {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}
.stat-label.on-night { color: rgba(251, 247, 238, 0.85); }

/* —— FORMS —— */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--night-700);
}
.form-field input,
.form-field textarea,
.form-field select {
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-md);
  background: white;
  color: var(--ink);
  transition: border-color var(--duration) var(--easing), box-shadow var(--duration) var(--easing);
  width: 100%;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(63, 163, 104, 0.15);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field .hint { font-size: 12.5px; color: var(--ink-mute); }

/* —— BREADCRUMB —— */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.breadcrumb a {
  color: var(--green-700);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) var(--easing);
}
.breadcrumb a:hover { border-color: currentColor; }
.breadcrumb .sep { color: var(--ink-mute); }

/* —— PAGE HEADER (intra) —— */
.page-hero {
  background: var(--cream-100);
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--hairline);
}
.page-hero .eyebrow { margin-bottom: 16px; }
.page-hero h1 { max-width: 22ch; margin-bottom: 20px; }
.page-hero .lede { max-width: 56ch; }

/* —— PILL TAGS —— */
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.tag-pill.green { background: var(--green-50); color: var(--green-700); }
.tag-pill.sun { background: var(--sun-100); color: #8a6010; }
.tag-pill.cream { background: var(--cream-200); color: var(--night-700); }

/* ==========================================================================
   UTILS
   ========================================================================== */
.bg-cream { background: var(--cream-100); }
.bg-cream-200 { background: var(--cream-200); }
.bg-night { background: var(--night-700); color: var(--cream-100); }
.bg-night h1, .bg-night h2, .bg-night h3, .bg-night h4 { color: var(--cream-100); }
.bg-night .lede { color: rgba(251, 247, 238, 0.85); }
.bg-night .lede em { color: var(--sun-300); }
.bg-green { background: var(--green-500); color: var(--cream-100); }
.bg-green h1, .bg-green h2, .bg-green h3 { color: var(--cream-100); }

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0 !important; }
.mt-12 { margin-top: 12px; }
.mt-24 { margin-top: 24px; }
.mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0 !important; }

/* Visually hidden for screen readers */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
