/* ==========================================================================
   ONAT - COUCHE "PRO" (charge en DERNIER, apres onat-premium.css)

   Inspiree des maquettes de reference (sites corporate epures) :
     - titres en casse de phrase, police de titrage dediee, sans soulignement
     - sur-titre discret : filet + lettres espacees (plus de pastille)
     - bandeau-titre des pages internes clair, image dans une forme organique

   Ne touche pas au hero slider, aux cartes d'actualites ni aux partenaires.
   Pour revenir en arriere : retirer le <link> de ce fichier dans base.html.
   ========================================================================== */

:root {
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --ink: #0F2238;
  --ink-soft: #4A5A6F;
  --line-soft: rgba(15, 34, 56, 0.08);
  --ph-bg: #F4F8FB;
}

/* ==========================================================================
   1. TITRES DE SECTION (toutes les pages)
   ========================================================================== */
.section-title,
.kf-title,
.cta-title,
.word-title,
.page-block-title,
.team-group-title,
.ph-title,
.welcome-title,
.mission-feature-title,
.issue-title,
.doc-card-title,
.eco-title,
.pillar-title {
  font-family: var(--font-display);
}
.section-title {
  display: block;
  text-transform: none !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.15 !important;
  font-size: clamp(1.75rem, 1.25rem + 1.7vw, 2.6rem) !important;
  color: var(--ink);
}
.section-title::after {
  display: none !important;
}
.section-title.is-light,
.section-title.is-light * {
  color: #fff;
}
.section-head {
  max-width: 44rem;
}
.section-head .section-title {
  margin-top: 0.85rem !important;
}
.section-lead {
  margin-top: 1rem;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.section-lead.is-light {
  color: rgba(255, 255, 255, 0.78);
}

/* Sur-titre : filet + lettres espacees (remplace la pastille) */
.section-subtitle {
  display: flex !important;
  width: fit-content;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  color: var(--color-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase;
}
.section-subtitle::before,
.section-head .section-subtitle::before {
  content: '' !important;
  display: block !important;
  width: 28px !important;
  height: 2px !important;
  border-radius: 2px;
  background: currentColor !important;
  opacity: 1 !important;
}
.section-subtitle::after {
  display: none !important;
}
/* En-tete centre : filet de part et d'autre */
.section-head:not(.is-left):not(.text-left) .section-subtitle,
.text-center > .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}
.section-head:not(.is-left):not(.text-left) .section-subtitle::after,
.text-center > .section-subtitle::after {
  content: '' !important;
  display: block !important;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.section-subtitle.is-light {
  color: var(--color-secondary) !important;
}

/* Titres secondaires */
.kf-title,
.cta-title,
.word-title {
  letter-spacing: -0.025em;
}
.cta-title::after {
  display: none;
}
.welcome-title,
.mission-feature-title,
.issue-title,
.doc-card-title,
.eco-title {
  letter-spacing: -0.01em;
}
.team-group-title {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

/* ==========================================================================
   2. BANDEAU-TITRE DES PAGES INTERNES
   ========================================================================== */
.ph {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(var(--color-primary-rgb), 0.10) 0%, transparent 60%),
    radial-gradient(40% 60% at 0% 100%, rgba(var(--color-secondary-rgb), 0.10) 0%, transparent 60%),
    var(--ph-bg);
  border-bottom: 1px solid var(--line-soft);
}
.ph-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding: 2.75rem 0 3rem;
}
@media (min-width: 1024px) {
  .ph-grid { padding: 3.5rem 0 4rem; min-height: 320px; }
  .ph.has-media .ph-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 4rem; }
}
.ph-text {
  max-width: 46rem;
}

