/* ============================================================
   CPNTIC — Design 2026
   Chargé APRÈS style.css : surcharge le thème d'origine.
   Tout est préfixé .cp- pour ne rien casser ailleurs.
   ============================================================ */

:root {
  --navy:        #0E2A47;
  --navy-deep:   #0A1F36;
  --navy-panel:  #133659;
  --navy-line:   #23507E;
  --orange:      #F77F00;
  --amber:       #F7A440;
  --rust:        #B85500;
  --green:       #00A35C;
  --green-dark:  #00804A;
  --surface:     #F4F6F9;
  --border:      #E1E6ED;
  --border-soft: #E4E8EE;
  --ink:         #1B2533;
  --ink-soft:    #333F4E;
  --muted:       #4A5664;
  --muted-light: #586474;
  --on-navy:     #CBD6E3;
  --on-panel:    #B7C5D6;

  --wrap: 1240px;
  --gut: 24px;
}

/* Scope du nouveau design : appliqué au header, au footer et au contenu
   de l'accueil, jamais au <body>, pour ne pas repeindre les autres pages. */
.cp-page {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  background: #fff;
}

/* --- Remises à zéro ciblées (le thème force p/a/h*) --- */
/* :where() garde ces remises à zéro à specificité 0 : elles battent les
   règles d'éléments du thème, mais n'importe quelle classe .cp- les bat. */
:where(.cp-page) p { color: inherit; font-size: inherit; line-height: inherit; font-weight: 400; margin: 0; }
:where(.cp-page) a { color: inherit; font-weight: inherit; font-size: inherit; text-decoration: none; }
.cp-page a { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
:where(.cp-page) h1, :where(.cp-page) h2, :where(.cp-page) h3, :where(.cp-page) h4 {
  font-family: Sora, Inter, system-ui, sans-serif;
  color: inherit; margin: 0; line-height: 1.2; letter-spacing: -0.01em;
}
:where(.cp-page) ul, :where(.cp-page) ol { margin: 0; padding: 0; }
:where(.cp-page) li { list-style: none; }
:where(.cp-page) img { max-width: 100%; height: auto; }
:where(.cp-page) button { font: inherit; }

/* --- Accessibilité : le thème supprime l'outil de focus --- */
.cp-page a:focus-visible,
.cp-page button:focus-visible,
.cp-page input:focus-visible,
.cp-page [tabindex]:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
.cp-skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--orange); color: #1B1206; font-weight: 700;
  padding: 12px 20px; border-radius: 0 0 8px 0;
}
.cp-skip:focus { left: 0; }

.cp-wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }

