/* PCS Conseils — « Rapport annuel » : papier, encre marine, filets fins, chapitres
   numérotés et graphiques de données. Bootstrap natif, aucune classe personnalisée. */

:root {
  --r-ink: #0b1b2b;
  --r-ink-2: #13283d;
  --r-paper: #f6f4ef;
  --r-paper-2: #ece8df;
  --r-blue: #1d4e89;
  --r-blue-soft: #7fa3c8;
  --r-signal: #e0482d;
  --r-rule: #d8d2c4;
  --r-steel: #5b6775;
  --r-serif: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --r-sans: 'Mona Sans', 'Helvetica Neue', Arial, sans-serif;
  --r-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --bs-body-font-family: var(--r-sans);
  --bs-body-color: var(--r-ink);
  --bs-body-bg: var(--r-paper);
  --bs-emphasis-color: var(--r-ink);
  --bs-secondary-color: var(--r-steel);
  --bs-border-color: var(--r-rule);
  --bs-primary: var(--r-blue);
  --bs-primary-rgb: 29, 78, 137;
  --bs-link-color: var(--r-blue);
  --bs-link-color-rgb: 29, 78, 137;
  --bs-link-hover-color: var(--r-signal);
  --bs-link-hover-color-rgb: 224, 72, 45;
  --bs-focus-ring-color: rgba(224, 72, 45, 0.35);
}

html { scroll-padding-top: 8rem; scroll-behavior: smooth; }

body {
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, .h2, .h4, .h5, .display-4, .display-5 {
  font-family: var(--r-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

h2, .h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem); }

::selection { background: var(--r-signal); color: #fff; }

a, button, [role='tab'] { cursor: pointer; transition: color 0.2s var(--r-ease), background-color 0.25s var(--r-ease), border-color 0.25s var(--r-ease); }
:focus-visible { outline: 2px solid var(--r-signal); outline-offset: 3px; }

.btn { --bs-btn-font-weight: 600; letter-spacing: 0.02em; padding-inline: 1.4rem; }
.btn-primary {
  --bs-btn-bg: var(--r-blue);
  --bs-btn-border-color: var(--r-blue);
  --bs-btn-hover-bg: var(--r-ink);
  --bs-btn-hover-border-color: var(--r-ink);
  --bs-btn-active-bg: var(--r-ink);
}
.btn-light {
  --bs-btn-bg: var(--r-paper);
  --bs-btn-border-color: var(--r-paper);
  --bs-btn-color: var(--r-ink);
  --bs-btn-hover-bg: var(--r-signal);
  --bs-btn-hover-border-color: var(--r-signal);
  --bs-btn-hover-color: #fff;
  box-shadow: 6px 6px 0 rgba(11, 27, 43, 0.35);
}
.btn-light:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(11, 27, 43, 0.45); }
.btn-light:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(11, 27, 43, 0.45); }

/* ---------- En-tête : barre utilitaire + navbar classique ---------- */
#entete { background: rgba(246, 244, 239, 0.94); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--r-rule); }
#utilitaire { background: var(--r-ink); color: rgba(246, 244, 239, 0.78); border-color: var(--r-ink) !important; letter-spacing: 0.04em; position: relative; }
#utilitaire::before { content: ''; position: absolute; inset: 0 auto 0 0; width: min(28vw, 18rem); background: linear-gradient(90deg, var(--r-signal) 0 18%, var(--r-blue) 18% 52%, var(--r-blue-soft) 52% 70%, transparent 70%); height: 3px; top: auto; }
#utilitaire a { color: var(--r-paper); text-decoration: none; border-bottom: 1px solid rgba(246, 244, 239, 0.35); }
#utilitaire a:hover { color: #fff; border-color: var(--r-signal); }

#entete .navbar-brand img { height: 46px; width: auto; }
#entete .nav-link {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--r-ink);
  position: relative;
  padding-inline: 0.85rem !important;
}
#entete .nav-link::after {
  content: '';
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--r-signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--r-ease);
}
#entete .nav-link:hover::after, #entete .nav-link:focus-visible::after { transform: scaleX(1); }
#entete .nav-item:first-child .nav-link { color: var(--r-blue); }
#entete .navbar-toggler { border-color: var(--r-ink); }

