/* ===== ACCUEIL MODERNE & PRO (VERSION FINALE) ===== */

/* --- 1. CONFIGURATION GLOBALE --- */
:root {
    --primary-color: #CF8CD6;
    --primary-dark: #a66fb0;
    --text-dark: #333;
    --text-grey: #666;
    --bg-light: #f9fbfc; /* Gris bleuté très léger */
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #CF8CD6 0%, #9e6cbd 100%);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(207, 140, 214, 0.2);
}

/* Animations d'apparition */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.reveal-delay-1 { animation-delay: 0.2s; }
.reveal-delay-2 { animation-delay: 0.4s; }

/* --- 2. HERO SECTION (Haut de page) --- */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    background-color: var(--white);
    position: relative;
    overflow: hidden;
}

/* Conteneur flexible pour gérer l'alignement */
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Forme décorative floue en arrière-plan */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(207, 140, 214, 0.15) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
}

.hero-tagline {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-grey);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

/* Styles des boutons */
.btn-primary {
    padding: 1rem 2rem;
    background: var(--gradient);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(207, 140, 214, 0.4);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(207, 140, 214, 0.6);
}

.btn-secondary {
    padding: 1rem 2rem;
    background: white;
    color: var(--text-dark);
    border: 2px solid #eee;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fff5fc;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.hero-img {
    max-width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    box-shadow: var(--shadow-soft);
    animation: morphing 8s ease-in-out infinite;
}

@keyframes morphing {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* --- 3. SECTION SERVICES (Grille centrée) --- */
.services-section {
    background-color: var(--bg-light);
    padding: 5rem 0;
}

/* Centrage global */
.services-section .header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient);
    margin: 15px auto 0;
    border-radius: 4px;
}

/* Grille 3 colonnes */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
}

.service-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(207, 140, 214, 0.15);
    border-color: rgba(207, 140, 214, 0.3);
}

.icon-box {
    width: 80px;
    height: 80px;
    background: #fdf5fe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: var(--primary-color);
    font-size: 2rem;
    transition: all 0.4s ease;
    box-shadow: inset 0 0 20px rgba(207, 140, 214, 0.1);
}

.service-card:hover .icon-box {
    background: var(--gradient);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(207, 140, 214, 0.4);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.service-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* --- 4. SECTION PROJETS (Modifié pour le fond rose & alignement) --- */
.projects-section {
    padding: 6rem 0;
    background-color: var(--white);
    position: relative;
}

/* Centrage vertical du contenu */
.projects-section .header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.projects-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes strictes */
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 3rem; /* Espace avant le bouton */
}

.project-preview-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 260px; /* Hauteur harmonisée */
    background-color: #f0f0f0;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.05);
}

/* CORRECTION FOND ROSE : object-fit cover va remplir tout le cadre */
.project-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(40, 0, 40, 0.85), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    align-items: flex-start;
}

.project-preview-card:hover img { transform: scale(1.05); }
.project-preview-card:hover .project-overlay { opacity: 1; }

.project-info h4 {
    color: white;
    font-size: 1.3rem;
    margin: 0;
    font-weight: 600;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.project-info span {
    color: #CF8CD6;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

.project-preview-card:hover .project-info h4 { transform: translateY(0); }

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    border: 1px solid rgba(255,255,255,0.5);
    transition: all 0.3s ease;
    z-index: 2;
}

.project-preview-card:hover .play-btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.2);
}

/* --- 5. SECTION À PROPOS --- */
.about-section {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-img-wrapper {
    position: relative;
}

.about-img-wrapper img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 2;
}

.about-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    z-index: 1;
    opacity: 0.5;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about-text p {
    color: var(--text-grey);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* --- 6. RESPONSIVE (MOBILE & TABLETTE) --- */
@media (max-width: 992px) {
    /* Hero : Colonne inversée sur mobile */
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        padding-right: 0;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-title { font-size: 2.5rem; }
    .hero-desc { font-size: 1rem; }

    .hero-image-container { width: 100%; justify-content: center; }
    .hero-img { max-height: 350px; width: 80%; }
    .hero-buttons { justify-content: center; flex-wrap: wrap; }

    /* Services & Projets : 2 colonnes sur tablette */
    .services-grid, .projects-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* About : 1 colonne */
    .about-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Services & Projets : 1 colonne sur mobile */
    .services-grid, .projects-preview-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-header { margin-bottom: 3rem; }
    .section-title { font-size: 2rem; }

    .hero { padding: 2rem 0; }

    .project-preview-card { height: 220px; }
}