/* --------------------------------------------------------------------------
   Ajustements propres à WordPress (barre d'admin, pagination, contenus créés
   depuis l'éditeur). Chargé après les styles du site.
   -------------------------------------------------------------------------- */

/* La barre d'administration ne doit pas passer sous l'en-tête fixe. */
body.admin-bar .header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .header { top: 46px; }
}

/* Pagination des archives, au style des liens du site. */
.colibri-page .navigation.pagination {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 48px;
}

.colibri-page .navigation.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.colibri-page .navigation.pagination .page-numbers:hover,
.colibri-page .navigation.pagination .page-numbers.current {
  opacity: 1;
}

.colibri-page .navigation.pagination .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* Contenu rédigé dans l'éditeur WordPress (articles, événements). */
.colibri-page .article-copy > h2,
.colibri-page .article-copy > h3 { margin-top: 1.6em; }
.colibri-page .article-copy > p { margin: 0 0 1.15em; }
.colibri-page .article-copy img,
.colibri-page .article-copy figure { max-width: 100%; height: auto; }
.colibri-page .article-copy figure { margin: 2em 0; }
.colibri-page .article-copy figcaption { margin-top: 0.6em; font-size: 0.82rem; opacity: 0.68; }
.colibri-page .article-copy ul,
.colibri-page .article-copy ol { margin: 0 0 1.3em 1.2em; }
.colibri-page .article-copy li { margin-bottom: 0.5em; }
.colibri-page .article-copy blockquote {
  margin: 2em 0;
  padding-left: 1.2em;
  border-left: 2px solid currentColor;
  font-style: italic;
}

/* Contenu rédigé hors Elementor : de l'air sous l'en-tête fixe. */
.colibri-page .colibri-plain-top {
  padding-top: 140px;
}

/* Signature de l'agence, dans la barre basse du pied de page.
   Même graisse et même discrétion que la mention de copyright. */
.colibri-page .footer__bottom { gap: 18px; flex-wrap: wrap; }
.colibri-page .footer__credit { white-space: nowrap; }
.colibri-page .footer__credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.colibri-page .footer__credit a:hover,
.colibri-page .footer__credit a:focus-visible {
  color: rgba(255, 255, 255, 0.86);
  border-bottom-color: currentColor;
}

/* ---------------------------------------------------------------- bandeau --
   Parallaxe au défilement et vidéo de fond optionnelle.
   --hero-progress vaut 0 en haut de page et 1 après une hauteur d'écran ;
   il est écrit par script.js. */
.colibri-page .hero,
.colibri-page .page-hero { --hero-progress: 0; }

.colibri-page .hero__content,
.colibri-page .page-hero__inner { will-change: transform, opacity; }

/* Le voile s'épaissit pendant la descente : la transition vers la section
   suivante se fait dans l'ombre plutôt que par une coupure nette. */
.colibri-page .hero__veil,
.colibri-page .page-hero__veil { transition: none; }

.colibri-page .hero::after,
.colibri-page .page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(10, 9, 14, 0.55);
  opacity: calc(var(--hero-progress) * 0.9);
}

/* Vidéo de fond : même cadrage que la photo, apparition en fondu une fois
   la lecture possible. La photo reste dessous comme image d'attente. */
.colibri-page .hero__video {
  position: absolute;
  inset: 0;
  /* Sous le dégradé du bandeau (.hero__media::after), au-dessus de la photo. */
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 50%;
  filter: saturate(0.92) contrast(1.04);
  opacity: 0;
  transition: opacity 1.1s ease;
}

.colibri-page .hero__video.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .colibri-page .hero::after,
  .colibri-page .page-hero::after { opacity: 0; }
  .colibri-page .hero__video { display: none; }
}

/* Page de texte sans encadré « Repères » : la grille de l'article réserve une
   première colonne étroite pour cet encadré. Quand il n'y a rien à y mettre,
   le texte s'y retrouvait comprimé sur 255 px. On le place alors dans la
   colonne large ; la gouttière de gauche reste, elle donne le même alignement
   éditorial que les articles avec encadré. */
@media (min-width: 981px) {
  .colibri-page .article-layout > .article-copy:only-child { grid-column: 2; }
}

/* ------------------------------------------------- bandeau de consentement --
   Discret, en bas d'écran, sans masquer le contenu. Refuser est aussi visible
   qu'accepter : c'est une exigence du RGPD, pas un choix graphique. */
.colibri-page .colibri-consent {
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  background: #17161f;
  color: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  font-size: 13.5px;
  line-height: 1.55;
}

.colibri-page .colibri-consent p { margin: 0; }

.colibri-page .colibri-consent__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.colibri-page .colibri-consent button {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.colibri-page .colibri-consent button:hover { background: rgba(255, 255, 255, 0.1); }

.colibri-page .colibri-consent button.is-primary {
  background: #fffdf8;
  border-color: #fffdf8;
  color: #17161f;
}

.colibri-page .colibri-consent button.is-primary:hover { background: #ffffff; }

.colibri-page .colibri-consent a {
  color: rgba(255, 253, 248, 0.6);
  font-size: 12px;
  text-decoration: underline;
}

/* L'attribut hidden doit l'emporter sur display:grid, sinon le bandeau ne se
   ferme jamais après un clic sur Accepter ou Refuser. */
.colibri-page .colibri-consent[hidden] { display: none !important; }

.colibri-page .colibri-consent button { min-height: 44px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

@media (max-width: 520px) {
  .colibri-page .colibri-consent {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 16px;
    font-size: 13px;
  }
  .colibri-page .colibri-consent__actions { justify-content: stretch; }
  .colibri-page .colibri-consent button { flex: 1; }
}

/* ------------------------------------------------------ ouverture de la page --
   Le voile d'intro s'efface plus vite qu'à l'origine : une seconde de
   transition retardait d'autant le moment où Google considère la page comme
   affichée. Le mouvement reste lisible, il est simplement plus franc. */
.colibri-page .loader { transition: clip-path 0.55s var(--ease), visibility 0.55s; }

/* Sans JavaScript, le voile resterait en place et la page serait inaccessible. */
.colibri-page.no-js .loader { display: none; }

@media (prefers-reduced-motion: reduce) {
  .colibri-page .loader { transition: none; }
}

/* Cartes d'univers de l'accueil : la liste complète des disciplines tient
   maintenant sur deux à trois lignes, la typographie et les espacements
   sont resserrés pour qu'elle reste lisible sans déborder de la carte. */
.colibri-page .discipline-card__body ul { gap: 6px 14px; margin-top: 18px; font-size: 10.5px; }
.colibri-page .discipline-card__body li::before { margin-right: 5px; }
@media (max-width: 900px) {
  .colibri-page .discipline-card__body ul { font-size: 11px; }
}

/* Grille de deux photos (page Kukumpa) : deux colonnes, sans case vide. */
.colibri-page .photo-grid--duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
