/*
Theme: PiloteCSE Child
File: edito-pilotecse.css
Version: 0.4.5
Objet: Modèle éditorial spécifique pour les articles Édito PiloteCSE
Important:
- Ne modifie pas le header global
- Ne modifie pas le menu global
- Ne modifie pas la home
- Ne modifie pas style.css
- S'applique uniquement aux articles contenant .pcse-edito-page
- La largeur générale est désormais portée par pilotecse-layout-global.css
*/

/* =========================================================
   1. Variables et socle général
   ========================================================= */

.pcse-edito-page {
  --pcse-edito-blue: #006da8;
  --pcse-edito-blue-dark: #061b33;
  --pcse-edito-blue-soft: #eef8ff;
  --pcse-edito-border: #cfe7f5;
  --pcse-edito-teal: #00a6a6;
  --pcse-edito-teal-soft: #dff8f6;
  --pcse-edito-orange: #ffb25f;
  --pcse-edito-orange-soft: #fff4e6;
  --pcse-edito-text: #102033;
  --pcse-edito-muted: #5c6b78;
  --pcse-edito-shadow: 0 10px 28px rgba(0, 62, 100, 0.08);
  --pcse-edito-radius: 24px;

  margin-top: 24px;
  margin-bottom: 64px;
  padding: 0;
  color: var(--pcse-edito-text);
  font-size: 18px;
  line-height: 1.65;
}

.pcse-edito-page,
.pcse-edito-page * {
  box-sizing: border-box;
}

/* =========================================================
   2. Neutralisation du modèle article classique
   uniquement pour les éditos
   ========================================================= */

body.single-post:has(.pcse-edito-page) {
  overflow-x: hidden;
}

/* Masquer le titre WordPress classique */
body.single-post:has(.pcse-edito-page) h1.entry-title,
body.single-post:has(.pcse-edito-page) .entry-header,
body.single-post:has(.pcse-edito-page) .wp-block-post-title {
  display: none !important;
}

/* Masquer uniquement les vraies sidebars WordPress */
body.single-post:has(.pcse-edito-page) #secondary,
body.single-post:has(.pcse-edito-page) .secondary,
body.single-post:has(.pcse-edito-page) .widget-area,
body.single-post:has(.pcse-edito-page) .sidebar,
body.single-post:has(.pcse-edito-page) .sidebar-primary,
body.single-post:has(.pcse-edito-page) .site-sidebar,
body.single-post:has(.pcse-edito-page) .ast-sidebar,
body.single-post:has(.pcse-edito-page) .right-sidebar,
body.single-post:has(.pcse-edito-page) .tocer-sidebar {
  display: none !important;
  width: 0 !important;
  max-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Libérer le conteneur article sans toucher au header */
body.single-post:has(.pcse-edito-page) .site-content,
body.single-post:has(.pcse-edito-page) .site-content > .ast-container,
body.single-post:has(.pcse-edito-page) .content-area,
body.single-post:has(.pcse-edito-page) #primary,
body.single-post:has(.pcse-edito-page) .site-main,
body.single-post:has(.pcse-edito-page) .entry-content,
body.single-post:has(.pcse-edito-page) .wp-block-post-content {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  float: none !important;
  overflow: visible !important;
}

/* Cas particulier : certains modèles d'article placent le contenu et
   l'ancienne sidebar dans deux colonnes Gutenberg. Sur les éditos, on
   supprime uniquement la colonne sœur qui ne contient pas .pcse-edito-page. */
body.single-post:has(.pcse-edito-page) .wp-block-columns:has(.pcse-edito-page) {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}

body.single-post:has(.pcse-edito-page) .wp-block-columns:has(.pcse-edito-page) > .wp-block-column:not(:has(.pcse-edito-page)) {
  display: none !important;
  width: 0 !important;
  max-width: 0 !important;
  flex-basis: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.single-post:has(.pcse-edito-page) .wp-block-columns:has(.pcse-edito-page) > .wp-block-column:has(.pcse-edito-page) {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  flex-basis: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* =========================================================
   3. Bandeau Édito magazine
   ========================================================= */

.pcse-edito-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 28px 0;
  padding: 34px;
  border: 1px solid var(--pcse-edito-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 94% 10%, rgba(255, 178, 95, 0.24) 0, rgba(255, 178, 95, 0.24) 92px, transparent 94px),
    linear-gradient(135deg, #ffffff 0%, #f3fbff 100%);
  box-shadow: var(--pcse-edito-shadow);
}

.pcse-edito-hero--magazine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: center;
}

.pcse-edito-hero-content {
  min-width: 0;
}

.pcse-edito-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--pcse-edito-teal-soft);
  color: #00746f;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pcse-edito-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}

.pcse-edito-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--pcse-edito-blue);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 109, 168, 0.22);
}

