/* === COMPOSANTS D'REVUES UNIFIÉS === */

/* SECTION HERO */
.revue-hero {
  background: linear-gradient(rgba(13, 110, 253, 0.5), rgba(10, 88, 202, 0.7)),
    url("../images/meeting-01.jpg") center/cover no-repeat;
  color: var(--white);
  padding: 5rem 1rem;
  margin-bottom: 3rem;
  text-align: center;
  text-shadow: 0.15em 0.15em 0.075em var(--primary-dark);
}

.revue-hero h1 {
  color: var(--white);
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.revue-hero p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.95;
}

.revue-hero .icon {
  color: inherit;
}

/* CONTENEUR PRINCIPAL */
.revues-container {
  padding: 3rem 1rem;
  background: var(--white);
}

.revues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  justify-content: center;
}

/* CARTE D'REVUE */
.revue-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.revue-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(13, 110, 253, 0.15);
  border-color: var(--primary-color);
}

.revue-title {
  color: var(--secondary-color);
}

.revue-card .revue-title {
  font-size: 1.45rem;
}

/* IMAGE DE L'REVUE */
.revue-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  border: 0.1rem solid var(--gray-dark);
  overflow: hidden;
}

.revue-canvas-wrapper canvas {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.revue-card:hover .revue-canvas-wrapper canvas {
  transform: scale(1.05);
}

/* CONTENU DE LA CARTE */
.revue-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.revue-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.revue-title a {
  color: inherit;
  text-decoration: none;
}

.revue-title a:hover {
  color: var(--primary-color);
}

/* MÉTADONNÉES */
.revue-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--gray-medium);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-light);
}

.revue-author {
  font-weight: 500;
  color: var(--primary-color);
}

.revue-date {
  color: var(--gray-medium);
}

/* EXTRATITRE */
.revue-excerpt {
  color: var(--gray-dark);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.revue-content .revue-paragraphe {
  text-align: justify;
}

/* BOUTON LIRE PLUS */
.revue-read-more {
  align-self: flex-start;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.revue-read-more:hover {
  color: #e63946;
  border-bottom-color: #e63946;
  padding-right: 1.5rem;
}

.revue-read-more:hover::after {
  content: " →";
  margin-left: 0.5rem;
  transition: margin-left 0.3s ease;
}

/* PAGINATION */
.revues-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-light);
}

.pagination-link {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination-link:hover {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.pagination-link.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* PAGE D'REVUE INDIVIDUEL */
.revue-single {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1rem;
  background: var(--white);
}

.revue-single-header {
  margin-bottom: 2rem;
  text-align: center;
}

.revue-single-title {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.revue-single-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  color: var(--gray-medium);
  font-size: 0.95rem;
}

.revue-single-content {
  line-height: 1.8;
  font-size: 1.125rem;
  color: var(--gray-dark);
}

.revue-single-content h2 {
  color: var(--secondary-color);
  margin: 2rem 0 1rem;
  font-size: 1.75rem;
}

.revue-single-content h3 {
  color: var(--secondary-color);
  margin: 1.5rem 0 1rem;
  font-size: 1.5rem;
}

.revue-single-content p {
  margin-bottom: 1.5rem;
}

.revue-single-content canvas {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
}

/* PDF READER */
.pdf-loader {
  position: relative;
  width: 100%;
  background: inherit;
}

.pdf-loader.pdf-viewer {
  height: calc((100vh + 100vmin) / 2 - 4rem);
}

.pdf-loader.thumb-page {
  height: 6.25rem;
}

.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.pdf-viewer {
  display: none;
  grid-template-rows: 100% auto;
  grid-template-columns: minmax(10rem, auto);
  grid-auto-columns: minmax(calc(100% - 10rem), auto);
  max-height: calc((100vh + 100vmin) / 2 - 4rem);
  margin: 2rem auto;
  border: 0.1rem solid var(--gray-light);
}

.pdf-viewer.show {
  display: grid;
}

.pdf-viewer > * {
  width: 100%;
  height: 100%;
}

/* Style simple pour la zone des miniatures */
.pdf-viewer .thumbnail-container {
  grid-area: 1/1/-1/2;
  display: none;
  width: 10rem;
  padding: 0.5rem;
  border-right: 0.1rem solid var(--gray-light);
  text-align: left;
  overflow-y: auto;
}

.pdf-viewer .thumbnail-container.show {
  display: block;
}

.thumbnail-container .thumb-page {
  min-height: 6.25rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.thumb-page canvas {
  max-width: 100%;
  height: auto;
  border: 0.1rem solid var(--gray-dark);
  cursor: pointer;
}

.thumb-page.active canvas {
  border-color: var(--primary);
  box-shadow: 0 0 0.15rem var(--primary);
}

.pdf-viewer .viewer-controls {
  grid-row: 2/3;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: max-content;
  padding: 0.5rem;
  transition: height 0.3s ease-in-out;
  overflow: hidden;
}

/* Pour centrer le canvas */
.pdf-viewer .canvas-container {
  overflow-y: auto;
}

.canvas-container canvas,
.canvas-loader {
  display: none;
  box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.2);
  border: 0.1rem solid var(--gray-light);
  margin: 0 auto;
}

.canvas-container canvas.show {
  display: block;
}

.canvas-loader.show {
  display: flex;
  max-width: 100%;
  max-height: 100%;
}

.pdf-viewer .btn {
  margin: 0;
}

.page-info {
  margin: 0 0.5rem;
  font-weight: bold;
}

/* === DOMAINES === */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  text-align: center;
}

.domain-item {
  background: va(--gray-light);
  padding: 1rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s;
}

.domain-item:hover {
  background: var(--gray-medium);
}

/* === NEWSLETTER === */

.newsletter-form {
  display: flex;
}

.newsletter-form input[type="email"] {
  font-size: 1rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .revue-hero h1 {
    font-size: 2.2rem;
  }

  .revue-hero p {
    font-size: 1.1rem;
  }

  .revues-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .revue-single-title {
    font-size: 2rem;
  }

  .revue-single-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .revue-hero {
    padding: 3rem 1rem;
  }

  .revue-hero h1 {
    font-size: 1.8rem;
  }

  .revue-content {
    padding: 1rem;
  }

  .revue-title {
    font-size: 1.25rem;
  }
}