/* ---------- Chapitres numérotés (compteur CSS sur les sections) ---------- */
main { counter-reset: chap; }
main > section { padding-block: clamp(4rem, 3rem + 4vw, 7.5rem); position: relative; }
main > section:not(#rapport) { counter-increment: chap; }
main > section:not(#rapport) > .container { position: relative; padding-top: 3.25rem; }
main > section:not(#rapport) > .container::before {
  content: counter(chap, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: calc(var(--bs-gutter-x) * 0.5);
  right: calc(var(--bs-gutter-x) * 0.5);
  border-top: 1px solid currentColor;
  padding-top: 0.6rem;
  font: 700 0.78rem/1 var(--r-sans);
  letter-spacing: 0.2em;
  color: var(--r-signal);
  opacity: 0.95;
}
main > section:not(#rapport) > .container::after {
  content: '';
  position: absolute;
  top: -3px;
  left: calc(var(--bs-gutter-x) * 0.5);
  width: 3.5rem;
  height: 5px;
  background: var(--r-signal);
}

/* ---------- Hero split ---------- */
#rapport { padding-block: clamp(3rem, 2rem + 4vw, 6rem) clamp(5rem, 4rem + 5vw, 9rem); background:
  linear-gradient(var(--r-rule) 1px, transparent 1px) 0 0 / 100% 3.5rem,
  var(--r-paper); }
#rapport::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--r-paper) 0%, rgba(246, 244, 239, 0.55) 40%, var(--r-paper) 100%); pointer-events: none; }
#rapport > .container { position: relative; }
#rapport h1 { font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.9rem); font-weight: 600; line-height: 1.04; text-wrap: balance; }
#rapport h1::first-line { color: var(--r-blue); }

#histogramme { height: 4.5rem; max-width: 22rem; border-bottom: 2px solid var(--r-ink); padding-inline: 2px; }
#histogramme span { flex: 1; background: var(--r-blue-soft); transform-origin: bottom; animation: r-bar 1.4s var(--r-ease) both; }
#histogramme span:nth-child(1) { height: 28%; animation-delay: 0.1s; }
#histogramme span:nth-child(2) { height: 42%; animation-delay: 0.18s; }
#histogramme span:nth-child(3) { height: 36%; animation-delay: 0.26s; }
#histogramme span:nth-child(4) { height: 58%; animation-delay: 0.34s; background: var(--r-blue); }
#histogramme span:nth-child(5) { height: 66%; animation-delay: 0.42s; background: var(--r-blue); }
#histogramme span:nth-child(6) { height: 82%; animation-delay: 0.5s; background: var(--r-blue); }
#histogramme span:nth-child(7) { height: 100%; animation-delay: 0.58s; background: var(--r-signal); }
@keyframes r-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }

#rapport figure { aspect-ratio: 4 / 5; max-height: 36rem; width: 100%; clip-path: polygon(0 0, 100% 0, 100% 100%, 14% 100%, 0 86%); }
#rapport figure img { filter: saturate(0.85) contrast(1.05); transform: scale(1.04); transition: transform 1.2s var(--r-ease); }
#rapport figure:hover img { transform: scale(1.08); }
#indicateur {
  position: absolute;
  left: -18%;
  bottom: -3rem;
  width: min(25rem, 88%);
  background: var(--r-ink) !important;
  color: var(--r-paper);
  box-shadow: 0 30px 60px -30px rgba(11, 27, 43, 0.55), 10px 10px 0 var(--r-signal);
}
#indicateur p:first-child b { color: var(--r-signal); letter-spacing: 0.18em; }
#indicateur .display-4 { font-family: var(--r-serif); color: #fff; }
#indicateur svg { color: var(--r-paper); }
#indicateur p:last-child b { font-weight: 500; font-size: 1rem; line-height: 1.35; }

/* ---------- Lettre de présentation ---------- */
#profil { background: #fff; border-block: 1px solid var(--r-rule); }
#profil .h4 b { font-weight: 600; }
#profil .h4 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.15; }
#profil img { max-width: 12rem; height: auto; opacity: 0.9; }
#profil .lead { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.28rem); line-height: 1.75; color: #243445; }
#profil .lead > span:first-child::first-letter {
  float: left;
  font: 600 4.6em/0.8 var(--r-serif);
  color: var(--r-blue);
  padding: 0.08em 0.12em 0 0;
}
#profil .lead > .fst-italic {
  font-family: var(--r-serif);
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem);
  color: var(--r-ink);
  border-left: 4px solid var(--r-signal);
  padding-left: 1.25rem;
  line-height: 1.15;
}