.pcse-edito-meta strong {
  display: block;
  color: var(--pcse-edito-blue-dark);
  font-size: 16px;
  line-height: 1.25;
}

.pcse-edito-meta span {
  display: block;
  color: var(--pcse-edito-muted);
  font-size: 14px;
  line-height: 1.35;
}

.pcse-edito-hero h1 {
  max-width: 760px;
  margin: 18px 0 18px 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pcse-edito-blue-dark);
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-align: left;
}

.pcse-edito-lead {
  max-width: 820px;
  margin: 0;
  color: #21364d;
  font-size: 20px;
  line-height: 1.55;
}

.pcse-edito-hero-media {
  position: relative;
  overflow: hidden;
  width: 340px;
  max-width: 340px;
  min-height: 420px;
  margin: 0;
  border-radius: 26px;
  background: var(--pcse-edito-blue-soft);
  box-shadow: 0 14px 34px rgba(0, 62, 100, 0.14);
}

.pcse-edito-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.pcse-edito-hero-media figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pcse-edito-blue-dark);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

/* =========================================================
   4. Navigation rapide
   ========================================================= */

.pcse-edito-quicknav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  margin: 0 0 28px 0;
  padding: 14px;
  border: 1px solid var(--pcse-edito-border);
  border-radius: 18px;
  background: #fff;
}

.pcse-edito-quicknav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--pcse-edito-blue-soft);
  color: var(--pcse-edito-blue-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.pcse-edito-quicknav a:hover,
.pcse-edito-quicknav a:focus {
  background: var(--pcse-edito-blue);
  color: #fff;
}

/* =========================================================
   5. Layout principal : article + colonne magazine
   ========================================================= */

.pcse-edito-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.pcse-edito-main {
  min-width: 0;
  width: 100%;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.pcse-edito-main section {
  width: 100%;
  max-width: 100%;
  margin-bottom: 34px;
}

.pcse-edito-main h2 {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 16px 0;
  padding: 18px 22px;
  border: 1px solid var(--pcse-edito-border);
  border-left: 6px solid var(--pcse-edito-blue);
  border-radius: 18px;
  background: #f7fbff;
  color: #07192b;
  font-size: clamp(26px, 2.7vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.pcse-edito-main h3 {
  margin: 26px 0 10px 0;
  color: var(--pcse-edito-blue-dark);
  font-size: 23px;
  line-height: 1.25;
}

.pcse-edito-main p {
  margin: 0 0 18px 0;
}

.pcse-edito-main strong {
  color: #07192b;
}

.pcse-edito-punchline {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 28px 0;
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--pcse-edito-orange-soft);
  border: 1px solid #ffd8ac;
  color: #45260b;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.45;
}

/* =========================================================
   6. Colonne droite interne de l'édito
   ========================================================= */

.pcse-edito-side {
  display: grid !important;
  width: 320px;
  max-width: 320px;
  gap: 16px;
  position: sticky;
  top: 24px;
  align-self: start;
  align-content: start;
  margin-top: 0;
}

.pcse-edito-sidecard {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--pcse-edito-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 62, 100, 0.06);
}

.pcse-edito-sidecard > *:last-child {
  margin-bottom: 0;
}

.pcse-edito-sidecard--primary {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 178, 95, 0.26) 0, rgba(255, 178, 95, 0.26) 72px, transparent 74px),
    linear-gradient(135deg, #ffffff 0%, #eef8ff 100%);
}

.pcse-edito-sidebadge {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--pcse-edito-teal-soft);
  color: #00746f;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pcse-edito-sidecard h2,
.pcse-edito-sidecard h3 {
  margin: 0 0 10px 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pcse-edito-blue-dark);
  font-size: 20px;
  line-height: 1.25;
}

