/* ═══════════════════════════════════════════════════════════════════════════
   REFONTE VISUELLE DE L'ACCUEIL — 21/10/2026
   Couche posée par-dessus style.css + index-page.css, chargée uniquement par index.php
   ($extra_css) avec assets/js/home-refonte.js. Pour revenir à l'ancien rendu : retirer ces
   deux fichiers de index.php. Aucune section n'est retirée : seuls le style et le mouvement changent.

   Direction : « le Sénégal sous tension » — titres Archivo élargi, fond sable au lieu du gris froid,
   orange réservé à l'énergie (un accent par écran), grain léger sur les sections sombres,
   en-têtes éditoriaux qui alternent, et un fil électrique qui se charge pendant le défilement.
═══════════════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@100..125,600..900&display=swap');

:root {
  --hr-display: 'Archivo', 'Poppins', sans-serif;
  --hr-ink: #0b1a2e;
  --hr-navy: #0c2546;
  --hr-orange: #f7941d;
  --hr-orange-text: #b35a00;
  --hr-sand: #f4efe7;
  --hr-sand-deep: #e9e0d2;
  --hr-line: rgba(11, 26, 46, .12);
  --hr-muted: #5a6372;
  --hr-ease: cubic-bezier(.22, 1, .36, 1);
  --hr-radius: 8px;
  --hr-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* fonds clairs : sable chaud au lieu du gris bleuté */
  --gris-clair: var(--hr-sand);
}

