/* === Variables thème (change-les !) === */
:root {
  --brand: #0d6efd;           /* Couleur primaire */
  --text: #212529;
  --muted: #6c757d;
  --bg-soft: #f8f9fa;
  --card-border: #e9ecef;
  --radius: 0.75rem;
  --shadow: 0 0.25rem 1rem rgba(0,0,0,.05);
}

/* Utilitaires légers */
.text-secondary { color: var(--muted) !important; }
.bg-light { background-color: var(--bg-soft) !important; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); }

/* Navbar */
.navbar { box-shadow: var(--shadow); }
.navbar .btn { border-radius: var(--radius); }

/* Header */
header .display-5 { letter-spacing: -.02em; }

/* Cartes article */
.post-card {
  padding: 1.25rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
}
.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.post-title:hover { color: var(--brand); }
.post-meta {
  margin: .25rem 0 .75rem;
  color: var(--muted);
}
.post-excerpt { margin-bottom: .75rem; }

/* Sidebar card */
.card { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Footer */
footer { background: #fff; }

/* Sponsors */
.sponsor-logo img {
  height: 80px;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.sponsor-logo:hover img {
  transform: scale(1.1);      /* zoom à 110% */
  filter: brightness(1.1);    /* petit effet de lumière */
}

.team-photo {
  width: 150px;              /* taille fixe (ajuste à ton goût) */
  height: 150px;
  border-radius: 50%;        /* cercle parfait */
  object-fit: cover;         /* recadrage propre */
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,.15); /* petite ombre */
}

/* Pour forcer le footer en bas */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1; /* prend toute la hauteur restante */
}

/* =========================
   CKEditor 5 frontend render
   ========================= */

/* ===== CKEditor headings ===== */

.post-excerpt.ck-content h1 {
  font-size: 1.7rem;
  font-weight: 700;
}

.post-excerpt.ck-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.post-excerpt.ck-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
}

.post-excerpt.ck-content h4 {
  font-size: 1.2rem;
}

.post-excerpt.ck-content h5 {
  font-size: 1.1rem;
}

.post-excerpt.ck-content h6 {
  font-size: 1.0rem;
}

.post-excerpt.ck-content {
  width: 100%;
}

/* Figures CKEditor */
.post-excerpt.ck-content figure.image {
  max-width: 100%;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Images */
/* Ajout de l'arrondi sur les images dans les articles */
.ck-content figure.image img {
  border-radius: 0.75rem;
}

.post-excerpt.ck-content figure.image img,
.post-excerpt.ck-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Image redimensionnée : on respecte la largeur donnée par CKEditor */
.post-excerpt.ck-content figure.image.image_resized {
  display: table;
}

/* Centre */
.post-excerpt.ck-content figure.image.image-style-align-center,
.post-excerpt.ck-content figure.image.image-style-block-align-center {
  margin-left: auto;
  margin-right: auto;
}

/* Bloc à droite */
.post-excerpt.ck-content figure.image.image-style-block-align-right,
.post-excerpt.ck-content figure.image.image-style-align-right {
  margin-left: auto;
  margin-right: 0;
}

/* Bloc à gauche */
.post-excerpt.ck-content figure.image.image-style-block-align-left,
.post-excerpt.ck-content figure.image.image-style-align-left {
  margin-left: 0;
  margin-right: auto;
}


/* Gauche */
.post-excerpt.ck-content figure.image.image-style-align-block-left {
  margin-left: 0;
  margin-right: auto;
}

/* Droite */
.post-excerpt.ck-content figure.image.image-style-align-block-right {
  margin-left: auto;
  margin-right: 0;
}


/* Nettoyage float */
.post-excerpt.ck-content::after {
  content: "";
  display: block;
  clear: both;
}

/* Légendes éventuelles */
.post-excerpt.ck-content figure.image figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.5rem;
}

/* Mobile : on annule les floats pour éviter les rendus moches */
@media (max-width: 768px) {
  .post-excerpt.ck-content figure.image.image-style-side,
  .post-excerpt.ck-content figure.image.image-style-float-right,
  .post-excerpt.ck-content figure.image.image-style-float-left {
    float: none;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
  }
}

/* =========================
   Article list horizontal cards
   ========================= */

.article-list {
  width: 100%;
}

.article-row {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--card-border);
}

.article-row .row {
  min-height: 100%;
}

.article-row-image-link {
  display: block;
  height: 100%;
  text-decoration: none;
}

.article-row-image-wrapper {
  height: 100%;
  min-height: 260px;
  background: #f8f9fa;
  overflow: hidden;
}

.article-row-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-row-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.article-row-meta {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.article-row-date,
.article-row-author {
  color: #FF7E33;
}

.article-row-separator {
  color: #0d1321;
  font-weight: 700;
  margin: 0 .35rem;
}

.article-row-title {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

.article-row-title a {
  color: var(--text);
  text-decoration: none;
}

.article-row-title a:hover {
  color: var(--brand);
}

.article-row-excerpt {
  color: var(--text);
}

.article-row-excerpt p:last-child {
  margin-bottom: 0;
}

/* Limite visuelle de l'extrait */
.article-row-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Évite qu'une image CKEditor dans l'extrait casse la card */
.article-row-excerpt figure,
.article-row-excerpt img,
.article-row-excerpt iframe,
.article-row-excerpt table {
  display: none !important;
}

@media (max-width: 991.98px) {
  .article-row-title {
    font-size: 1.6rem;
  }

  .article-row-body {
    padding: 1.25rem;
  }
}

@media (max-width: 767.98px) {
  .article-row-image-wrapper {
    min-height: 220px;
  }

  .article-row-title {
    font-size: 1.35rem;
  }

  .article-row-excerpt {
    -webkit-line-clamp: 3;
  }
}

/* on ajoute */

.article-list {
  width: 100%;
}

.article-row {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--card-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.1);
}

.article-row-image-wrapper {
  height: 100%;
  min-height: 260px;
  background: #f8f9fa;
  overflow: hidden;
}

.article-row-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-row-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.article-row-meta {
  color: var(--muted);
}

.article-row-date,
.article-row-author {
  color: #FF7E33;
}

.article-row-separator {
  color: #0d1321;
  font-weight: 700;
  margin: 0 .35rem;
}

.article-row-title {
  font-size: 2rem;
  line-height: 1.2;
}

.article-row-title-link {
  color: var(--text);
  text-decoration: none;
}

.article-row-title-link:hover {
  color: var(--brand);
}

.article-row-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-row-excerpt figure,
.article-row-excerpt img,
.article-row-excerpt iframe,
.article-row-excerpt table {
  display: none !important;
}

@media (max-width: 991.98px) {
  .article-row-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .article-row-excerpt {
    -webkit-line-clamp: 5;
  }
}

@media (max-width: 767.98px) {
  .article-row-image-wrapper {
    min-height: 220px;
  }

  .article-row-title {
    font-size: 1.35rem;
  }
}

.article-row-image {
  transition: transform 0.3s ease;
}

.article-row:hover .article-row-image {
  transform: scale(1.05);
}

.article-row-category {
  color: #FF7E33;
  font-weight: 600;
  letter-spacing: 0.05em;
}