/*
 * cynosphere-theme.css — feuille site-wide du thème enfant.
 *
 * Étend l'identité déjà validée sur les articles (assets/cynosphere.css,
 * scopée à .vc-article) au reste du site : header/nav, footer, fil d'ariane,
 * hero d'article, grilles de listing (accueil, catégorie, archive).
 * Consomme les tokens var(--vc-*) déclarés en :root dans style.css — ne
 * redéclare aucune couleur en dur.
 *
 * Sélecteurs header/footer basés sur un audit du HTML public réellement
 * servi (et-l--header / et-menu-nav / et-l--footer) : le header et le footer
 * de ce site sont rendus par le Divi Theme Builder, pas par un header.php de
 * thème enfant — ces classes sont donc stables tant que la structure Theme
 * Builder actuelle n'est pas modifiée dans wp-admin.
 */

/* ---- Typographie de base, site entier ---- */
body{
  font-family: var(--vc-font-sans);
  color: var(--vc-ardoise);
}

/* ---- Accessibilité : focus clavier visible partout ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible{
  outline: 3px solid var(--vc-teal);
  outline-offset: 2px;
}

/* ---- Header / navigation (Divi Theme Builder) ---- */
.et-l--header .et-menu-nav .et-menu > li > a{
  font-family: var(--vc-font-sans);
  font-weight: 600;
  color: var(--vc-encre);
  transition: color .15s;
}
.et-l--header .et-menu-nav .et-menu > li > a:hover,
.et-l--header .et-menu-nav .et-menu > li.current-menu-item > a,
.et-l--header .et-menu-nav .et-menu > li.current-menu-ancestor > a,
.et-l--header .et-menu-nav .et-menu > li.current-post-ancestor > a{
  color: var(--vc-teal);
}

/* ---- Footer (Divi Theme Builder) ---- */
.et-l--footer{
  /* ponytail: !important nécessaire pour surclasser le CSS généré par le
     module Divi (sélecteur par ID de section unique, plus spécifique que
     .et-l--footer seul). Portée limitée au conteneur footer, pas de risque
     de fuite vers le reste du site. */
  background: var(--vc-encre) !important;
}
.et-l--footer .et_pb_text_inner{
  color: #fff;
  font-family: var(--vc-font-sans);
  font-size: .92rem;
}
.et-l--footer a{
  color: var(--vc-teal-clair);
}

/* ---- Fil d'ariane (single.php, category.php) ---- */
.vc-breadcrumb{
  max-width: 44rem;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
}
.vc-breadcrumb ol{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: 0;
  margin: 0;
  font-size: .85rem;
  color: var(--vc-gris);
}
.vc-breadcrumb li:not(:last-child)::after{
  content: "\203A";
  margin-left: .4rem;
  color: var(--vc-bord);
}
.vc-breadcrumb a{ color: var(--vc-teal); text-decoration: none; }
.vc-breadcrumb a:hover{ text-decoration: underline; }
.vc-breadcrumb [aria-current="page"]{ color: var(--vc-encre); font-weight: 600; }

/* ---- Hero d'article (single.php) ---- */
.vc-hero{
  max-width: 44rem;
  margin: 0 auto 2rem;
  padding: 1.5rem 1.25rem 0;
}
.vc-hero__cat{
  display: inline-block;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--vc-teal);
  background: var(--vc-teal-clair);
  padding: .3rem .7rem;
  border-radius: 999px;
  text-decoration: none;
  margin-bottom: 1rem;
}
.vc-hero__title{
  font-family: var(--vc-font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--vc-encre);
  margin: 0 0 1rem;
}
.vc-hero__meta{
  color: var(--vc-gris);
  font-size: .94rem;
  margin: 0 0 1.5rem;
}
.vc-hero__img{
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-bottom: 1rem;
  background: var(--vc-creme);
}
.vc-hero__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vc-single__body{
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* ---- Pages de listing : accueil, catégorie, archive ---- */
.vc-listing{
  max-width: 78rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.vc-listing__head{
  max-width: 44rem;
  margin: 0 0 2.5rem;
}
.vc-listing__title{
  font-family: var(--vc-font-serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.7rem);
  color: var(--vc-encre);
  margin: 0 0 .8rem;
  position: relative;
  padding-top: 1.1rem;
}
.vc-listing__title::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 52px;
  height: 4px;
  border-radius: 2px;
  background: var(--vc-teal);
}
.vc-cat-intro__text{
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--vc-ardoise);
}
.vc-cat-intro__text p{ margin: 0; }

