body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: #cec9c4;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
}

.container {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0 auto;
}

/* Typography */
h1,
h2 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: #1f2937;
}

h3,
h4 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  gap: 8px;
  position: relative;
  overflow: hidden;
  min-height: 44px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: white;
  border: 2px solid transparent;
  width: 100%;
  text-decoration: none;
  box-sizing: border-box;
}

.btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #d97706, #c2410c);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.btn:active {
  transform: scale(0.97);
  filter: brightness(0.98);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  background: #e5e7eb !important;
  color: #b1b1b1 !important;
  cursor: not-allowed !important;
  border-color: #e5e7eb !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-whatsapp {
  background: #25d366;
  color: white;
  border: 2px solid #25d366;
}

.btn-whatsapp:hover:not(:disabled) {
  background: #128c7e;
  border-color: #128c7e;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.btn-dark {
  background: #1f2937;
  color: white;
  border: 2px solid #1f2937;
}

.btn-dark:hover:not(:disabled) {
  background: #111827;
  border-color: #111827;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.425);
}

/* section hero*/
.hero {
  position: relative;
  height: 87vh;
  min-height: 400px;
  margin-bottom: 0;
  margin-top: -1%;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 100%;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.video-background video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  padding: 15px;
  margin-left: 1%;
  padding-bottom: 10px;
  margin-top: 14%;
}

.hero-text h1 {
  text-align: center;
  font-size: 50px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-text .description {
  font-size: 25px;
  margin-bottom: 25px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  padding: 15px;
  border-radius: 8px;
  font-family: American Typewriter, serif;
  text-align: center;
}

section {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Contact Section */
.contact-section {
  padding: 80px 0;
  background: #cec9c4;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  color: #000000;
  margin-bottom: 16px;
}

.section-header p {
  color: #222a3b;
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info h3 {
  text-align: center;
  color: #1f2937;
  margin-bottom: 32px;
  font-size: clamp(2rem, 4vw, 2.5rem);
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.815);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid #f3f4f6;
}

.contact-method:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: #e7e7e7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 20px;
  color: #f59e0b;
}

.contact-details h4 {
  color: #1f2937;
  margin-bottom: 15px;
  margin-top: 5px;
}

.contact-details p,
.contact-details address {
  color: #6b7280;
  margin: 0;
  font-style: normal;
  line-height: 1.4;
}

.contact-details a {
  color: #6b7280;
  font-style: italic;
  font-size: 18px;
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-details a:hover {
  color: #002672;
}

.quick-contact {
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.quick-contact h4 {
  color: #1f2937;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-contact h4 i {
  color: #f59e0b;
}

.quick-contact p {
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.5;
}

.quick-buttons {
  display: flex;
  gap: 12px;
}

.contact-form-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid #f3f4f6;
}

.form-header {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: white;
  padding: 32px;
  text-align: center;
}

.form-header h3 {
  margin: 0;
  font-size: 24px;
}

.contact-form {
  padding: 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  font-family: inherit;
  min-height: 48px;
  box-sizing: border-box;
  width: 100%;
  color: #1f2937;
  background-color: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* Styles pour les placeholders */
.form-group input::placeholder,
.form-group textarea::placeholder,
.form-control::placeholder,
textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
}

/* Force la couleur du texte pour tous les inputs et textareas */
input, textarea, select {
  color: #1f2937 !important;
}

input:focus, textarea:focus, select:focus {
  color: #1f2937 !important;
}

.error-message {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 5px;
}

.privacy-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 20px;
  padding: 10px;
  background: #f9fafb;
  border-radius: 6px;
}

/* Newsletter Section */
.newsletter-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #4b5563, #1f2937);
  color: white;
  text-align: center;
}

.newsletter-content {
  max-width: 800px;
  margin: 0 auto;
}

.newsletter-header {
  margin-bottom: 48px;
}

.newsletter-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.9;
}

.newsletter-header h2 {
  margin-bottom: 24px;
  color: white;
}

.newsletter-header p {
  font-size: 18px;
  opacity: 0.9;
  line-height: 1.6;
}

.newsletter-form-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 48px;
}

.form-input-group {
  display: flex;
  gap: 16px;
  max-width: 500px;
  margin: 0 auto 24px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  min-height: 44px;
  box-sizing: border-box;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.8;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid #e5e7eb;
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  color: #1f2937;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.modal-body {
  padding: 24px;
}

/* --- Améliorations UX formulaire de réservation --- */
.form-container {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(30, 63, 170, 0.09),
    0 1.5px 8px rgba(245, 158, 11, 0.04);
  padding: 2.5rem 2rem;
  margin-top: 32px;
  border-top: 6px solid #f59e0b;
  transition: box-shadow 0.3s;
}