.pcse-edito-sidecard p {
  margin: 0 0 14px 0;
  color: #33465a;
  font-size: 15px;
  line-height: 1.5;
}

.pcse-edito-sidecard a {
  display: inline-flex;
  align-items: center;
  color: var(--pcse-edito-blue);
  font-weight: 900;
  text-decoration: none;
}

.pcse-edito-sidecard a:hover,
.pcse-edito-sidecard a:focus {
  text-decoration: underline;
}

/* =========================================================
   6.2 Carte ODJ PiloteCSE - version stable sans grille interne
   Version: 0.4.5
   Objet:
   - Identité visuelle spécifique pour le module ODJ
   - Alignement simple : badge, titre, texte, liste, bouton
   - Icône positionnée en haut à droite pour éviter les décalages
   ========================================================= */

.pcse-edito-sidecard--odj {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 24px 22px 24px 26px !important;
  border: 1px solid rgba(255, 149, 0, 0.35);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 178, 95, 0.30) 0, rgba(255, 178, 95, 0.30) 76px, transparent 78px),
    linear-gradient(135deg, #fff7ec 0%, #fffdf8 50%, #eef8ff 100%);
  box-shadow: 0 12px 28px rgba(255, 149, 0, 0.13);
}

.pcse-edito-sidecard--odj::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #ff9500 0%, #006da8 100%);
}

.pcse-edito-sidecard--odj .pcse-edito-sidebadge {
  margin: 0 0 18px 0;
  background: #fff0d8;
  color: #9a5200;
}

.pcse-edito-sidecard--odj .pcse-odj-promo__icon {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff9500 0%, #ffb25f 100%);
  color: #ffffff;
  font-size: 23px;
  box-shadow: 0 10px 20px rgba(255, 149, 0, 0.24);
}

.pcse-edito-sidecard--odj .pcse-odj-promo__title {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 16px 0 !important;
  padding: 0 58px 0 0 !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #061b33 !important;
  font-size: 21px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
}

.pcse-edito-sidecard--odj .pcse-odj-promo__text {
  margin: 0 0 16px 0 !important;
  color: #24384d;
  font-size: 15.5px;
  line-height: 1.55;
  text-align: left;
}