/* ---- Bandeau d'en-tête catégorie/archive : chapô éditorial plus visible ---- */
.vc-listing__band{
  background: var(--vc-teal-clair);
  border: 1px solid #CBD9E8;
  border-radius: 20px;
  padding: 2.2rem 2rem 2.4rem;
  margin: 0 0 2.8rem;
}
.vc-listing__band .vc-listing__head{
  max-width: 44rem;
  margin: 0;
}
.vc-listing__eyebrow{
  font-family: var(--vc-font-sans);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--vc-teal);
  margin: 0 0 .6rem;
}

/* ---- Carte "à la une" : premier article d'une grille magazine ---- */
.vc-featured{
  margin: 0 0 3rem;
}
.vc-featured__link{
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.2rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.vc-featured__link:focus-visible{
  outline: 3px solid var(--vc-teal);
  outline-offset: 4px;
  border-radius: 18px;
}
.vc-featured__img{
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  background: var(--vc-creme);
}
.vc-featured__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vc-featured__cat{
  display: inline-block;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--vc-teal);
  margin-bottom: .7rem;
}
.vc-featured__title{
  font-family: var(--vc-font-serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--vc-encre);
  margin: 0 0 .9rem;
}
.vc-featured__excerpt{
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--vc-ardoise);
  margin: 0 0 1rem;
}
.vc-featured__meta{
  font-size: .86rem;
  color: var(--vc-gris);
  margin: 0;
}

/* ---- Accueil magazine (front-page.php) : hero + sections par catégorie ---- */
.vc-home__hero{
  margin-bottom: 3.5rem;
}
.vc-home__section{
  margin-bottom: 3.5rem;
}
.vc-home__section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.vc-home__section-title{
  font-family: var(--vc-font-serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.8rem);
  color: var(--vc-encre);
  margin: 0;
  position: relative;
  padding-top: .9rem;
}
.vc-home__section-title::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--vc-teal);
}
.vc-home__section-link{
  font-weight: 600;
  font-size: .9rem;
  color: var(--vc-teal);
  text-decoration: none;
  white-space: nowrap;
}
.vc-home__section-link:hover{
  text-decoration: underline;
}

/* ---- Grille de cartes ---- */
.vc-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}
.vc-card{
  background: #fff;
  border: 1px solid var(--vc-bord);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.vc-card:hover{
  box-shadow: 0 12px 28px rgba(21, 41, 64, .1);
  transform: translateY(-2px);
}
.vc-card__link{
  display: block;
  color: inherit;
  text-decoration: none;
}
.vc-card__link:focus-visible{
  outline: 3px solid var(--vc-teal);
  outline-offset: 2px;
  border-radius: 16px;
}
.vc-card__img{
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--vc-creme);
}
.vc-card__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vc-card__body{
  padding: 1.2rem 1.3rem 1.4rem;
}
.vc-card__cat{
  display: inline-block;
  font-weight: 600;
  font-size: .76rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--vc-teal);
  margin-bottom: .6rem;
}
.vc-card__title{
  font-family: var(--vc-font-serif);
  font-weight: 700;
  font-size: 1.22rem;
  line-height: 1.3;
  color: var(--vc-encre);
  margin: 0 0 .5rem;
}
.vc-card__excerpt{
  font-size: .94rem;
  line-height: 1.6;
  color: var(--vc-ardoise);
  margin: 0 0 .8rem;
}
.vc-card__meta{
  font-size: .82rem;
  color: var(--vc-gris);
  margin: 0;
}

/* ---- Pagination ---- */
.vc-pagination{
  max-width: 78rem;
  margin: 3rem auto 0;
  text-align: center;
}
.vc-pagination .page-numbers{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  margin: 0 .2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--vc-encre);
  text-decoration: none;
  border: 1px solid var(--vc-bord);
}
.vc-pagination .page-numbers.current{
  background: var(--vc-teal);
  border-color: var(--vc-teal);
  color: #fff;
}
.vc-pagination a.page-numbers:hover{
  border-color: var(--vc-teal);
  color: var(--vc-teal);
}

