/* Catalogue Section - Modern 2025 */
.catalogue-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.catalogue-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(26, 58, 92, 0.1), transparent);
}

.catalogue-container {
  background: white;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(26, 58, 92, 0.12);
  margin-bottom: 40px;
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(26, 58, 92, 0.08);
  position: relative;
  overflow: hidden;
}

.catalogue-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1a3a5c, #56c2e2, #0EA0E6);
  border-radius: 24px 24px 0 0;
}

/* Catalogue - Lecteur 3D DearFlip (wrapper utilisé) */
.pdf-viewer-wrapper {
  width: 100%;
  min-height: 720px;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1d3a 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(86, 194, 226, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  margin-bottom: 40px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
  position: relative;
}

.pdf-viewer-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(86, 194, 226, 0.08) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.pdf-viewer-wrapper:hover::before {
  opacity: 1;
}

.pdf-viewer-wrapper:hover {
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7),
              0 0 0 1px rgba(86, 194, 226, 0.3),
              0 0 60px rgba(86, 194, 226, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

/* Placeholder avant chargement paresseux DearFlip */
.catalogue-flipbook-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 32px 24px;
  text-align: center;
  background: linear-gradient(145deg, rgba(26, 58, 92, 0.08) 0%, rgba(86, 194, 226, 0.06) 100%);
  border-radius: 16px;
  border: 1px dashed rgba(26, 58, 92, 0.2);
}

.catalogue-flipbook-placeholder[hidden] {
  display: none !important;
}

.catalogue-flipbook-placeholder__inner {
  max-width: 520px;
}

.catalogue-flipbook-placeholder__title {
  font-size: 1.05rem;
  color: #1a3a5c;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.catalogue-flipbook-placeholder__btn {
  background: linear-gradient(135deg, #1a3a5c 0%, #2c5282 100%);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(26, 58, 92, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalogue-flipbook-placeholder__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(26, 58, 92, 0.35);
}

/* Conteneur DearFlip : _df_book est rempli par le plugin (.df-container) */
.pdf-viewer-wrapper ._df_book,
.pdf-viewer-wrapper .df-container {
  display: block;
  width: 100%;
  min-height: 680px;
}

.pdf-viewer-wrapper .df-container {
  border-radius: inherit;
}

/* Désactiver le loader DearFlip dans notre zone */
.pdf-viewer-wrapper .df-container.df-loading:before,
.pdf-viewer-wrapper .df-container.df-loading:after {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.pdf-viewer-wrapper .df-container.df-loading .loading-info {
  display: none !important;
}

/* Garder le livre visible pendant tout chargement/re-render */
.pdf-viewer-wrapper .df-container.df-loading .df-book-wrapper {
  left: 0 !important;
}

/* Download Section - Ultra Modern 2025 */
.download-section {
  text-align: center;
  padding: 50px 0 40px 0;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s backwards;
  position: relative;
}

.download-btn {
  background: linear-gradient(135deg,
                              #1a3a5c 0%,
                              #0d1b2a 50%,
                              #1a3a5c 100%);
  color: white;
  border: 2px solid rgba(86, 194, 226, 0.3);
  padding: 20px 52px;
  border-radius: 60px;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 12px 40px rgba(26, 58, 92, 0.4),
              0 0 40px rgba(86, 194, 226, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  letter-spacing: 1px;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.download-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
                              #56c2e2 0%,
                              #0EA0E6 50%,
                              #56c2e2 100%);
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 60px;
  z-index: -1;
}

.download-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.download-btn:hover::before {
  opacity: 1;
}

.download-btn:hover::after {
  width: 400px;
  height: 400px;
}

.download-btn i,
.download-btn span {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.download-btn:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 20px 60px rgba(86, 194, 226, 0.6),
              0 0 80px rgba(86, 194, 226, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(86, 194, 226, 0.7);
  color: white;
  text-decoration: none;
}

.download-btn:active {
  transform: translateY(-3px) scale(1.02);
}

.download-btn i {
  font-size: 22px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-btn:hover i {
  transform: translateY(3px) scale(1.2);
  animation: bounceDownload 0.8s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.5));
}

@keyframes bounceDownload {
  0%, 100% { transform: translateY(0) scale(1.2); }
  50% { transform: translateY(6px) scale(1.2); }
}

/* Info Section - Futuristic 2025 */
.catalogue-info {
  text-align: center;
  padding: 40px 35px;
  background: linear-gradient(135deg,
                              rgba(248, 249, 250, 0.95) 0%,
                              rgba(255, 255, 255, 0.95) 50%,
                              rgba(248, 249, 250, 0.95) 100%);
  border-radius: 20px;
  border: 2px solid rgba(86, 194, 226, 0.15);
  box-shadow: 0 10px 40px rgba(26, 58, 92, 0.12),
              0 0 60px rgba(86, 194, 226, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s backwards;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.catalogue-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
                              #1a3a5c 0%,
                              #56c2e2 25%,
                              #0EA0E6 50%,
                              #56c2e2 75%,
                              #1a3a5c 100%);
  background-size: 200% 100%;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.catalogue-info::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%,
                              rgba(86, 194, 226, 0.1) 0%,
                              transparent 50%);
  opacity: 0.5;
}

.catalogue-info p {
  color: #4a5568;
  font-size: 17px;
  margin-bottom: 24px;
  line-height: 1.8;
  position: relative;
  z-index: 1;
  font-weight: 500;
}

.catalogue-info a {
  color: #1a3a5c;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 10px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg,
                              rgba(26, 58, 92, 0.05) 0%,
                              rgba(86, 194, 226, 0.05) 100%);
  border: 1.5px solid transparent;
  z-index: 1;
}

.catalogue-info a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
                              rgba(86, 194, 226, 0.15) 0%,
                              rgba(14, 160, 230, 0.15) 100%);
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.catalogue-info a::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: linear-gradient(90deg, #1a3a5c, #56c2e2, #0EA0E6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.catalogue-info a:hover::before { opacity: 1; }

.catalogue-info a:hover {
  color: #56c2e2;
  text-decoration: none;
  transform: translateX(5px) translateY(-2px);
  border-color: rgba(86, 194, 226, 0.3);
  box-shadow: 0 4px 20px rgba(86, 194, 226, 0.2);
}

.catalogue-info a:hover::after { transform: scaleX(1); }

.catalogue-info a i {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 16px;
}

.catalogue-info a:hover i {
  transform: translateX(5px) scale(1.2);
  color: #0EA0E6;
  filter: drop-shadow(0 2px 4px rgba(86, 194, 226, 0.5));
}

.catalogue-info span[style*="margin"] {
  color: rgba(26, 58, 92, 0.3);
  font-weight: 300;
  user-select: none;
}

/* Global Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 992px) {
  .catalogue-container {
    padding: 28px;
    border-radius: 20px;
  }

  .download-btn {
    padding: 16px 40px;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .catalogue-container {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .pdf-viewer-wrapper {
    border-radius: 12px;
  }

  .pdf-viewer-wrapper ._df_book {
    min-height: 520px;
  }

  .catalogue-info {
    padding: 30px 25px !important;
    border-radius: 16px !important;
  }

  .catalogue-info p {
    font-size: 16px !important;
    margin-bottom: 20px !important;
    line-height: 1.6 !important;
    padding: 0 10px !important;
  }

  .catalogue-info a {
    display: flex !important;
    justify-content: center !important;
    padding: 12px 20px !important;
    margin: 8px 0 !important;
    width: 100% !important;
    max-width: 280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: 15px !important;
  }

  .catalogue-info span[style*="margin"] {
    display: none !important;
  }

  .download-btn {
    width: 100%;
    justify-content: center;
    padding: 16px 32px;
    font-size: 15px;
    border-radius: 40px;
  }
}

@media (max-width: 576px) {
  .catalogue-section {
    padding: 50px 0;
  }

  .catalogue-info {
    padding: 25px 20px !important;
    border-radius: 12px !important;
  }

  .catalogue-info p {
    font-size: 15px !important;
    margin-bottom: 18px !important;
    line-height: 1.5 !important;
    padding: 0 5px !important;
  }

  .catalogue-info a {
    padding: 11px 18px !important;
    margin: 6px 0 !important;
    font-size: 14px !important;
    max-width: 100% !important;
    width: auto !important;
    min-width: 200px !important;
  }

  .catalogue-info a i {
    font-size: 14px !important;
  }

  .catalogue-container {
    padding: 16px 12px;
    border-radius: 14px;
  }

  .pdf-viewer-wrapper {
    border-radius: 10px;
  }

  .pdf-viewer-wrapper ._df_book {
    min-height: 460px;
  }

  .download-btn {
    padding: 14px 28px;
    font-size: 14px;
    border-radius: 35px;
  }
}

@media (max-width: 400px) {
  .download-btn {
    padding: 12px 24px;
    font-size: 13px;
  }

  .catalogue-info {
    padding: 20px 15px !important;
  }

  .catalogue-info p {
    font-size: 14px !important;
    margin-bottom: 16px !important;
  }

  .catalogue-info a {
    padding: 10px 16px !important;
    font-size: 13px !important;
    min-width: 180px !important;
  }
}
