﻿/* ===== INDEX.PHP - CSS UNIFIÉ =====
   Fusion de: index.css + responsive.css + chatbot.css
   Date: 30 novembre 2025
=================================== */

/* ===== PARTIE 1: STYLES DE BASE (index.css) ===== */
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;
  }
}


/* ===== PARTIE 2: STYLES RESPONSIVE ===== */
/* ===== RESPONSIVE STYLES ===== */

/* Variables CSS pour une gestion cohÃ©rente */
:root {
  --mobile-breakpoint: 768px;
  --tablet-breakpoint: 1024px;
  --mobile-padding: 15px;
  --section-padding-mobile: 40px 0;
  --section-padding-tablet: 60px 0;
}

/* Navigation mobile */
@media (max-width: 768px) {
  /* Si vous avez une navigation, ajoutez ces styles */
  .nav-mobile-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    padding: 80px 20px 20px;
    overflow-y: auto;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
  }
  
  .nav-overlay.active {
    display: block;
  }
}

/* Hero Section - AmÃ©liorations mobiles */
@media (max-width: 768px) {
  .hero {
    height: 94vh;
    min-height: 300px;
  }
  
  .hero-content {
    margin-top: 25%;
    padding: 10px;
    text-align: center;
  }
  
  .hero-text h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 10px;
  }
  
  .hero-text .description {
    font-size: 1.1rem;
    padding: 10px;
    margin-bottom: 20px;
  }
}

/* Section Ã‰vÃ©nements - AmÃ©liorations mobiles */
@media (max-width: 768px) {
  .news-section {
    padding: var(--section-padding-mobile);
  }
  
  .news-section h1 {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 var(--mobile-padding);
  }
  
  .news-card {
    margin-bottom: 20px;
  }
  
  .card-body {
    padding: 15px;
  }
  
  .card-title {
    font-size: 1.2rem;
  }
}

/* Section Mot du Recteur - AmÃ©liorations mobiles */
@media (max-width: 768px) {
  .rector-section {
    padding: var(--section-padding-mobile);
  }
  
  .home-rector__inner {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    text-align: center;
  }
  
  .recteur-image {
    flex: 0 0 auto;
    margin-bottom: 20px;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .rector-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }
  
  .rector-subtitle {
    font-size: 1.3rem;
    margin-bottom: 20px;
  }
  
  .rector-description {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  .rector-text {
    padding: 20px;
  }
}

/* Section Contact - AmÃ©liorations mobiles */
@media (max-width: 768px) {
  .contact-section {
    padding: var(--section-padding-mobile);
  }
  
  .section-header {
    margin-bottom: 30px;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  .section-header p {
    font-size: 1rem;
    padding: 0 var(--mobile-padding);
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .contact-info h3 {
    font-size: 1.5rem;
  }
  
  .contact-methods {
    gap: 15px;
  }
  
  .contact-method {
    padding: 15px;
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
  }
  
  .contact-details h4 {
    margin-bottom: 8px;
    margin-top: 0;
  }
  
  .quick-contact {
    padding: 20px;
  }
  
  .quick-buttons {
    flex-direction: column;
  }
  
  .contact-form-container {
    margin-top: 20px;
  }
  
  .form-header {
    padding: 20px;
  }
  
  .form-header h3 {
    font-size: 1.3rem;
  }
  
  .contact-form {
    padding: 20px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
}

/* Newsletter Section - AmÃ©liorations mobiles */
@media (max-width: 768px) {
  .newsletter-section {
    padding: var(--section-padding-mobile);
  }
  
  .newsletter-header {
    margin-bottom: 30px;
  }
  
  .newsletter-icon {
    font-size: 48px;
    margin-bottom: 15px;
  }
  
  .newsletter-header h2 {
    font-size: 1.8rem;
  }
  
  .newsletter-header p {
    font-size: 1rem;
    padding: 0 var(--mobile-padding);
  }
  
  .newsletter-form-container {
    padding: 20px;
    margin-bottom: 30px;
  }
  
  .form-input-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .newsletter-form input {
    width: 100%;
  }
  
  .privacy-note {
    font-size: 0.9rem;
    text-align: center;
  }
}

/* Footer - AmÃ©liorations mobiles */
@media (max-width: 768px) {
  .footer {
    padding: 40px 0 20px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
  }
  
  .footer-brand {
    text-align: center;
    max-width: 100%;
  }
  
  .footer-brand p {
    margin-bottom: 20px;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-contact {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 0;
    margin-bottom: 20px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding-top: 20px;
  }
  
  .footer-legal {
    flex-direction: column;
    gap: 10px;
  }
}

/* Chatbot - AmÃ©liorations mobiles */
@media (max-width: 768px) {
  .chatbot-window {
    width: 90vw;
    height: 70vh;
    right: 5vw;
    bottom: 80px;
  }
  
  .chatbot-quick-replies {
    flex-wrap: wrap;
  }
  
  .quick-reply {
    flex: 1 0 calc(50% - 5px);
    margin-bottom: 5px;
    font-size: 0.8rem;
    padding: 8px 5px;
  }
}

/* Modal - AmÃ©liorations mobiles */
@media (max-width: 768px) {
  .modal-content {
    margin: 10px;
    max-height: 85vh;
  }
  
  .modal-header {
    padding: 15px 15px 0;
  }
  
  .modal-body {
    padding: 15px;
  }
}

/* Back to Top Button - AmÃ©liorations mobiles */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 70px;
    right: 15px;
    width: 44px;
    height: 44px;
  }
}

/* AmÃ©liorations pour trÃ¨s petits Ã©crans */
@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.5rem;
  }
  
  .hero-text .description {
    font-size: 1rem;
  }
  
  .section-header h2,
  .news-section h1,
  .newsletter-header h2 {
    font-size: 1.5rem;
  }
  
  .contact-info h3 {
    font-size: 1.3rem;
  }
  
  .rector-title {
    font-size: 1.5rem;
  }
  
  .rector-subtitle {
    font-size: 1.1rem;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    min-height: 40px;
  }
}

/* AmÃ©liorations pour les tablettes */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 95%;
  }
  
  .hero-content {
    margin-left: 5%;
  }
  
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-content {
    gap: 30px;
  }
  
  .home-rector__inner {
    padding: 30px;
  }
}