/* ---- Filet de sécurité tableaux hors .vc-article (accessibilité/responsive) ---- */
table:not(.vc-article table){
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* ---- Sommaire d'article (inc/sommaire.php) ----
   <details> natif : replié/déplié sans JavaScript. Teal = ce qui structure
   (charte graphique §1), donc le sommaire est un bloc de navigation teal,
   jamais corail.
   Sélecteurs descendants de .vc-toc à dessein : la feuille scopée .vc-article
   est injectée en fin de body (donc après celle-ci) et poserait sinon ses
   puces teal et son soulignement de lien sur les entrées du sommaire. */
.vc-toc{
  max-width: 44rem;
  margin: 2.4rem auto 2.8rem;
  background: var(--vc-teal-clair);
  border-left: 4px solid var(--vc-teal);
  border-radius: 4px;
  padding: .2rem 1.4rem;
  font-family: var(--vc-font-sans);
}
.vc-toc .vc-toc__head{
  cursor: pointer;
  list-style: none;
  padding: .95rem 0;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--vc-encre);
  display: flex;
  align-items: center;
  gap: .55rem;
}
.vc-toc .vc-toc__head::-webkit-details-marker{ display: none; }
.vc-toc .vc-toc__head::before{
  content: "";
  width: .5rem;
  height: .5rem;
  border-right: 2px solid var(--vc-teal);
  border-bottom: 2px solid var(--vc-teal);
  transform: rotate(45deg);
  transition: transform .15s;
  flex: none;
}
.vc-toc[open] .vc-toc__head::before{ transform: rotate(-135deg); }
.vc-toc .vc-toc__list{
  list-style: none;
  margin: 0;
  padding: 0 0 1.1rem;
}
.vc-toc .vc-toc__item{
  margin: 0;
  padding: .28rem 0;
  position: static;
}
.vc-toc .vc-toc__item::before{ content: none; display: none; }
.vc-toc .vc-toc__item--h3{ padding-left: 1.3rem; font-size: .95rem; }
.vc-toc .vc-toc__item a{
  color: var(--vc-ardoise);
  text-decoration: none;
  box-shadow: none;
  border-bottom: 1px solid transparent;
  line-height: 1.5;
}
.vc-toc .vc-toc__item a:hover{
  color: var(--vc-teal);
  box-shadow: none;
  border-bottom-color: var(--vc-teal);
}
/* Le header Divi peut recouvrir la cible d'une ancre : on réserve la place. */
.vc-single__body h2,
.vc-single__body h3{ scroll-margin-top: 6rem; }

/* ---- Long tableau replié (inc/confort-lecture.php) ----
   Le tableau reste dans sa section, mais ne coupe plus la lecture. Fermé par
   défaut : c'est le clic qui déroule les 46 lignes, pas le scroll. */
.vc-tableau{
  margin: 2rem 0;
}
.vc-tableau .vc-tableau__head{
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 1.1rem;
  background: #fff;
  border: 1px solid var(--vc-bord);
  border-left: 4px solid var(--vc-teal);
  border-radius: 4px;
  font-family: var(--vc-font-sans);
  font-size: .92rem;
  font-weight: 600;
  color: var(--vc-encre);
}
.vc-tableau .vc-tableau__head:hover{ border-color: var(--vc-teal); }
.vc-tableau .vc-tableau__head::-webkit-details-marker{ display: none; }
.vc-tableau .vc-tableau__head::before{
  content: "";
  width: .5rem;
  height: .5rem;
  border-right: 2px solid var(--vc-teal);
  border-bottom: 2px solid var(--vc-teal);
  transform: rotate(45deg);
  transition: transform .15s;
  flex: none;
}
.vc-tableau[open] .vc-tableau__head::before{ transform: rotate(-135deg); }
.vc-tableau[open] .vc-tableau__head{ margin-bottom: .4rem; }