.pcse-edito-sidecard--odj .pcse-odj-promo__list {
  margin: 0 0 18px 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.pcse-edito-sidecard--odj .pcse-odj-promo__list li {
  position: relative;
  margin: 0 0 8px 0;
  padding-left: 22px;
  color: #24384d;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

.pcse-edito-sidecard--odj .pcse-odj-promo__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #00746f;
  font-weight: 900;
}

.pcse-edito-sidecard--odj .pcse-odj-promo__button,
.pcse-edito-sidecard--odj .pcse-odj-promo__button:visited {
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  border-radius: 12px;
  background: #006da8 !important;
  color: #ffffff !important;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
}

.pcse-edito-sidecard--odj .pcse-odj-promo__button:hover,
.pcse-edito-sidecard--odj .pcse-odj-promo__button:focus {
  background: #005985 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

/* =========================================================
   7. Blocs internes éditoriaux
   ========================================================= */

.pcse-edito-reperes {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 30px 0;
  padding: 24px;
  border-radius: 22px;
  background: #f3f8fc;
  border: 1px solid var(--pcse-edito-border);
}

.pcse-edito-reperes h2 {
  margin-top: 0;
}

.pcse-edito-reperes ul {
  margin: 12px 0 0 0;
  padding-left: 22px;
}

.pcse-edito-reperes li {
  margin-bottom: 10px;
}

.pcse-edito-signature {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 34px 0 0 0;
  padding: 22px 24px;
  border-left: 6px solid var(--pcse-edito-orange);
  border-radius: 18px;
  background: #fffaf3;
  color: #2d1c0c;
}

.pcse-edito-signature strong {
  display: block;
  margin-bottom: 4px;
  color: #07192b;
}

/* =========================================================
   8. Cartes de sortie vers PiloteCSE
   ========================================================= */

.pcse-edito-crossroads {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 42px 0 0 0;
  padding: 28px;
  border-radius: 26px;
  background: #f7fbff;
  border: 1px solid var(--pcse-edito-border);
}

.pcse-edito-crossroads h2 {
  margin: 0 0 18px 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #07192b;
  font-size: 28px;
  line-height: 1.2;
}

.pcse-edito-cardgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pcse-edito-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--pcse-edito-border);
  box-shadow: 0 8px 22px rgba(0, 62, 100, 0.06);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pcse-edito-card strong {
  display: block;
  margin-bottom: 9px;
  color: var(--pcse-edito-blue-dark);
  font-size: 20px;
  line-height: 1.25;
}

.pcse-edito-card span {
  display: block;
  color: #3d5064;
  font-size: 15px;
  line-height: 1.5;
}

.pcse-edito-card em {
  margin-top: auto;
  padding-top: 16px;
  color: var(--pcse-edito-blue);
  font-style: normal;
  font-weight: 900;
}

.pcse-edito-card:hover,
.pcse-edito-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 62, 100, 0.10);
}

/* =========================================================
   9. Responsive
   ========================================================= */

@media (max-width: 1100px) {
  .pcse-edito-page {
    margin-top: 22px;
    margin-bottom: 56px;
  }

  .pcse-edito-hero--magazine {
    grid-template-columns: 1fr;
  }

  .pcse-edito-hero-media {
    width: 100%;
    max-width: 100%;
    min-height: 300px;
  }

  .pcse-edito-hero-media img {
    min-height: 300px;
  }

  .pcse-edito-layout {
    grid-template-columns: 1fr;
  }

  .pcse-edito-side {
    position: static;
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pcse-edito-cardgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .pcse-edito-page {
    font-size: 17px;
  }

  .pcse-edito-hero {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .pcse-edito-hero h1 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .pcse-edito-lead {
    font-size: 18px;
  }

  .pcse-edito-side {
    grid-template-columns: 1fr;
  }

  .pcse-edito-main h2 {
    padding: 16px 18px;
  }
}

@media (max-width: 480px) {
  .pcse-edito-quicknav {
    padding: 12px;
  }

  .pcse-edito-quicknav a {
    width: 100%;
    justify-content: center;
  }

  .pcse-edito-meta {
    align-items: flex-start;
  }

  .pcse-edito-avatar {
    width: 46px;
    height: 46px;
  }
}
/* =========================================================
   Ajustement colonne latérale édito
   Version: 0.4.7
   Objet:
   - Élargir toute la colonne droite
   - Éviter les bricolages carte par carte
   - Améliorer la lisibilité des encarts ODJ, formation, ressources
   ========================================================= */

@media (min-width: 1101px) {
  .pcse-edito-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .pcse-edito-side {
    width: 360px;
    max-width: 360px;
  }
}
/* =========================================================
   Ajustement colonne latérale édito
   Version: 0.4.8
   Objet:
   - Réduire la colonne droite après test visuel
   - Conserver toutes les cartes latérales alignées
   - Préserver une colonne principale confortable
   ========================================================= */

@media (min-width: 1101px) {
  .pcse-edito-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .pcse-edito-side {
    width: 340px;
    max-width: 340px;
  }
}