/* styles/style.css */

/* Variables CSS */
:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #3b82f6;
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --text-light: #9ca3af;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hidden {
  display: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  letter-spacing: -0.025em;
}

.contact-quick a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.contact-quick a:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 8rem 1.5rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

.hero h2 {
  font-size: clamp(2rem, 4vw, 3rem); /* Gros impact ! */
  font-weight: 600;
  margin-bottom: 1rem;
  opacity: 0.95;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.subtitle {
  font-size: clamp(1.5rem, 3vw, 2rem); /* Plus visible */
  margin-bottom: 3rem;
  opacity: 0.8;
  font-weight: 300; /* Plus fin pour contraster avec le h2 */
  letter-spacing: 0.01em;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.location-info {
    margin: 1.5rem 0;
    text-align: center;
}

.main-subtitle {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.sub-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.location-icon {
    font-size: 1.2rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: white;
  color: var(--primary-color);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: white;
}

/* Sections */
section {
  padding: 5rem 0;
}

section:nth-child(even) {
  background-color: var(--bg-light);
}

section:nth-child(odd) {
  background-color: var(--bg-dark);
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-dark);
  letter-spacing: -0.025em;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Police Apple-like */
.about-text {
  text-align: center;
  margin: 0 auto;
  max-width: 900px;
}

.about-text p {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  font-size: clamp(1.75rem, 4vw, 3rem); /* Responsive entre 28px et 48px */
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  margin-bottom: 2rem;
  
  /* Effet graduel Apple */
  background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary-color) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Version alternative encore plus Apple-like */
.about-hero-style {
  padding: 6rem 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.about-hero-style .about-text p {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 4rem); /* Encore plus gros ! */
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  
  /* Texte noir pur style Apple */
  color: #1d1d1f;
  -webkit-text-fill-color: #1d1d1f;
  background: none;
}

/* Animation d'apparition smooth */
.about-text p {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.about-text p:nth-child(2) {
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-image {
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  border-radius: var(--border-radius);
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  text-align: center;
}

/* Services Grid */
/* .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
} */

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  
  /* --- AJOUTS POUR LE CENTRAGE --- */
  max-width: 720px; /* On donne une largeur maximale à la grille */
  margin: 0 auto;   /* On la centre horizontalement */
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.service-card p {
  color: var(--text-gray);
  line-height: 1.6;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.info-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.info-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.info-card p {
  color: var(--text-gray);
  margin-bottom: 0.5rem;
}

.google-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.google-link:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Photo */

.profile-photo-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.profile-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.0); /* Taille normale par défaut */
    transition: all 0.4s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 0px solid white;
    z-index: 2;
    position: relative;
}

.photo-ring {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.00);
    opacity: 0.8;
    transition: all 0.4s ease;
    z-index: 1;
}

.profile-photo:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* .profile-photo-container:hover .photo-ring {
    transform: translate(-50%, -50%) scale(1.0);
    opacity: 0.6;
} */

/* Section Formations */

.formations {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    padding: 40px 20px;
}

/* Ligne centrale */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--primary-color) 10%,
        var(--primary-color) 90%,
        transparent 100%
    );
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 42%;
    margin-bottom: 40px;
    opacity: 0;
    animation: slideIn 0.8s ease-out forwards;
}

.timeline-location {
    margin-top: 10px;
    padding: 4px 8px;
    background: #f8f9fa;
    color: #666;
    font-size: 0.8em;
    border-radius: 4px;
    display: inline-block;
    font-style: italic;
}

.timeline-location::before {
    content: "📍 ";
    margin-right: 4px;
}

/* Alternance gauche/droite */
.timeline-item:nth-child(odd) {
    margin-left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    margin-left: 58%;
    text-align: left;
}

/* Points sur la ligne - CORRECTEMENT POSITIONNÉS */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border: 3px solid white;
    border-radius: 50%;
    top: 18px;
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* Point pour les éléments à gauche - va vers la droite jusqu'à la ligne */
.timeline-item:nth-child(odd)::after {
    right: -80px;
    top: 70px;
}

