/* Réinitialisation et configuration de base */
:root {
    --brand-gray: #F4F4F7;
    --brand-navy: #1A2B48;
    --brand-accent: #A96B40;
    --white: #FFFFFF;
    --text-gray: #4a5568;
    --border-gray: #d1d5db;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--brand-navy);
    background-color: var(--white);
    margin: 0;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utilitaires généraux */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
}

section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.text-center {
    text-align: center;
}

/* HEADER (Identique) */
.header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
}
.main-nav {
    display: none; /* Caché sur mobile */
}
.main-nav a {
    color: var(--brand-navy);
    margin-left: 2rem;
    transition: color 0.3s ease;
}
.main-nav a:hover {
    color: var(--brand-accent);
}
.mobile-menu-btn {
    display: block; /* Visible sur mobile */
    border: none;
    background: none;
    cursor: pointer;
}

/* SECTION 1: HERO (Identique) */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background-image: linear-gradient(rgba(26, 43, 72, 0.7), rgba(26, 43, 72, 0.7)), url('https://images.unsplash.com/photo-1572177812156-58036aae439c?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}
.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}
.hero h2 {
    font-size: 1.125rem;
    font-weight: 300;
    max-width: 48rem;
    margin: 0 auto 2rem;
}
.cta-button {
    background-color: var(--brand-accent);
    color: var(--white);
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.cta-button:hover {
    background-color: #8e5a36; /* Darker accent */
    transform: scale(1.05);
}

/* TITRES DE SECTION (Identique) */
.section-title {
    font-size: 2.25rem;
    font-weight: bold;
    color: var(--brand-navy);
    margin-bottom: 1rem;
}
.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 42rem;
    margin: 0 auto 3rem;
}

/* --- DEBUT NOUVEAU SLIDER CSS --- */

/* SECTION 2: TALENTS */
#talents .container {
    /* On supprime la max-width pour cette section */
    max-width: none;
    padding: 0; /* Pas de padding sur le conteneur de section */
}

/* Le conteneur 100% qui contient flèches + wrapper */
.slider-full-width-container {
    position: relative;
    width: 100%;
    /* On aligne les flèches et le wrapper */
    display: flex;
    align-items: center;
    justify-content: center;
    /* On ajoute un padding haut/bas si besoin */
    padding: 1rem 0; 
}

/* Les flèches */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    
    /* Style du bouton */
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-gray);
    color: var(--brand-navy);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    
    /* Par défaut (mobile), les flèches sont cachées */
    display: none;
}
.slider-arrow:hover {
    background-color: var(--white);
    color: var(--brand-accent);
    transform: translateY(-50%) scale(1.1);
}
/* Positionnement 5% (version CSS) */
#slider-prev-btn {
    left: 5vw; /* 5% de la largeur de la fenêtre */
}
#slider-next-btn {
    right: 5vw; /* 5% de la largeur de la fenêtre */
}

/* La "fenêtre" de 80% */
.slider-wrapper-80 {
    width: 80%;
    overflow: hidden; /* Cache tout ce qui dépasse ! */
    padding-top: 16px;
}

/* La grille qui défile (contient TOUTES les cartes) */
.talents-grid {
    display: flex; /* Par défaut (mobile), c'est flex */
    flex-wrap: nowrap;
    width: max-content; /* Pour le mode swipe mobile */
    
    /* Pour le défilement */
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateX(0); /* Le JS va modifier ça */
    
    /* Mobile: swipe et snap */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;  /* IE et Edge */
    scrollbar-width: none;  /* Firefox */
}
/* Cacher la scrollbar sur webkit (Chrome, Safari) */
.talents-grid::-webkit-scrollbar {
    display: none;
}


/* La carte (conteneur SANS padding/style) */
.talent-card {
    /* Mobile: 1 carte (80% du wrapper) + snap */
    flex: 0 0 100%; /* La carte prend 100% du wrapper-80 */
    scroll-snap-align: center; /* S'aimante au centre */
    box-sizing: border-box;
    /* On ajoute un padding pour voir les cartes voisines */
    padding: 0 0.5rem; 
}

/* Le contenu de la carte (AVEC padding/style) */
/* C'EST LA CORRECTION DE VOTRE BUG VISUEL */
.talent-card-content {
    background-color: var(--brand-gray);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%; /* Prend 100% de son parent .talent-card */
    box-sizing: border-box;
}