/* ---------- Offres : onglets verticaux sur fond encre ---------- */
#offres { background: var(--r-ink); color: var(--r-paper); }
#offres > .container::before { color: var(--r-signal); border-color: rgba(246, 244, 239, 0.4); }
#offres .nav-pills { --bs-nav-pills-link-active-bg: var(--r-paper); --bs-nav-pills-link-active-color: var(--r-ink); counter-reset: offre; }
#offres .nav-link {
  counter-increment: offre;
  color: rgba(246, 244, 239, 0.78);
  border: 1px solid rgba(246, 244, 239, 0.18);
  padding: 1.35rem 1.5rem 1.35rem 4.6rem;
  font-family: var(--r-serif);
  font-size: clamp(1.12rem, 1rem + 0.4vw, 1.35rem);
  line-height: 1.3;
  position: relative;
  flex: 1;
}
#offres .nav-link::before {
  content: counter(offre, decimal-leading-zero);
  position: absolute;
  left: 1.5rem;
  top: 1.45rem;
  font: 700 0.8rem/1 var(--r-sans);
  letter-spacing: 0.15em;
  color: var(--r-signal);
}
#offres .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 3px;
  width: 100%;
  background: var(--r-signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--r-ease);
}
#offres .nav-link:hover { color: #fff; border-color: rgba(246, 244, 239, 0.45); }
#offres .nav-link.active { color: var(--r-ink); background: var(--r-paper); border-color: var(--r-paper); }
#offres .nav-link.active::after { transform: scaleX(1); }
#offres .tab-content figure { min-height: 22rem; background: var(--r-ink-2); }
#offres .tab-content img { position: absolute; inset: 0; filter: grayscale(0.25) contrast(1.05); }
#offres .tab-pane.active img { animation: r-zoom 6s var(--r-ease) both; }
@keyframes r-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
#offres figcaption {
  background: var(--r-paper);
  color: var(--r-ink);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  box-shadow: 6px 6px 0 var(--r-signal);
}

/* ---------- Texte principal en colonnes filetées ---------- */
#contexte p {
  columns: 2 22rem;
  column-gap: clamp(2rem, 4vw, 4.5rem);
  column-rule: 1px solid var(--r-rule);
  font-size: 1.06rem;
  line-height: 1.8;
  color: #253546;
  hyphens: auto;
}
#contexte b { color: var(--r-blue); font-weight: 650; background: linear-gradient(transparent 62%, rgba(127, 163, 200, 0.32) 62%); }

/* ---------- Partenaire : tuiles indexées avec jauge ---------- */
#partenaire { background: var(--r-paper-2); }
#partenaire p.small { color: var(--r-signal); font-weight: 700; letter-spacing: 0.14em; }
#partenaire h2 { text-wrap: balance; }
#partenaire ul { counter-reset: tuile; }
#partenaire li { counter-increment: tuile; }
#partenaire .card {
  background: #fff;
  border: 1px solid var(--r-rule);
  border-top: 3px solid var(--r-ink);
  gap: 0.6rem;
  transition: transform 0.35s var(--r-ease), box-shadow 0.35s var(--r-ease), border-color 0.35s var(--r-ease);
}
#partenaire .card::before {
  content: counter(tuile, decimal-leading-zero);
  font: 500 3.4rem/1 var(--r-serif);
  color: var(--r-blue-soft);
  margin-bottom: 0.5rem;
}
#partenaire .card::after {
  content: '';
  margin-top: auto;
  height: 6px;
  background: linear-gradient(90deg, var(--r-blue) 0 var(--w, 60%), var(--r-paper-2) var(--w, 60%));
}
#partenaire li:nth-child(1) .card { --w: 100%; }
#partenaire li:nth-child(2) .card { --w: 78%; }
#partenaire li:nth-child(3) .card { --w: 64%; }
#partenaire li:nth-child(4) .card { --w: 88%; }
#partenaire .card b { font-family: var(--r-serif); font-size: 1.35rem; line-height: 1.2; font-weight: 600; }
#partenaire .card span { color: var(--r-steel); line-height: 1.55; padding-bottom: 1rem; }
#partenaire .card:hover { transform: translateY(-6px); border-top-color: var(--r-signal); box-shadow: 0 24px 40px -28px rgba(11, 27, 43, 0.5); }
#partenaire .card:hover::before { color: var(--r-signal); }

/* ---------- Méthode : timeline verticale ---------- */
#methode .sticky-lg-top { top: 9rem; }
#methode h2 + p { color: #2a3a4b; line-height: 1.75; }
#etapes { counter-reset: etape; position: relative; padding-left: 4.5rem; }
#etapes::before { content: ''; position: absolute; left: 1.45rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: repeating-linear-gradient(180deg, var(--r-ink) 0 6px, transparent 6px 12px); }
#etapes li { counter-increment: etape; padding-bottom: 3rem; }
#etapes li:last-child { padding-bottom: 0; }
#etapes li::before {
  content: counter(etape);
  position: absolute;
  left: -4.5rem;
  top: -0.2rem;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  background: var(--r-paper);
  border: 2px solid var(--r-ink);
  border-radius: 50%;
  font: 600 1.35rem/1 var(--r-serif);
  transition: background-color 0.3s var(--r-ease), color 0.3s var(--r-ease), border-color 0.3s var(--r-ease);
}
#etapes li:hover::before { background: var(--r-signal); border-color: var(--r-signal); color: #fff; }
#etapes li:last-child::before { background: var(--r-ink); color: var(--r-paper); }
#etapes p { font-family: var(--r-serif); font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.7rem); line-height: 1.3; border-bottom: 1px solid var(--r-rule); padding-bottom: 1.4rem; }