/* ─── Typographie ─────────────────────────────────────────────────────────── */
.home-hero .hero-title,
.section-title,
.story-steps h2,
.stats-val, .stat-value,
.pole-title, .projet-titre, .actu-home-card-title, .svp-titre {
  font-family: var(--hr-display);
  font-stretch: 112%;
}
.home-hero .hero-title { font-weight: 800; letter-spacing: -.035em; line-height: .98; max-width: 15ch; }
.section-title {
  font-weight: 800; letter-spacing: -.03em; line-height: 1.02;
  font-size: clamp(2.1rem, 4.2vw, 3.5rem); color: var(--hr-ink);
}
.section-title.light { color: #fff; }
.section-sub { color: var(--hr-muted); font-size: 1.06rem; max-width: 56ch; }

/* Étiquette de section : un trait orange et des capitales, plus de pastille */
.section-tag {
  background: none !important; border: 0 !important; padding: 0 !important; border-radius: 0 !important;
  color: var(--hr-orange-text) !important; font-size: .74rem; letter-spacing: .22em; font-weight: 700;
  display: inline-flex !important; align-items: center; gap: 12px;
}
.section-tag::before {
  content: ''; width: 32px; height: 2px; background: var(--hr-orange); flex-shrink: 0;
  transform-origin: left; transform: scaleX(0); transition: transform .9s var(--hr-ease) .1s;
}
.section-tag.visible::before { transform: scaleX(1); }
.section-tag.orange, .stats-section .section-tag, .cta-grid .section-tag,
section[style*="#0b1d3a"] .section-tag { color: var(--hr-orange) !important; }
.section-tag svg { display: none; }

/* Titres qui se dévoilent de bas en haut (le reste du site garde son fondu) */
.section-title.animate-fade-up, .story-steps h2.animate-fade-up {
  opacity: 1; transform: none;
  clip-path: inset(0 0 100% 0); translate: 0 .35em;
  transition: clip-path 1s var(--hr-ease), translate 1s var(--hr-ease);
}
.section-title.animate-fade-up.visible, .story-steps h2.animate-fade-up.visible { clip-path: inset(-.2em -.2em -.3em -.2em); translate: 0 0; }

/* ─── En-têtes de section éditoriaux (titre à gauche, texte à droite) ─────── */
@media (min-width: 900px) {
  .section:has(.poles-grid) > .container > .text-center:first-child,
  .section:has(.valeurs-grid) > .container > .text-center:first-child,
  .section:has(.projets-grid) > .container > .text-center:first-child {
    display: grid; grid-template-columns: 1.15fr .85fr; column-gap: 72px; align-items: end;
    text-align: left; margin-bottom: 56px;
  }
  .section:has(.poles-grid) > .container > .text-center:first-child > .section-tag,
  .section:has(.valeurs-grid) > .container > .text-center:first-child > .section-tag,
  .section:has(.projets-grid) > .container > .text-center:first-child > .section-tag { grid-column: 1; justify-self: start; }
  .section:has(.poles-grid) > .container > .text-center:first-child > .section-title,
  .section:has(.valeurs-grid) > .container > .text-center:first-child > .section-title,
  .section:has(.projets-grid) > .container > .text-center:first-child > .section-title { grid-column: 1; margin: 0; }
  .section:has(.poles-grid) > .container > .text-center:first-child > .section-sub,
  .section:has(.valeurs-grid) > .container > .text-center:first-child > .section-sub,
  .section:has(.projets-grid) > .container > .text-center:first-child > .section-sub {
    grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0; max-width: none;
    padding-left: 24px; border-left: 1px solid var(--hr-line);
  }
}
@media (max-width: 899px) {
  .section > .container > .text-center:first-child { text-align: left; }
  .section > .container > .text-center:first-child .section-sub { margin-left: 0; }
}
.section { padding: clamp(52px, 5.5vw, 80px) 0; }
.section.section-sm { padding: 48px 0; }

/* ─── Boutons : angles nets, plus d'allure « chantier » que de pastille ────── */
section .btn { border-radius: 6px; letter-spacing: .01em; transition: transform .25s var(--hr-ease), box-shadow .25s, background-color .2s, color .2s, border-color .2s; }
section .btn-primary { box-shadow: 0 10px 24px -12px rgba(247, 148, 29, .9); }
section .btn:hover { transform: translateY(-2px); }
section .btn:active { transform: translateY(0) scale(.98); }
section .btn-outline-white { border-radius: 6px; background: rgba(255, 255, 255, .08); }

/* ─── Vidéo d'accueil ─────────────────────────────────────────────────────── */
.home-hero-media { animation: hr-recul 9s var(--hr-ease) both; }
@keyframes hr-recul { from { transform: scale(1.09); } to { transform: scale(1); } }
.home-hero .hero-title .hr-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.home-hero .hero-title .hr-w > span { display: inline-block; transform: translateY(105%); animation: hr-mot .9s var(--hr-ease) forwards; animation-delay: calc(var(--i) * 55ms + 150ms); }
@keyframes hr-mot { to { transform: none; } }
/* style.css colore tous les <span> du titre en orange : les mots découpés gardent la couleur de leur parent */
.home-hero .hero-title .hr-w, .home-hero .hero-title .hr-w > span { color: inherit; }
.home-hero-kicker, .home-hero .hero-subtitle, .home-hero .hero-actions { animation: hr-monte .9s var(--hr-ease) both; }
.home-hero-kicker { animation-delay: .05s; }
.home-hero .hero-subtitle { animation-delay: .55s; }
.home-hero .hero-actions { animation-delay: .7s; }
@keyframes hr-monte { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Bandeau agréments + chiffres sous la vidéo : une ligne de texte au lieu de 12 pastilles */
.hero-content-only { background-image: var(--hr-grain); }
.hero-agrements { gap: 0; row-gap: 6px; margin-bottom: 26px; }
.agrement-label { color: rgba(255, 255, 255, .55); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; margin-right: 14px; }
.agrement-badge {
  background: none; border: 0; padding: 0; border-radius: 0;
  color: rgba(255, 255, 255, .86); font-size: .8rem; letter-spacing: .08em; font-weight: 600;
}
.agrement-badge + .agrement-badge::before { content: '·'; color: var(--hr-orange); margin: 0 12px; font-weight: 800; }
.hero-stats { gap: 0; border-top: 1px solid rgba(255, 255, 255, .14); border-bottom: 1px solid rgba(255, 255, 255, .14); }
.hero-stats .stat-card {
  background: none; backdrop-filter: none; border: 0; border-left: 1px solid rgba(255, 255, 255, .12);
  border-radius: 0 !important; padding: 22px 24px; text-align: left;
}
.hero-stats .stat-card:first-child { border-left: 0; }
.hero-stats .stat-value { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 900; letter-spacing: -.03em; }
.hero-stats .stat-label { color: rgba(255, 255, 255, .66); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }

/* ─── Sections sombres : encre profonde + grain ──────────────────────────── */
.story { background: var(--hr-grain), linear-gradient(180deg, #0c2546 0%, #0b1a2e 100%); }
.stats-section { background-image: var(--hr-grain), radial-gradient(120% 90% at 50% 0%, #123a6b 0%, #0b1a2e 70%) !important; }
section[style*="#0b1d3a"] { background-image: var(--hr-grain), radial-gradient(90% 70% at 50% 100%, #12305a 0%, #0b1a2e 75%) !important; }
.story-num { font-family: var(--hr-display); font-stretch: 112%; }

/* ─── Pôles : photo qui vit au survol ─────────────────────────────────────── */
.pole-card {
  border-radius: var(--hr-radius); border: 1px solid var(--hr-line);
  box-shadow: none; background: #fff; transition: transform .5s var(--hr-ease), box-shadow .5s var(--hr-ease);
}
.pole-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(11, 26, 46, .35); }
.pole-card::before { display: none !important; }
.pole-photo-wrap { position: relative; border-radius: var(--hr-radius) var(--hr-radius) 0 0; aspect-ratio: 16 / 10; }

/* (numéros 01-05 des pôles et leur dégradé retirés le 21/10/2026 à la demande de Mor) */
.pole-photo, .pole-photo-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pole-photo { transform: scale(1.12); transition: transform 1.4s var(--hr-ease); }
.pole-card.visible .pole-photo { transform: scale(1); }
.pole-card.visible:hover .pole-photo { transform: scale(1.06); }
.pole-photo-wrap video { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.pole-photo-wrap video.is-on { opacity: 1; }
.pole-title { font-weight: 800; letter-spacing: -.02em; }
.pole-icon { display: none; }
.pole-tags .tag { background: none; border: 1px solid var(--hr-line); color: var(--hr-muted); border-radius: 4px; }
.pole-link { font-weight: 700; color: var(--hr-ink); }
.pole-link span { display: inline-block; transition: transform .3s var(--hr-ease); }
.pole-card:hover .pole-link span { transform: translateX(6px); }

/* ─── Chiffres : grands nombres, photos sans cadre orange ─────────────────── */
.stats-val { font-weight: 900; font-size: clamp(3.2rem, 6vw, 5.4rem); letter-spacing: -.045em; }
.stats-lbl { letter-spacing: .16em; }
.stats-photo-side { box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7) !important; border-radius: var(--hr-radius) !important; position: relative; }
.stats-photo-side::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 26, 46, 0) 40%, rgba(11, 26, 46, .45)); pointer-events: none; }

/* ─── Équipes : photos aux coins nets ─────────────────────────────────────── */
.galerie-item { border-radius: var(--hr-radius) !important; }

/* ─── Pourquoi COTRAC : liste éditoriale, plus de cartes ─────────────────── */
.valeurs-grid { gap: 0 !important; border-top: 1px solid var(--hr-line); }
.valeur-card {
  text-align: left; background: none; border: 0; border-radius: 0; box-shadow: none;
  padding: 36px 28px 8px 0; position: relative;
}
.valeur-card + .valeur-card { padding-left: 28px; border-left: 1px solid var(--hr-line); }
.valeur-card::before {
  content: ''; position: absolute; top: -1px; left: 0; width: 64px; height: 2px; background: var(--hr-orange);
  transform-origin: left; transform: scaleX(0); transition: transform 1s var(--hr-ease) .2s;
}
.valeur-card + .valeur-card::before { left: 28px; }
.valeur-card.visible::before { transform: scaleX(1); }
/* (numéros 01-04 retirés le 21/10/2026 à la demande de Mor) */
.valeur-icon { margin: 0 0 18px !important; width: 44px; height: 44px; border-radius: 6px; background: var(--hr-sand); }
.valeur-card:hover { transform: none; box-shadow: none; }
.valeur-card:hover .valeur-icon { transform: none; }
@media (max-width: 899px) {
  .valeur-card, .valeur-card + .valeur-card { padding: 28px 0 8px; border-left: 0; border-top: 1px solid var(--hr-line); }
  .valeur-card + .valeur-card::before { left: 0; }
}

/* ─── COTRAC sur le terrain : grand écran de cinéma, sans fausse fenêtre Mac ─ */
.index-video-header { display: none !important; }
.index-video-wrap { max-width: 1080px; border-radius: var(--hr-radius); border: 0; box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .8); }
.index-video-play-btn { box-shadow: 0 0 0 10px rgba(247, 148, 29, .22), 0 0 0 22px rgba(247, 148, 29, .1); transition: transform .3s var(--hr-ease), box-shadow .3s; }
.index-video-overlay:hover .index-video-play-btn { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(247, 148, 29, .28), 0 0 0 30px rgba(247, 148, 29, .12); }
.index-video-points { gap: 28px; }

/* ─── Témoignages : citations sobres ──────────────────────────────────────── */
.temoignage-card { border-radius: var(--hr-radius); border: 1px solid var(--hr-line) !important; box-shadow: none; background: #fff; }
.temoignage-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(11, 26, 46, .35); }
.temoignage-quote { display: none; }
/* Aucun guillemet décoratif (21/10/2026, demande de Mor) : ni les miens, ni le grand guillemet pâle de style.css */
.temoignage-card::before { content: none !important; display: none !important; }
.temoignage-text { font-style: normal; color: var(--hr-ink); font-size: 1.02rem; line-height: 1.7; }
.temoignage-stars { color: var(--hr-orange); letter-spacing: .2em; font-size: .8rem; }

/* ─── Réalisations ────────────────────────────────────────────────────────── */
.projet-card, .seneau-video-card, .actu-home-card { border-radius: var(--hr-radius); border: 1px solid var(--hr-line); box-shadow: none; }
.projet-card { transition: transform .5s var(--hr-ease), box-shadow .5s var(--hr-ease); }
.projet-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(11, 26, 46, .35); }
.projet-img { height: auto; aspect-ratio: 4 / 3; }
.projet-img img { transition: transform 1.2s var(--hr-ease); }
.projet-card:hover .projet-img img { transform: scale(1.06); }
.projet-titre { font-weight: 800; letter-spacing: -.015em; }

/* ─── Ils nous font confiance : un mur de noms en capitales, bords en fondu ── */
.partenaires-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.partenaire-item {
  background: none; border: 0; border-radius: 0; padding: 14px 34px;
  font-family: var(--hr-display); font-stretch: 118%; font-weight: 800; font-size: 1.15rem;
  letter-spacing: .02em; text-transform: uppercase; color: rgba(11, 26, 46, .38); transition: color .3s;
}
.partenaire-item svg { display: none; }
.partenaire-item:hover { color: var(--hr-orange-text); background: none; transform: none; }

/* ─── Actualités : mise en page magazine (une grande, deux en liste) ─────── */
@media (min-width: 900px) {
  section:has(.actu-home-card) .container > div[style*="grid-template-columns"] {
    grid-template-columns: 1.25fr 1fr !important; grid-auto-rows: auto; gap: 24px !important;
  }
  section:has(.actu-home-card) .actu-home-card:first-child { grid-row: span 2; }
  section:has(.actu-home-card) .actu-home-card:not(:first-child) { flex-direction: row; }
  section:has(.actu-home-card) .actu-home-card:not(:first-child) .actu-home-card-img { flex: 0 0 42%; height: auto; min-height: 100%; }
  section:has(.actu-home-card) .actu-home-card:first-child .actu-home-card-img { height: 340px; }
  section:has(.actu-home-card) .actu-home-card:first-child .actu-home-card-title { font-size: 1.5rem; }
}
.actu-home-card-img img { transition: transform 1.2s var(--hr-ease); }
.actu-home-card:hover .actu-home-card-img img { transform: scale(1.05); }
.actu-home-card-title { font-weight: 800; letter-spacing: -.015em; }

/* ─── Carte et appel final ────────────────────────────────────────────────── */
.carto-section .section-tag { border: 0 !important; }
.carto-section { background: #fbf8f3 !important; }
.cta-grid .section-title { font-size: clamp(2.2rem, 4.6vw, 3.8rem); }
.cta-grid > div[style*="border-radius:20px"] { border-radius: var(--hr-radius) !important; }

/* ─── Le fil sous tension (assets/js/home-refonte.js) ─────────────────────── */
.hr-cable { position: fixed; top: 96px; bottom: 28px; left: max(14px, calc((100vw - 1200px) / 2 - 44px)); width: 2px; z-index: 50; pointer-events: none; }
.hr-cable-base { position: absolute; inset: 0; background: rgba(247, 148, 29, .16); border-radius: 2px; }
.hr-cable-fill {
  position: absolute; left: 0; right: 0; top: 0; height: 100%; transform-origin: top; transform: scaleY(var(--p, 0));
  background: linear-gradient(180deg, rgba(247, 148, 29, .3) 0%, #f7941d 85%, #ffd27a 100%); border-radius: 2px;
}
.hr-cable-node {
  position: absolute; left: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: #fff; border: 2px solid rgba(247, 148, 29, .45); transition: background-color .4s, border-color .4s, box-shadow .4s;
}
.hr-cable-node.is-on { background: #f7941d; border-color: #ffd27a; box-shadow: 0 0 10px 2px rgba(247, 148, 29, .55); }
.hr-cable-spark {
  position: absolute; left: 50%; top: calc(var(--p, 0) * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: #fff6df; box-shadow: 0 0 0 3px rgba(247, 148, 29, .55), 0 0 18px 6px rgba(255, 186, 73, .75);
  opacity: .9; transition: opacity .3s;
}
.hr-cable.is-moving .hr-cable-spark { animation: hr-crepite .18s steps(2) infinite; }
@keyframes hr-crepite { 50% { box-shadow: 0 0 0 4px rgba(247, 148, 29, .7), 0 0 26px 10px rgba(255, 210, 122, .9); } }
/* arrivée en bas : l'appel à l'action « passe sous tension » une fois */
.hr-powered .btn-primary { animation: hr-tension 1.4s var(--hr-ease) 1; }
@keyframes hr-tension { 0% { box-shadow: 0 0 0 0 rgba(247, 148, 29, .8); } 100% { box-shadow: 0 0 0 22px rgba(247, 148, 29, 0); } }
@media (max-width: 1099px) { .hr-cable { display: none; } }

/* ─── Mouvement réduit : rien ne bouge, tout est visible ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  .home-hero-media, .home-hero-kicker, .home-hero .hero-subtitle, .home-hero .hero-actions { animation: none; }
  .home-hero .hero-title .hr-w > span { animation: none; transform: none; }
  .section-title.animate-fade-up, .story-steps h2.animate-fade-up { clip-path: none; translate: none; transition: none; }
  .pole-photo { transform: none; transition: none; }
  .hr-cable { display: none; }
}

/* ─── Agréments : les vrais logos dans des pastilles blanches (21/10/2026) ──
   Toujours sur une seule ligne : sur ordinateur les pastilles rétrécissent ensemble si la place manque,
   sous 1100 px la ligne défile au doigt (bords en fondu). */
.hero-agrements { align-items: center; }
.agrement-logos { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; width: 100%; margin: 6px 0 10px; }
.agrement-logo {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 1 auto; min-width: 0;
  height: 48px; padding: 0 12px; background: #fff; border-radius: 6px; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .55);
  transition: transform .3s var(--hr-ease), box-shadow .3s var(--hr-ease);
}
.agrement-logo picture { display: contents; }
.agrement-logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 30px; object-fit: contain; }
.agrement-logo--carre img { max-height: 40px; }
.agrement-logo:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -12px rgba(0, 0, 0, .6); }
.agrement-logos + .agrement-badge::before { content: none; }
@media (max-width: 1099px) {
  .agrement-logos {
    overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .agrement-logos::-webkit-scrollbar { display: none; }
  .agrement-logo { flex: 0 0 auto; scroll-snap-align: start; }
  .agrement-logo img { height: 30px; max-width: none; }
  .agrement-logo--carre img { height: 40px; }
}
@media (max-width: 760px) {
  .agrement-logo { height: 44px; }
  .agrement-logo img { height: 26px; max-height: 26px; }
  .agrement-logo--carre img { height: 36px; max-height: 36px; }
}

/* ─── Ils nous font confiance : les vrais logos qui défilent (21/10/2026) ───
   En gris discret, en couleur au survol ; le défilé s'arrête sous la souris. */
.partenaire-item.partenaire-logo { display: inline-flex; align-items: center; justify-content: center; padding: 10px 34px; flex: 0 0 auto; }
.partenaire-logo picture { display: contents; }
.partenaire-logo img {
  display: block; height: 52px; max-height: none; width: auto; max-width: 220px; object-fit: contain;
  filter: grayscale(1) contrast(1.05); opacity: .8; transition: filter .35s ease, opacity .35s ease, transform .35s var(--hr-ease);
}
.partenaire-logo--carre img { height: 66px; }
.partenaire-logo:hover img { filter: none; opacity: 1; transform: scale(1.06); }
.partenaires-track:hover .partenaires-slider { animation-play-state: paused; }
@media (max-width: 760px) {
  .partenaire-item.partenaire-logo { padding: 8px 22px; }
  .partenaire-logo img { height: 40px; max-width: 160px; }
  .partenaire-logo--carre img { height: 52px; }
}