/* Fil d'Ariane */
.ph-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.ph-crumbs a {
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.ph-crumbs a:hover {
  color: var(--color-primary);
}
.ph-crumbs .fa-house {
  font-size: 0.8rem;
}
.ph-crumbs-sep {
  font-size: 0.55rem;
  opacity: 0.5;
}
.ph-crumbs .is-current {
  color: var(--ink);
  font-weight: 600;
}

/* Sur-titre, titre, accroche */
.ph-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.ph-kicker::before {
  content: '';
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.ph-title {
  margin: 0;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}
.ph-desc {
  margin-top: 1.1rem;
  max-width: 38rem;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.12rem);
  line-height: 1.7;
  color: var(--ink-soft);
}
.ph-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.ph-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--r-pill, 999px);
  background: #fff;
  border: 1px solid var(--line-soft);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}
.ph-meta i {
  color: var(--color-primary);
  font-size: 0.75rem;
}
.ph-extra {
  margin-top: 1.25rem;
}
.ph-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Image dans une forme organique */
.ph-media {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 460px);
}
.ph-media img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 58% 42% 46% 54% / 52% 48% 52% 48%;
  border: 8px solid #fff;
  box-shadow: 0 30px 60px -20px rgba(15, 34, 56, 0.35);
}
.ph-media-ring {
  position: absolute;
  z-index: 1;
  inset: -14px -18px -18px -10px;
  border-radius: 46% 54% 58% 42% / 48% 52% 48% 52%;
  border: 2px dashed rgba(var(--color-primary-rgb), 0.35);
  animation: phSpin 40s linear infinite;
}
@keyframes phSpin {
  to { transform: rotate(360deg); }
}
@media (max-width: 1023px) {
  .ph-media { width: min(100%, 360px); justify-self: start; }
}

/* Decor geometrique (sans image) */
.ph-deco {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.ph-deco-ring {
  width: 380px;
  height: 380px;
  right: -90px;
  top: -140px;
  border-radius: 50%;
  border: 1px solid rgba(var(--color-primary-rgb), 0.18);
  box-shadow: inset 0 0 0 46px rgba(var(--color-primary-rgb), 0.04);
}
.ph-deco-dots {
  width: 180px;
  height: 120px;
  right: 12%;
  bottom: 28px;
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.28) 1.5px, transparent 1.6px) 0 0 / 18px 18px;
}
.ph-deco-square {
  width: 18px;
  height: 18px;
  right: 30%;
  top: 38px;
  border: 3px solid var(--color-secondary);
  border-radius: 4px;
  transform: rotate(18deg);
}
.ph.has-media .ph-deco-dots {
  right: auto;
  left: 52%;
  bottom: 24px;
}
@media (max-width: 767px) {
  .ph-deco-dots,
  .ph-deco-square { display: none; }
  .ph-deco-ring { width: 240px; height: 240px; right: -120px; top: -120px; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-media-ring { animation: none; }
}

/* Logo (partenaires) : jamais recadre, pose sur une carte blanche */
.ph-media.is-logo {
  width: min(100%, 340px);
}
.ph-logo-card {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 18%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 30px 60px -24px rgba(15, 34, 56, 0.3);
}
.ph-logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.ph-media.is-logo .ph-media-ring {
  border-radius: 50%;
  inset: -16px;
}
.ph-logo-card img {
  width: auto !important;
  height: auto !important;
  aspect-ratio: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: contain !important;
}

/* Contact : titre du formulaire a l'echelle de sa colonne */
.detail-columns.is-contact .section-title.text-xl {
  font-size: clamp(1.4rem, 1.15rem + 0.8vw, 1.85rem) !important;
}

/* Mobile : image du bandeau plus discrete */
@media (max-width: 767px) {
  .ph-grid { gap: 1.75rem; padding: 2rem 0 2.25rem; }
  .ph-media { width: min(72%, 260px); }
  .ph-media.is-logo { width: min(60%, 200px); }
  .ph-crumbs .is-current {
    display: inline-block;
    max-width: 13rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: bottom;
  }
}

/* Sur-titre centre dans la colonne bleue du "mot de la coordination" */
.word-aside .section-subtitle {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.word-aside .section-subtitle::after {
  content: '' !important;
  display: block !important;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