.section-title {
  color: #1e3faa;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.form-label {
  font-weight: 600;
  color: #1e3faa;
  margin-bottom: 0.4rem;
  display: block;
  letter-spacing: -0.5px;
}

.form-control,
.form-select,
textarea {
  padding: 0.85rem 1.1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1.07rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f9fafb;
  min-height: 44px;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
  width: 100%;
  color: #1f2937;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: #1e3faa;
  box-shadow: 0 0 0 3px rgba(30, 63, 170, 0.1);
  background: #fff;
  color: #1f2937;
}

.invalid-feedback {
  color: #e74c3c;
  font-size: 0.98em;
  margin-bottom: 0.5rem;
}

.alert {
  border-radius: 10px;
  font-size: 1.08em;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(231, 76, 60, 0.08);
  font-weight: 500;
  letter-spacing: -0.2px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/*section Mot du recteur*/
.rector-section {
  background-color: #cec9c4;
  padding: 60px 0;
  font-family: "Times New Roman", serif;
}

.home-rector__inner {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  padding: 40px;
  margin: 0 auto;
  max-width: 1200px;
  border-radius: 12px;
  gap: 40px;
}

.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.recteur-image {
  flex: 0 0 300px;
}

.recteur-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.home-rector__content {
  flex: 1;
}

.rector-title {
  font-size: 2.5rem;
  color: #d97d35;
  margin-bottom: 30px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: normal;
}

.rector-text {
  background-color: white;
  padding: 40px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  line-height: 1.8;
}

.rector-subtitle {
  font-size: 1.8rem;
  color: #8b0000;
  margin-bottom: 30px;
  line-height: 1.4;
  font-weight: normal;
  font-style: italic;
}

.rector-description {
  font-size: 1.2rem;
  color: #292929;
  margin-bottom: 1.5em;
  line-height: 1.7;
}

/* News Section */
.news-section {
  padding: 80px 0;
  background: #f8f9fa;
}

.news-section h1 {
  text-align: center;
  margin-bottom: 50px;
  color: #1f2937;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.news-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Styles pour les vidéos d'événements */
.event-video-container {
  position: relative;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
}

.event-video-container video {
  width: 100%;
  height: auto;
  max-height: 200px;
  display: block;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.event-video-container video:hover {
  transform: scale(1.02);
}

/* Overlay de contrôles vidéo personnalisés */
.event-video-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
  z-index: 1;
}

.card-body {
  padding: 20px;
}

.news-date {
  color: #f59e0b;
  font-weight: 600;
  margin-bottom: 10px;
}

.card-title {
  color: #1f2937;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.card-text {
  color: #6b7280;
  line-height: 1.5;
}

/* Animations */
.animate-fadein {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Animations d'entrée & défilement ajoutées --- */
[data-animate] {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variantes corrigées */
[data-animate="fade-in"] {
  transform: translateY(0);
}

[data-animate="fade-up"] {
  transform: translateY(25px);
}

[data-animate="fade-down"] {
  transform: translateY(-25px);
}

[data-animate="fade-left"] {
  transform: translateX(-40px);
}

[data-animate="fade-right"] {
  transform: translateX(40px);
}

[data-animate="zoom-in"] {
  transform: scale(0.85);
}

[data-animate="fade-up"].is-visible,
[data-animate="fade-down"].is-visible,
[data-animate="fade-left"].is-visible,
[data-animate="fade-right"].is-visible,
[data-animate="zoom-in"].is-visible {
  transform: translateY(0) translateX(0) scale(1);
}

/* Gestion des délais via attribut (fallback simple) */
[data-delay] {
  transition-delay: inherit;
}

/* Préférence utilisateur : réduire les animations */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    transition: none;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Accessibilité */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Amélioration du contraste pour l'accessibilité */
@media (prefers-contrast: high) {
  .btn {
    border-width: 3px;
  }

  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    outline: 3px solid #f59e0b;
  }
}

/* Support pour le mode sombre */
@media (prefers-color-scheme: dark) {
  .contact-form-container,
  .form-container {
    background: #1f2937;
    color: white;
  }

  .form-group label {
    color: #e5e7eb;
  }

  .form-control,
  .form-select,
  textarea {
    background: #374151;
    border-color: #4b5563;
    color: white;
  }
}

/* Optimisation du chargement des images */
img {
  max-width: 100%;
  height: auto;
}

/* Responsive Design - Ajout des media queries manquantes */
@media (max-width: 768px) {
  .hero-text h1 {
    font-size: 36px;
  }

  .hero-text .description {
    font-size: 20px;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .home-rector__inner {
    flex-direction: column;
    text-align: center;
  }

  .recteur-image {
    flex: none;
    max-width: 250px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-content {
    margin-left: 0;
    margin-top: 20%;
  }

  .hero-text h1 {
    font-size: 28px;
  }

  .hero-text .description {
    font-size: 18px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}