/* ---- Responsive ---- */
@media (max-width: 760px){
  .vc-featured__link{ grid-template-columns: 1fr; }
  .vc-listing__band{ padding: 1.6rem 1.3rem 1.8rem; }
}
@media (max-width: 600px){
  .vc-toc{ margin: 1.8rem auto 2.2rem; padding: .2rem 1.1rem; }
  .vc-hero{ padding-top: 1rem; }
  .vc-grid{ grid-template-columns: 1fr; gap: 1.5rem; }
  .vc-listing{ padding: 1.5rem 1rem 3rem; }
  .vc-home__section-head{ flex-direction: column; align-items: flex-start; gap: .3rem; }
}

/* ======================================================================
   Header et footer natifs Divi (ce site n'utilise pas le Theme Builder)
   ====================================================================== */
#main-header{
  background: #fff;
  box-shadow: none;
  border-bottom: 1px solid var(--vc-bord);
}
#main-header.et-fixed-header{ box-shadow: 0 6px 18px rgba(21, 41, 64, .08) !important; }
#main-header .container{ width: 92%; max-width: 1200px; }
#logo{ max-height: 46px; width: auto; }
#top-menu li a,
#top-menu-nav li a{
  font-family: var(--vc-font-sans);
  font-weight: 600;
  font-size: .95rem;
  color: var(--vc-encre);
  padding-bottom: 0;
  transition: color .15s;
}
#top-menu li a:hover,
#top-menu li.current-menu-item > a,
#top-menu li.current-menu-ancestor > a,
#top-menu li.current_page_item > a{
  color: var(--vc-teal);
  opacity: 1;
}
#top-menu li.current-menu-item > a{
  box-shadow: inset 0 -3px 0 var(--vc-teal);
}
.nav li ul{ border-top: 3px solid var(--vc-teal); }
.mobile_menu_bar::before,
#et_top_search #et_search_icon::before{ color: var(--vc-teal); }
.et_mobile_menu{ border-top: 3px solid var(--vc-teal); }
.et_mobile_menu li a{ color: var(--vc-encre); font-weight: 600; border-bottom: 1px solid var(--vc-bord); }
@media (max-width: 980px){
  #main-header .logo_container{ width: auto; }
  #logo{ max-height: 38px; }
}

#main-footer{ background: var(--vc-encre); }
#main-footer #footer-bottom{ background: transparent; padding: 2rem 0; }
#main-footer #footer-info,
#main-footer #footer-info a,
#main-footer .bottom-nav li a{
  color: #E6EDF5;
  font-family: var(--vc-font-sans);
  font-size: .92rem;
  float: none;
  text-align: center;
  padding-bottom: 0;
}
#main-footer #footer-info{ display: block; margin: 0; }
#main-footer #footer-info a{ text-decoration: underline; text-underline-offset: 3px; }
#et-footer-nav{ background: transparent; border-bottom: 1px solid rgba(255, 255, 255, .14); }
#et-footer-nav .bottom-nav{ padding: 1.4rem 0; text-align: center; float: none; }
#et-footer-nav .bottom-nav li{ display: inline-block; float: none; padding: 0 .9rem; }
#et-footer-nav .bottom-nav li a{ font-weight: 600; }
#et-footer-nav .bottom-nav li a:hover{ color: var(--vc-corail); }

/* Page statique (page.php) */
.vc-page{ max-width: 44rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.vc-page__title{
  font-family: var(--vc-font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 1.3rem + 3vw, 3rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--vc-encre);
  margin: 0 0 1.5rem;
}
.vc-page__body{ font-size: 1.0625rem; line-height: 1.75; color: var(--vc-ardoise); }
.vc-page__body h2{ font-family: var(--vc-font-serif); color: var(--vc-encre); margin: 2.4rem 0 .8rem; }
.vc-page__body a{ color: var(--vc-teal); box-shadow: inset 0 -2px 0 rgba(42, 91, 140, .32); text-decoration: none; }

/* Accueil sans article : message d'attente */
.vc-empty{
  max-width: 44rem;
  margin: 3rem auto;
  padding: 2rem 1.5rem;
  background: var(--vc-teal-clair);
  border: 1px solid #CBD9E8;
  border-radius: 14px;
  text-align: center;
}
.vc-empty h2{ font-family: var(--vc-font-serif); color: var(--vc-encre); margin: 0 0 .6rem; }
.vc-empty p{ margin: 0; }