/* ---------- Bande d'appel ---------- */
#joindre { background: var(--r-blue); color: #fff; overflow: hidden; }
#joindre::before {
  content: '';
  position: absolute;
  right: -2rem;
  bottom: 0;
  width: min(48rem, 70%);
  height: 70%;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2.2rem, transparent 2.2rem 3rem);
  -webkit-mask: linear-gradient(to top, #000, transparent);
  mask: linear-gradient(to top, #000, transparent);
  pointer-events: none;
}
#joindre > .container::before { color: #fff !important; border-color: rgba(255, 255, 255, 0.45); }
#joindre > .container::after { background: #fff; }
#joindre .h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); }
#joindre blockquote p {
  font-family: var(--r-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.9rem);
  line-height: 1.35;
  border-left: 1px solid rgba(255, 255, 255, 0.45);
  padding-left: clamp(1.25rem, 3vw, 2.5rem);
}

/* ---------- Témoignages ---------- */
#clients .card { background: #fff; border: 1px solid var(--r-rule); transition: transform 0.35s var(--r-ease), box-shadow 0.35s var(--r-ease); }
#clients .card:hover { transform: translateY(-5px); box-shadow: 0 26px 46px -30px rgba(11, 27, 43, 0.55); }
#clients img { width: 80px; height: 80px; border: 1px solid var(--r-rule); padding: 4px; background: #fff; }
#clients h3 { font-size: 1.3rem; }
#clients blockquote { position: relative; color: #2a3a4b; line-height: 1.65; }
#clients blockquote::before { content: '“'; display: block; font: 600 3.5rem/0.6 var(--r-serif); color: var(--r-signal); margin-bottom: 0.5rem; }
#clients em { font-style: normal; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--r-blue); border-top: 1px solid var(--r-rule); padding-top: 0.75rem; }

/* ---------- Paragraphe SEO d'origine ---------- */
#recherches { background: var(--r-paper-2); border-top: 1px solid var(--r-rule); color: var(--r-steel); }
#recherches p { line-height: 1.7; }

/* ---------- Pied de page sombre ---------- */
#pied { background: var(--r-ink); color: rgba(246, 244, 239, 0.75); position: relative; }
#pied::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--r-signal) 0 12%, var(--r-blue) 12% 47%, var(--r-blue-soft) 47% 66%, var(--r-paper) 66% 100%); }
#pied img { height: 46px; width: auto; display: block; }
#pied ul { border-top: 1px solid rgba(246, 244, 239, 0.2); padding-top: 0.75rem; }
#pied a:not(.bg-white) { color: var(--r-paper); text-decoration: none; }
#pied a:not(.bg-white):hover { color: var(--r-signal); }
#pied li { font-size: 0.95rem; }
#pied li::before { content: '—'; color: var(--r-signal); margin-right: 0.6rem; }
#pied .bg-white { transition: transform 0.3s var(--r-ease); }
#pied .bg-white:hover { transform: translateY(-3px); }

/* ---------- Cookies ---------- */
#cookies { z-index: 1080; background: var(--r-ink); color: var(--r-paper); border-top: 3px solid var(--r-signal); font-size: 0.92rem; }
#cookies .btn-link { color: var(--r-paper); }
#cookies-retour { z-index: 1070; background: var(--r-ink); color: var(--r-paper); border-radius: 0; font-size: 0.78rem; }
#cookies-retour:hover { background: var(--r-signal); color: #fff; }
.modal { z-index: 1090; }
.modal-backdrop { z-index: 1085; }

/* ---------- 404 ---------- */
#introuvable .display-1 { font-family: var(--r-serif); color: var(--r-blue); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  #rapport figure { aspect-ratio: 4 / 3; }
  #indicateur { position: relative; left: auto; bottom: auto; width: auto; margin: -3.5rem 1rem 0; }
  #offres .tab-content figure { min-height: 18rem; }
  #methode .sticky-lg-top { position: static; }
}
@media (max-width: 575.98px) {
  #entete .navbar-brand img { height: 38px; }
  #utilitaire .container { justify-content: center !important; }
  #indicateur { margin-inline: 0.25rem; padding: 1.5rem !important; }
  #indicateur svg { width: 84px; height: 84px; }
  #offres .nav-link { padding-left: 3.75rem; }
  #offres .nav-link::before { left: 1.1rem; }
  #etapes { padding-left: 3.75rem; }
  #etapes::before { left: 1.2rem; }
  #etapes li::before { left: -3.75rem; width: 2.5rem; height: 2.5rem; font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
