/* Global Styles */
body {
  font-family: 'Abel', sans-serif;
}

/* Documents Section Styles */
.documents-section {
  padding: 6rem 2rem 2rem;
  background-color: #f5f5f5;
  min-height: 100vh;
  font-family: 'Abel', sans-serif;
}

.section-title2 {
  text-align: center;
  font-size: 35px;
  display: inline-block;
  padding: 5px 40px 5px;
  border: 8px solid #233D63;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
  box-shadow: 8px 8px 8px rgba(0, 0, 0, 0.2);
  margin: 30px auto;
  font-family: 'Abel', sans-serif;
  width: auto;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.section-title2:hover {
  transform: translateX(-50%) scale(0.95);
}

.documents-container {
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: 3rem;
}

.documents-container:last-child {
  margin-bottom: 0;
}

.documents-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.document-card {
  background: white;
  border-radius: 6px;
  padding: 0.8rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 4px solid #ffffff;
  font-family: 'Abel', sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.document-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  transition: all 0.3s ease;
  z-index: 0;
}

.document-card:hover::before {
  animation: randomColor 0.5s forwards;
}

.document-card > * {
  position: relative;
  z-index: 1;
}

@keyframes randomColor {
  to {
    background: linear-gradient(
      45deg,
      rgba(var(--random-color-1), 0.2),
      rgba(var(--random-color-2), 0.2)
    );
  }
}

.document-icon {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.document-card h3 {
  color: #1a237e;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Abel', sans-serif;
}

.download-button {
  background-color: #1a237e;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-family: 'Abel', sans-serif;
}

.download-button:hover {
  background-color: #283593;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content {
  position: relative;
  background-color: white;
  margin: 15% auto;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 8px solid #233D63;
  font-family: 'Abel', sans-serif;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  font-family: 'Abel', sans-serif;
}

.close:hover {
  color: #000;
}

.modal-content h2 {
  color: #1a237e;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 1.8rem;
  font-family: 'Abel', sans-serif;
}

.modal-content p {
  margin-bottom: 1.5rem;
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  font-family: 'Abel', sans-serif;
}

.modal-content input {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  font-family: 'Abel', sans-serif;
}

.modal-content button {
  width: 100%;
  padding: 0.8rem;
  background-color: #1a237e;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-family: 'Abel', sans-serif;
}

.modal-content button:hover {
  background-color: #283593;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Section Subtitle Styles */
.section-subtitle {
  color: #2c3e50;
  font-size: 1.8rem;
  margin: 2rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #3498db;
  text-align: center;
}

/* Additional Info Styles */
.additional-info {
  text-align: left;
  color: #2c3e50;
  font-size: 1.1rem;
  margin-top: 1rem;
  padding-left: 1rem;
  font-style: italic;
}

/* AP Subtitle Styles */
.ap-subtitle {
  color: #233D63;
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem;
  text-align: center;
  font-family: 'Abel', sans-serif;
}

/* Section Separator */
.section-separator {
  width: 80%;
  max-width: 600px;
  height: 2px;
  background: linear-gradient(to right, transparent, #3498db, transparent);
  margin: 2rem auto;
}

/* Adjust grid spacing for AP sections */
.documents-grid {
  margin-bottom: 1.5rem;
}

/* AP Container for horizontal layout */
.ap-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.ap-section {
  flex: 1;
  max-width: 400px;
}

/* Vertical Separator */
.vertical-separator {
  width: 2px;
  align-self: stretch;
  background: linear-gradient(to bottom, transparent, #3498db, transparent);
  margin: 0 1rem;
  min-height: 200px;
}

/* Adjust grid for side by side layout */
.documents-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Ajustement pour l'épreuve E5 */
.documents-container:first-child .documents-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0 auto;
}

.documents-container:first-child .document-card {
  padding: 0.6rem;
  margin: 0;
  width: 100%;
  height: 100%;
}

.documents-container:first-child .document-icon {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.documents-container:first-child .document-card h3 {
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.documents-container:first-child .download-button {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .documents-section {
    padding: 5rem 1rem 1rem;
  }

  .section-title2 {
    font-size: 28px;
    padding: 5px 30px 5px;
    border: 6px solid #233D63;
    margin: 15px auto 20px;
  }

  .documents-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .document-card {
    aspect-ratio: auto;
    padding: 1.5rem;
  }

  .modal-content {
    margin: 30% auto;
    width: 95%;
    padding: 1.5rem;
    border: 6px solid #233D63;
  }

  .section-subtitle {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
  }
  
  .documents-container {
    margin-bottom: 2rem;
  }

  .additional-info {
    font-size: 1rem;
    margin-top: 0.8rem;
  }

  .ap-subtitle {
    font-size: 1.2rem;
    margin: 1.2rem 0 0.8rem;
  }

  .section-separator {
    margin: 1.5rem auto;
  }

  .ap-section {
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .section-title2 {
    font-size: 22px;
    padding: 5px 20px 5px;
    border: 4px solid #233D63;
    margin: 10px auto 15px;
  }

  .document-card {
    padding: 0.6rem;
    border: 4px solid #ffffff;
  }

  .document-icon {
    font-size: 1.3rem;
  }

  .document-card h3 {
    font-size: 0.8rem;
  }

  .download-button {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }

  .modal-content {
    margin: 40% auto;
    padding: 1rem;
    border: 4px solid #233D63;
  }

  .modal-content h2 {
    font-size: 1.5rem;
  }

  .modal-content p {
    font-size: 1rem;
  }

  .additional-info {
    font-size: 0.9rem;
    margin-top: 0.6rem;
  }

  .ap-subtitle {
    font-size: 1.1rem;
    margin: 1rem 0 0.6rem;
  }

  .section-separator {
    margin: 1.2rem auto;
    width: 90%;
  }

  .documents-grid {
    max-width: 250px;
  }

  .ap-section {
    max-width: 250px;
  }
}

@media (max-width: 1024px) {
  .ap-container {
    flex-direction: column;
    gap: 1rem;
  }

  .ap-section {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
  }

  .vertical-separator {
    display: none;
  }

  .documents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
} 