/* AmÃ©lioration de la performance du dÃ©filement */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Support pour l'orientation paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    height: 100vh;
  }
  
  .hero-content {
    margin-top: 10%;
  }
  
  .chatbot-window {
    height: 60vh;
  }
}

/* Responsive Design gÃ©nÃ©ral */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .hero-content {
    margin-left: 0;
    margin-top: 20%;
    text-align: center;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-input-group {
    flex-direction: column;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .home-rector__inner {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .recteur-image {
    flex: 0 0 auto;
    margin-bottom: 20px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .quick-buttons {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text .description {
    font-size: 1.1rem;
    padding: 10px;
  }

  .contact-method {
    padding: 15px;
  }

  .contact-form {
    padding: 20px;
  }

  .modal-content {
    margin: 10px;
  }
}

/* Correction supplÃ©mentaire pour mobile */
@media (max-width: 768px) {
    body {
        position: relative;
        width: 100%;
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    /* S'assurer que tous les Ã©lÃ©ments enfants ne dÃ©bordent pas */
    .hero-content,
    .news-grid,
    .home-rector__inner,
    .contact-content,
    .footer-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* ===== PARTIE 3: CHATBOT ===== */
/* Style du chat bot amÃ©liorÃ© */
.chatbot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.chatbot-toggle {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1001;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.chatbot-toggle:focus {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

.chatbot-toggle .notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  max-height: 500px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.chatbot-window.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.chatbot-header {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.chatbot-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
}

.chatbot-title h4 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
}

.chatbot-title p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chatbot-title p::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0.3;
  }
}

.chatbot-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.chatbot-close:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #f8fafc;
  max-height: 300px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  animation: messageAppear 0.3s ease forwards;
  position: relative;
  word-wrap: break-word;
}

@keyframes messageAppear {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bot-message {
  background: white;
  color: #374151;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.bot-message::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 12px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid white;
}

.user-message {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.user-message::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 12px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid #f59e0b;
}

.message-time {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
  text-align: right;
}

.chatbot-quick-replies {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: white;
}

.quick-reply {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 32px;
  font-weight: 500;
}

.quick-reply:hover {
  background: #f1f5f9;
  border-color: #f59e0b;
  color: #f59e0b;
  transform: translateY(-1px);
}

.quick-reply:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.chatbot-input {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
  align-items: center;
  background: white;
}

.chatbot-input input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 25px;
  font-size: 14px;
  min-height: 44px;
  transition: all 0.3s ease;
  background: #f8fafc;
}

.chatbot-input input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
  background: white;
}

.chatbot-input input::placeholder {
  color: #94a3b8;
}

.chatbot-input button {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.chatbot-input button:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.chatbot-input button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.chatbot-input button:focus {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

/* Indicateur de frappe amÃ©liorÃ© */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border-radius: 18px;
  align-self: flex-start;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.typing-text {
  font-size: 12px;
  color: #64748b;
  font-style: italic;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: 0s;
}
.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* Ã‰tats vides */
.chatbot-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

.chatbot-empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.chatbot-empty-state p {
  margin: 0;
  font-size: 14px;
}

/* Notification */
.chatbot-notification {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ping 1s infinite;
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive amÃ©liorÃ© */
@media (max-width: 480px) {
  .chatbot {
    right: 16px;
    bottom: 16px;
  }

  .chatbot-window {
    width: calc(100vw - 32px);
    right: 16px;
    max-height: 70vh;
    bottom: 72px;
  }

  .chatbot-toggle {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .chatbot-messages {
    max-height: 40vh;
    padding: 16px;
  }

  .message {
    max-width: 90%;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .chatbot-window {
    width: calc(100vw - 20px);
    right: 10px;
  }

  .chatbot-input {
    padding: 12px;
  }

  .chatbot-input input {
    font-size: 13px;
  }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
  .chatbot-window {
    background: #1f2937;
    border-color: #374151;
  }

  .chatbot-messages {
    background: #111827;
  }

  .bot-message {
    background: #374151;
    color: #f3f4f6;
    border-color: #4b5563;
  }

  .chatbot-input input {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
  }

  .quick-reply {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
  }
}