/* Point pour les éléments à droite - va vers la gauche jusqu'à la ligne */
.timeline-item:nth-child(even)::after {
    left: -80px;
    top: 70px;
}

/* Dates */
.timeline-date {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.85em;
    margin-bottom: 12px;
}

/* Contenu */
.timeline-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

/* Flèches pointant vers la ligne centrale */
.timeline-content::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    top: 22px;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -12px;
    border-left: 12px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -12px;
    border-right: 12px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

.timeline-content:hover {
    transform: translateY(-0px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.timeline-content h3 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
    font-size: 1.1em;
    line-height: 1.3;
}

.timeline-content p {
    margin: 0;
    color: #666;
    line-height: 1.4;
    font-size: 0.95em;
}

/* Animation d'apparition */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================================
   VERSION MOBILE FINALE ET COMPLÈTE POUR LA TIMELINE
   (Ce bloc ne modifie que les écrans < 768px)
   ==================================================== */

@media (max-width: 768px) {
    /* On déplace la ligne centrale sur la gauche */
    .timeline::before {
        left: 20px;
        transform: none;
    }

    /* On aligne tous les éléments à gauche */
    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding-left: 50px;
        text-align: left;
    }

    /* === LA CORRECTION FINALE POUR LES POINTS (UNIQUEMENT SUR MOBILE) === */
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: -10px;  /* On force la position à gauche */
        top: 70px;   /* On ajuste la position verticale */
        right: auto; /* On annule la position 'right' de la version desktop */
    }

    /* On s'assure que la flèche pointe bien vers la gauche */
    .timeline-item .timeline-content::before,
    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -12px;
        border-right: 12px solid white;
        border-left: none;
    }
    
    /* On annule tout positionnement spécial pour la date */
    .timeline-item:nth-child(odd) .timeline-date,
    .timeline-item:nth-child(even) .timeline-date {
        position: static;
        width: auto;
        text-align: left;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation delay for each item */
.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }
.timeline-item:nth-child(4) { animation-delay: 0.8s; }
.timeline-item:nth-child(5) { animation-delay: 1s; }

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Carte Google */

.zone-intervention {
    padding: 80px 0;
    background: white;
}

.zone-intervention h2 {
    text-align: center;
    margin-bottom: 20px;
}

.zone-intervention p {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 40px;
    color: #666;
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.zone-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.info-item {
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.info-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.info-item p {
    margin: 0;
    color: #666;
    font-size: 0.95em;
}

/* Contact form */
.contact {
  background: linear-gradient(135deg, var(--bg-light) 0%, white 100%);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
footer {
  background-color: var(--text-dark);
  color: white;
  text-align: center;
  padding: 2rem 0;
}

footer p {
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero h2 {
    font-size: 1.25rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .services-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  section {
    padding: 3rem 0;
  }
  
  h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 6rem 1rem 4rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .service-card,
  .info-card {
    padding: 1.5rem;
  }
}

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

.service-card,
.info-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling enhancement */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ========================================
   STYLE POUR LA LISTE DES VILLES (Version légère)
   ======================================== */

.location-list {
  /* On centre le texte et on limite sa largeur pour la lisibilité */
  text-align: center;
  max-width: 800px; 
  margin: 0 auto 40px auto; /* Centrage et marge en bas avant la carte */

  /* Typographie plus subtile */
  font-size: 1.1rem;      /* Taille de police agréable */
  line-height: 1.7;       /* Espace entre les lignes si le texte passe sur 2 lignes */
  color: var(--text-gray);  /* On utilise la couleur de texte secondaire */
  font-style: italic;    /* L'italique convient bien pour une liste descriptive */

  /* La touche de style : de fines lignes pour encadrer */
  padding: 1.5rem 0; /* Espace au-dessus et en-dessous du texte */
  border-top: 1px solid var(--border-color); /* Ligne fine au-dessus */
  border-bottom: 1px solid var(--border-color); /* Ligne fine en-dessous */
}