/* --- Bandeau ivoirien réutilisable --- */
.cp-flag { display: flex; overflow: hidden; border-radius: 2px; }
.cp-flag span { flex: 1; }
.cp-flag span:nth-child(1) { background: var(--orange); }
.cp-flag span:nth-child(2) { background: #FFFFFF; }
.cp-flag span:nth-child(3) { background: var(--green); }

/* --- Boutons --- */
.cp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 13px 26px; border-radius: 8px;
  font-weight: 700; font-size: 15px; border: 1.5px solid transparent; cursor: pointer;
}
.cp-btn--primary { background: var(--orange); color: #1B1206; }
.cp-btn--primary:hover { background: #FF9524; color: #1B1206; }
.cp-btn--ghost { border-color: #FFFFFF; color: #FFFFFF; background: transparent; }
.cp-btn--ghost:hover { background: rgba(255,255,255,.12); color: #FFFFFF; }
.cp-btn--outline { border-color: var(--rust); color: var(--rust); background: transparent; }
.cp-btn--outline:hover { background: #FFF1E2; color: #8F4300; }

/* --- Eyebrow / titres de section --- */
.cp-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rust); }
.cp-eyebrow--light { color: var(--amber); }
.cp-h2 { font-size: clamp(26px, 3.4vw, 36px); color: var(--navy); margin: 10px 0 0; }
.cp-section { padding: 72px 0; }
.cp-section--surface { background: var(--surface); }
.cp-section--navy { background: var(--navy); color: #FFFFFF; }
.cp-section--navy .cp-h2 { color: #FFFFFF; }
.cp-sechead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 36px; }
.cp-seclink { font-weight: 600; color: var(--rust); }
.cp-seclink:hover { color: #8F4300; text-decoration: underline; }

/* ============================================================
   Barre supérieure
   ============================================================ */
.cp-topbar { background: var(--navy-deep); color: #D6DEE8; font-size: 13px; }
.cp-topbar .cp-wrap { display: flex; flex-wrap: wrap; gap: 6px 28px; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; }
.cp-topbar-right { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.cp-topbar a { color: #FFFFFF; }
.cp-topbar a:hover { color: var(--amber); }

/* ============================================================
   En-tête
   ============================================================ */
.cp-header { background: #FFFFFF; border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; z-index: 80; }
.cp-header .cp-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.cp-brand { display: flex; align-items: center; gap: 12px; }
.cp-brand img { height: 54px; width: auto; }
.cp-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; font-weight: 600; font-size: 14.5px; }
.cp-nav a { white-space: nowrap; }
.cp-nav a { color: var(--navy); padding: 6px 0; border-bottom: 2px solid transparent; }
.cp-nav a:hover { color: var(--rust); }
.cp-nav a.is-active { color: var(--rust); border-bottom-color: var(--orange); }
.cp-header-cta { display: inline-flex; white-space: nowrap; padding: 11px 18px; font-size: 14px; min-height: 44px; }

/* Ne sert qu'une fois le menu replié ; visible dans le volet mobile. */
.cp-nav-cta { display: none; }
.cp-burger {
  display: none; width: 48px; height: 48px; align-items: center; justify-content: center;
  background: transparent; border: 1.5px solid var(--border); border-radius: 8px; color: var(--navy); cursor: pointer;
}

@media (max-width: 1080px) {
  .cp-burger { display: inline-flex; }
  .cp-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #FFFFFF; border-bottom: 1px solid var(--border); padding: 8px 0 16px;
    box-shadow: 0 18px 30px -20px rgba(14,42,71,.45);
  }
  .cp-nav.is-open { display: flex; }
  .cp-nav a { padding: 14px var(--gut); border-bottom: 1px solid var(--border-soft); }
  .cp-nav a.is-active { border-bottom-color: var(--border-soft); background: #FFF6EC; }
  .cp-nav a.cp-nav-cta {
    display: block; margin: 12px var(--gut) 0; padding: 13px 20px; border-bottom: 0;
    background: var(--orange); color: #1B1206; font-weight: 700; text-align: center; border-radius: 8px;
  }
  .cp-nav a.cp-nav-cta:hover { background: #FF9524; color: #1B1206; }
  .cp-header .cp-wrap { position: relative; flex-wrap: wrap; }
  .cp-header-cta { display: none; }
}
/* ============================================================
   Hero / carrousel
   ============================================================ */
.cp-hero { position: relative; background: var(--navy); color: #FFFFFF; overflow: hidden; }
.cp-slide { display: none; position: relative; }
.cp-slide.is-current { display: block; }
.cp-slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
/* Voile bleu nuit : garde les photos lisibles sous le texte blanc */
.cp-slide-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,31,54,.94) 0%, rgba(14,42,71,.88) 48%, rgba(14,42,71,.66) 100%);
}
.cp-slide-inner {
  position: relative; max-width: var(--wrap); margin: 0 auto;
  padding: 64px var(--gut) 32px; min-height: 520px; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center;
}
.cp-slide-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.cp-slide-text { flex: 999 1 540px; min-width: 0; }
.cp-slide-aside { flex: 1 1 340px; min-width: 0; }

.cp-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
.cp-kicker .cp-flag { height: 4px; width: 48px; }
.cp-slide h1 { margin: 18px 0; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }
.cp-slide h1.cp-quote { font-size: clamp(24px, 3.2vw, 38px); line-height: 1.24; }
.cp-slide-lead { margin: 0 0 30px; font-size: clamp(16px, 1.6vw, 19px); color: var(--on-navy); max-width: 620px; }
.cp-slide-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.cp-cardstack { display: flex; flex-direction: column; gap: 12px; }
.cp-card-navy { background: rgba(19,54,89,.86); border: 1px solid var(--navy-line); border-radius: 14px; padding: 18px 22px; }
.cp-card-navy h2 { font-family: Sora, sans-serif; font-weight: 700; font-size: 17px; color: #FFFFFF; margin: 0 0 2px; }
.cp-card-navy p { color: var(--on-panel); font-size: 14.5px; }

.cp-portrait { border-radius: 18px; overflow: hidden; border: 4px solid var(--navy-panel); max-width: 380px; }
.cp-portrait img { display: block; width: 100%; height: 400px; object-fit: cover; object-position: center 18%; }

.cp-pills { display: flex; flex-wrap: wrap; gap: 12px; }
.cp-pill { background: rgba(19,54,89,.86); border: 1px solid var(--navy-line); border-radius: 999px; padding: 11px 20px; font-weight: 600; font-size: 15px; }

/* Commandes du carrousel */
.cp-hero-ctrl {
  position: relative; max-width: var(--wrap); margin: 0 auto;
  padding: 0 var(--gut) 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.cp-dots { display: flex; gap: 6px; align-items: center; }
.cp-dot { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cp-dot span { display: block; height: 6px; width: 14px; border-radius: 3px; background: #3B6A99; transition: width .3s ease, background-color .3s ease; }
.cp-dot[aria-current="true"] span { width: 36px; background: var(--orange); }
.cp-counter { margin-left: 8px; font-size: 14px; color: var(--on-panel); }
.cp-arrows { display: flex; gap: 10px; }
.cp-arrow { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid #3B6A99; background: transparent; color: #FFFFFF; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cp-arrow:hover { background: rgba(255,255,255,.1); }
.cp-arrow--next { border-color: var(--orange); background: var(--orange); color: #1B1206; }
.cp-arrow--next:hover { background: #FF9524; }

/* Barre de progression de l'auto-défilement */
.cp-progress { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: rgba(255,255,255,.1); }
.cp-progress i { display: block; height: 100%; width: 0; background: var(--orange); }
.cp-hero.is-playing .cp-progress i { animation: cpBar 7s linear infinite; }
@keyframes cpBar { from { width: 0 } to { width: 100% } }

/* Entrée : un seul moment orchestré, à chaque changement de slide */
.cp-slide.is-current .cp-anim { animation: cpUp .7s cubic-bezier(.2,.7,.2,1) both; }
.cp-slide.is-current .cp-anim:nth-child(2) { animation-delay: .1s; }
.cp-slide.is-current .cp-anim:nth-child(3) { animation-delay: .2s; }
.cp-slide.is-current .cp-anim:nth-child(4) { animation-delay: .3s; }
.cp-slide.is-current .cp-slide-aside { animation: cpRight .85s cubic-bezier(.2,.7,.2,1) .18s both; }
@keyframes cpUp { from { opacity: 0; transform: translateY(24px) } to { opacity: 1; transform: none } }
@keyframes cpRight { from { opacity: 0; transform: translateX(44px) scale(.97) } to { opacity: 1; transform: none } }

@media (max-width: 760px) {
  .cp-slide-inner { min-height: 440px; padding-top: 48px; }
  .cp-portrait img { height: 300px; }
  .cp-hero-ctrl { justify-content: center; }
  .cp-counter { width: 100%; text-align: center; margin: 4px 0 0; }
}

/* ============================================================
   Chiffres clés
   ============================================================ */
.cp-stats { background: var(--surface); border-bottom: 1px solid var(--border-soft); }
.cp-stats .cp-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.cp-stat-n { font-family: Sora, sans-serif; font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; color: var(--navy); line-height: 1.1; }
.cp-stat-l { color: var(--muted-light); font-size: 15px; margin-top: 2px; }

/* ============================================================
   Mot du Directeur
   ============================================================ */
.cp-dir { background: #FFFFFF; }
.cp-dir-grid { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.cp-dir-fig { flex: 1 1 340px; max-width: 420px; margin: 0; }
.cp-dir-photo { position: relative; border-radius: 18px; overflow: hidden; background: #E9EEF4; }
.cp-dir-photo img { display: block; width: 100%; height: 560px; object-fit: cover; object-position: center top; }
.cp-dir-photo .cp-flag { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; border-radius: 0; }
.cp-dir-cap { margin-top: 16px; }
.cp-dir-cap b { display: block; font-family: Sora, sans-serif; font-weight: 700; font-size: 21px; color: var(--navy); }
.cp-dir-cap span { color: var(--muted-light); }
.cp-dir-body { flex: 999 1 520px; min-width: 0; }
.cp-dir-quote { margin: 12px 0 24px; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.28; color: var(--navy); }
.cp-dir-intro { margin: 0 0 32px; font-size: 17.5px; color: var(--ink-soft); max-width: 640px; }
.cp-dir-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 28px; margin-bottom: 28px; }
.cp-dir-cols h3 { font-size: 18px; color: var(--navy); margin: 0 0 8px; }
.cp-dir-cols p { color: var(--muted); font-size: 15px; max-width: 62ch; }
.cp-dir-cols p + p { margin-top: 10px; }
.cp-dir-sign { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding-top: 20px; border-top: 1px solid var(--border-soft); }
.cp-dir-sign b { font-family: Sora, sans-serif; font-weight: 700; font-size: 20px; color: var(--navy); font-style: italic; }
.cp-dir-sign span { color: var(--muted-light); }
@media (max-width: 760px) { .cp-dir-photo img { height: 420px; } }

/* ============================================================
   Services
   ============================================================ */
.cp-grid-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 36px; }
.cp-service { background: #FFFFFF; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.cp-service img { width: 100%; height: 170px; object-fit: cover; display: block; }
.cp-service-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.cp-service h3 { font-size: 19px; color: var(--navy); }
.cp-service p { color: var(--muted); font-size: 15px; flex-grow: 1; }
.cp-service button { align-self: flex-start; }

/* ============================================================
   Réalisations
   ============================================================ */
.cp-grid-proj { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.cp-proj { border: 1px solid var(--border); border-radius: 14px; padding: 24px 26px; display: flex; gap: 18px; align-items: flex-start; background: #fff; }
.cp-proj-bar { flex: none; width: 10px; height: 44px; border-radius: 3px; }
.cp-proj h3 { font-size: 19px; color: var(--navy); margin-bottom: 4px; }
.cp-proj p { color: var(--muted); font-size: 15px; }

/* ============================================================
   Formations
   ============================================================ */
.cp-form-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.cp-form-text { flex: 1 1 400px; }
.cp-form-text p { color: var(--on-navy); font-size: 17px; margin: 14px 0 26px; max-width: 58ch; }
.cp-form-list { flex: 1 1 480px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.cp-form-item { background: var(--navy-panel); border: 1px solid var(--navy-line); border-radius: 12px; padding: 16px 20px; font-weight: 600; font-size: 15px; }

/* ============================================================
   Actualités
   ============================================================ */
.cp-grid-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.cp-news { background: #FFFFFF; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
/* Hauteur portée par le conteneur : une vignette manquante laisse un aplat, pas un trou. */
.cp-news-media { display: block; height: 180px; background: #DCE3EC; overflow: hidden; }
.cp-news-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cp-news h3 a { color: var(--navy); }
.cp-news h3 a:hover { color: var(--rust); }
.cp-news-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.cp-news-date { font-size: 13px; color: var(--muted-light); }
.cp-news h3 { font-size: 18px; color: var(--navy); line-height: 1.35; flex-grow: 1; }
.cp-news a.cp-seclink { align-self: flex-start; font-size: 15px; }
.cp-empty { border: 1px dashed var(--border); border-radius: 14px; padding: 36px; text-align: center; color: var(--muted-light); }

.cp-revue {
  margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  background: #FFFFFF; border: 1px solid var(--border); border-radius: 14px; padding: 22px 26px;
}
.cp-revue:hover { border-color: var(--orange); }
.cp-revue-kicker { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); }
.cp-revue-title { display: block; font-family: Sora, sans-serif; font-weight: 700; font-size: 18px; color: var(--navy); max-width: 62ch; margin-top: 2px; }
.cp-revue-go { font-weight: 700; color: var(--rust); }

/* ============================================================
   Vidéo + contacts
   ============================================================ */
.cp-media-grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.cp-video { flex: 999 1 540px; min-width: 0; }
.cp-video video { width: 100%; height: auto; display: block; border-radius: 16px; background: #000; }
.cp-contact { flex: 1 1 320px; }
.cp-contact-list { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.cp-contact-item { display: flex; gap: 14px; align-items: flex-start; }
.cp-contact-item .cp-ico { flex: none; width: 44px; height: 44px; border-radius: 10px; background: #FFF1E2; color: var(--rust); display: flex; align-items: center; justify-content: center; }
.cp-contact-item p { font-size: 15px; color: var(--ink-soft); }
.cp-contact-item span { font-size: 13.5px; color: var(--muted-light); display: block; }
.cp-contact-item a { color: var(--ink-soft); }
.cp-contact-item a:hover { color: var(--rust); }

/* ============================================================
   Partenaires
   ============================================================ */
.cp-partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.cp-partner { height: 92px; border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 14px; background: #fff; }
.cp-partner img { max-height: 100%; max-width: 100%; object-fit: contain; }
.cp-partner:hover { border-color: var(--navy-line); }

/* ============================================================
   Pied de page
   ============================================================ */
.cp-footer { background: var(--navy-deep); color: #C3CFDD; }
.cp-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 36px; padding-top: 64px; padding-bottom: 36px; }
.cp-footer h3 { font-size: 16px; color: #FFFFFF; margin-bottom: 12px; font-family: Inter, sans-serif; font-weight: 700; }
.cp-footer p, .cp-footer li, .cp-footer span { font-size: 15px; }
.cp-footer a { color: #C3CFDD; }
.cp-footer a:hover { color: var(--amber); }
.cp-footer-brand img { height: 52px; width: auto; margin-bottom: 12px; }
.cp-footer-col ul { display: flex; flex-direction: column; gap: 7px; }
.cp-social { display: flex; gap: 12px; }
.cp-social a { width: 44px; height: 44px; border-radius: 10px; background: var(--navy-panel); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.cp-social a:hover { background: var(--orange); color: #1B1206; }
.cp-footer-bottom { border-top: 1px solid #1C3A5C; }
.cp-footer-bottom .cp-wrap { padding-top: 16px; padding-bottom: 16px; font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ============================================================
   Mouvement réduit
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .cp-page *, .cp-page *::before, .cp-page *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important;
  }
}

/* ============================================================
   Correctifs hors scope .cp-page (pages de l'ancien thème)
   ============================================================ */

/* Fiches équipe : le cadre fait 180×180 mais l'image n'avait aucune
   contrainte. Un portrait vertical débordait et recouvrait le nom. */
.single-team-member-area .team-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Liste des actualités : l'image d'article n'avait aucune contrainte de
   hauteur, une photo verticale occupait tout l'écran. */
.single-blog-area .blog-thumbnail a img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}
@media (max-width: 575px) {
  .single-blog-area .blog-thumbnail a img { height: 200px; }
}