/* Hover (appliqué sur .talent-card si c'est un <a>) */
a.talent-card:hover .talent-card-content {
    /*animation: bounce-on-hover 2s ease-in-out infinite;*/
    transform: translateY(-8px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.1);
}

.talent-card-content img {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 4px solid var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    object-fit: cover;
}
.talent-card-content h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.talent-card-content p {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.4;
}
.talent-card-content p.description {
    /* Limite la description à 3 lignes */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.4em * 3); /* 3 lignes * hauteur de ligne */
}

/* --- FIN NOUVEAU SLIDER CSS --- */


/* SECTION 3: AVANTAGES (Identique) */
#avantages {
     background-color: var(--brand-gray);
}
.advantages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
.advantage-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.advantage-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.1);
    animation: bounce-on-hover 2s ease-in-out infinite;
}
.advantage-card .icon {
    flex-shrink: 0;
    color: var(--brand-accent);
    width: 3rem;
    height: 3rem;
}
.advantage-card h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0 0 0.5rem;
}
.advantage-card p {
    color: var(--text-gray);
    margin: 0;
}

/* SECTION 4: FORMULAIRE (Identique) */
.contact-form-container {
    max-width: 42rem;
    margin: 3rem auto 0;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.form-input, .form-textarea {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-gray);
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 2px rgba(169, 107, 64, 0.5);
    outline: none;
}
.form-submit-btn {
    border: none;
    cursor: pointer;
    padding: 0.75rem 3rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 500;
    background-color: var(--brand-accent);
    color: var(--white);
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.form-submit-btn:hover {
    background-color: #8e5a36;
    transform: scale(1.05);
}

/* FOOTER (Identique) */
.footer {
    background-color: var(--brand-navy);
    color: var(--white);
    padding: 3rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}
.footer-grid h3, .footer-grid h4 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}
.footer-grid p, .footer-grid ul {
    color: #a0aec0; /* Lighter gray */
    margin: 0;
    padding: 0;
    list-style: none;
}
.footer-grid ul li {
    margin-bottom: 0.5rem;
}
.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.social-icons a {
    color: #a0aec0;
    transition: color 0.3s ease;
}
.social-icons a:hover {
    color: var(--white);
}
.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    font-size: 0.875rem;
    color: #a0aec0;
    text-align: center;
}
.footer-bottom a {
    transition: color 0.3s ease;
}
.footer-bottom a:hover {
    color: var(--white);
}

/* RESPONSIVE DESIGN (Modifié pour le slider) */
@media (min-width: 640px) {
    /* .talents-grid { grid-template-columns: repeat(2, 1fr); } <- Supprimé, géré par JS */
    .form-grid { grid-template-columns: repeat(2, 1fr); }
    .form-group.full-width { grid-column: 1 / -1; }
}

@media (min-width: 768px) {
    .mobile-menu-btn { display: none; }
    .main-nav { display: flex; }
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(3, 1fr); text-align: left;}
    .social-icons { justify-content: flex-start; }
    .hero h1 { font-size: 3.75rem; }
    .hero h2 { font-size: 1.5rem; }
    .section-title { font-size: 2.5rem; }

    /* --- Styles Desktop pour le SLIDER --- */
    
    /* On affiche les flèches */
    .slider-arrow {
        display: flex;
    }
    
    /* On passe .talents-grid en CSS GRID */
    .talents-grid {
        display: grid;
        /* Le JS va définir `grid-template-columns` */
        width: 100%; /* La grille prend 100% du wrapper-80 */
        overflow: visible; /* On annule le swipe mobile */
        gap: 1.5rem; /* Le GAP est géré par la grille ! */
    }
    
    /* On annule les styles mobile pour les cartes */
    .talent-card {
        flex-basis: auto; /* On annule le flex-basis */
        scroll-snap-align: unset; /* On annule le snap */
        padding: 0; /* La grille gère le gap */
    }
}

@media (min-width: 1024px) {
    /* .talents-grid { grid-template-columns: repeat(4, 1fr); } <- Supprimé, géré par JS */
}

@media (min-width: 1536px) {
    /* .container pour #avantages et #rejoindre */
    #avantages .container,
    #rejoindre .container {
        max-width: 1400px;
    }
}

/* Animation classes for scroll effects */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */
@keyframes bounce-on-hover {
  0%, 100% {
    /* Position de base du hover (celle qu'on a déjà) */
    transform: translateY(-8px); 
  }
  50% {
    /* Point le plus haut du rebond */
    transform: translateY(-16px); 
  }
}