/* assets/css/accueil.css */

/* =========================================
   1. HERO SECTION
   ========================================= */
.cpw-hero {
    padding: 180px 0 100px 0;
    position: relative;
    background: radial-gradient(circle at top right, rgba(var(--cpw-primary-rgb), 0.04) 0%, transparent 60%);
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Grille Hero : 2 colonnes */
.cpw-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Colonne Contenu (Gauche) */
.cpw-hero-content {
    text-align: left;
    z-index: 2;
}

/* Badge */
.cpw-hero-badge-wrapper {
    margin-bottom: 1.5rem;
    animation: fadeUp 0.8s ease forwards;
}
.cpw-hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(var(--cpw-primary-rgb), 0.1);
    color: var(--cpw-primary);
    border: 1px solid rgba(var(--cpw-primary-rgb), 0.2);
    border-radius: 50px;
    font-size: 0.85rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* Titre H1 */
.cpw-hero h1 {
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 800; 
    line-height: 1.2;
    margin-bottom: 1.5rem;
    opacity: 0; 
    animation: fadeUp 0.8s ease 0.1s forwards;
    max-width: 800px; 
}

.cpw-highlight {
    background: linear-gradient(120deg, var(--cpw-primary) 0%, #6f42c1 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    position: relative; display: inline-block;
}

/* Paragraphe Lead */
.cpw-lead {
    font-size: 1.15rem; color: var(--cpw-text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem; line-height: 1.6;
    opacity: 0; animation: fadeUp 0.8s ease 0.2s forwards;
}

/* Boutons */
.cpw-hero-actions {
    display: flex; gap: 1rem;
    margin-bottom: 2.5rem;
    opacity: 0; animation: fadeUp 0.8s ease 0.3s forwards;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Indicateurs de confiance */
.cpw-trust-indicators {
    display: flex; gap: 2rem;
    opacity: 0; animation: fadeUp 0.8s ease 0.4s forwards;
    flex-wrap: wrap; justify-content: flex-start;
}
.cpw-trust-item {
    font-size: 0.9rem; font-weight: 500;
    color: var(--cpw-text-muted);
    display: flex; align-items: center; gap: 0.5rem;
}
.cpw-trust-item i { color: var(--cpw-primary); }

/* Colonne Image (Droite) */
.cpw-hero-visual {
    position: relative; text-align: center;
    opacity: 0; animation: fadeInRight 1s ease 0.5s forwards;
}
.cpw-hero-visual img {
    width: 100%; max-width: 600px; height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.08));
    animation: floatImg 6s ease-in-out infinite;
}

/* =========================================
   2. SERVICES SECTION
   ========================================= */
.cpw-section { padding: 100px 0; position: relative; z-index: 2; }

.cpw-title-wrapper { text-align: center; margin-bottom: 4rem; }
.cpw-section-tag {
    display: inline-block; color: var(--cpw-primary);
    font-weight: 700; text-transform: uppercase;
    font-size: 0.85rem; margin-bottom: 0.5rem; letter-spacing: 1px;
}
.cpw-title-wrapper h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 1rem; font-weight: 800; line-height: 1.2; }
.cpw-title-wrapper p { color: var(--cpw-text-muted); font-size: 1.1rem; }

.cpw-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem; margin-bottom: 3rem;
}

.cpw-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid var(--cpw-border-color);
    border-radius: var(--cpw-radius);
    padding: 2.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cpw-card:hover {
    transform: translateY(-8px);
    border-color: var(--cpw-primary);
    box-shadow: var(--cpw-shadow-lg);
    background: var(--cpw-bg);
}

.cpw-icon-box {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, rgba(var(--cpw-primary-rgb), 0.1), rgba(var(--cpw-primary-rgb), 0.05));
    color: var(--cpw-primary);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; margin-bottom: 1.5rem;
    border: 1px solid rgba(var(--cpw-primary-rgb), 0.1);
}

.cpw-services-cta { text-align: center; margin-top: 1rem; }
.cpw-btn-link {
    font-weight: 700; color: var(--cpw-primary);
    font-size: 1.1rem; text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.5rem;
    transition: gap 0.3s;
}
.cpw-btn-link:hover { gap: 1rem; }

/* =========================================
   3. FEATURES (ZIG-ZAG)
   ========================================= */
.cpw-feature-row {
    display: flex; align-items: center; gap: 4rem;
    margin-bottom: 6rem;
}
.cpw-feature-row:last-child { margin-bottom: 0; }
.cpw-feature-row.cpw-reverse { flex-direction: row-reverse; }

.cpw-feature-text { flex: 1; }
.cpw-feature-image { flex: 1; text-align: center; }
.cpw-feature-image img {
    max-width: 100%; height: auto;
    border-radius: var(--cpw-radius);
}

.cpw-feature-text h2 { font-size: clamp(1.8rem, 3vw, 2.2rem); margin-bottom: 1.5rem; font-weight: 700; line-height: 1.3; }
.cpw-feature-text p { color: var(--cpw-text-muted); margin-bottom: 1.5rem; font-size: 1.05rem; }

.cpw-icon-wrapper {
    display: inline-block; padding: 10px; border-radius: 12px;
    background: rgba(var(--cpw-primary-rgb), 0.1);
    color: var(--cpw-primary);
    margin-bottom: 1rem; font-size: 1.2rem;
}

.cpw-feature-list li {
    margin-bottom: 1rem; display: flex; gap: 1rem;
    color: var(--cpw-text-muted);
}
.cpw-feature-list i { color: var(--cpw-primary); margin-top: 4px; flex-shrink: 0; }
.cpw-feature-list strong { color: var(--cpw-text); }

/* =========================================
   4. TESTIMONIALS
   ========================================= */
.cpw-testimonials-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.cpw-testimonial-card {
    background: var(--cpw-bg);
    border: 1px solid var(--cpw-border-color);
    border-radius: var(--cpw-radius);
    padding: 2.5rem; position: relative;
    box-shadow: var(--cpw-shadow-sm);
    transition: background-color 0.3s;
    height: 100%;
}

.cpw-quote-icon {
    font-size: 1.5rem; color: rgba(var(--cpw-primary-rgb), 0.2);
    margin-bottom: 1rem;
}

.cpw-review {
    font-size: 1.1rem; line-height: 1.6;
    margin-bottom: 2rem; font-style: italic;
    color: var(--cpw-text);
}

.cpw-author strong { display: block; color: var(--cpw-text); }
.cpw-author span { font-size: 0.9rem; color: var(--cpw-text-muted); }

/* =========================================
   5. CTA
   ========================================= */
.cpw-cta-section {
    padding: 5rem 2rem; margin: 5rem auto;
    max-width: var(--cpw-container);
    background: linear-gradient(135deg, var(--cpw-primary) 0%, #4a90e2 100%);
    color: white; text-align: center;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(var(--cpw-primary-rgb), 0.3);
}

.cpw-cta-content h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 1rem; color: white; }
.cpw-cta-content p { font-size: 1.2rem; margin-bottom: 2.5rem; opacity: 0.95; }

/* BOUTONS SPECIFIQUES */
.cpw-btn-primary {
    display: inline-block; padding: 1rem 2.2rem;
    background: var(--cpw-primary); color: white;
    border-radius: var(--cpw-radius-btn); font-weight: 600;
    box-shadow: 0 10px 20px rgba(var(--cpw-primary-rgb), 0.3);
    transition: transform 0.2s; border: none;
}
.cpw-btn-primary:hover { transform: translateY(-3px); background: #0069d9; }

.cpw-btn-outline {
    display: inline-block; padding: 1rem 2.2rem;
    background: transparent; color: var(--cpw-text);
    border: 1px solid var(--cpw-border-color);
    border-radius: var(--cpw-radius-btn); font-weight: 600;
    transition: all 0.2s;
}
.cpw-btn-outline:hover { border-color: var(--cpw-primary); color: var(--cpw-primary); }

.cpw-btn-white {
    display: inline-block; padding: 1rem 2.5rem;
    background: white; color: var(--cpw-primary);
    border-radius: var(--cpw-radius-btn); font-weight: 700;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.cpw-btn-white:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }

/* ANIMATIONS */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes floatImg { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

/* =========================================
   6. PORTFOLIO SECTION
   ========================================= */
.portfolio-card {
    background: var(--cpw-bg);
    border: 1px solid var(--cpw-border-color);
    border-radius: var(--cpw-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--cpw-shadow-lg);
    border-color: var(--cpw-primary);
}

.portfolio-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-img {
    transform: scale(1.05);
}

/* Overlay au survol */
.portfolio-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-btn {
    width: 50px; height: 50px;
    background: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--cpw-primary);
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-btn {
    transform: translateY(0);
}

/* Contenu */
.portfolio-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-category {
    font-size: 0.8rem;
    color: var(--cpw-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.portfolio-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--cpw-text);
}

.portfolio-desc {
    font-size: 0.95rem;
    color: var(--cpw-text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* Tags Techniques */
.portfolio-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.portfolio-tags span {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(var(--cpw-primary-rgb), 0.08);
    color: var(--cpw-text-muted);
    border-radius: 20px;
    font-weight: 600;
}

/* Adaptation Dark Mode spécifique */
[data-theme="dark"] .portfolio-card {
    background-color: #1e293b;
    border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .portfolio-tags span {
    background: rgba(255,255,255,0.05);
    color: #cbd5e1;
}

/* =========================================
   7. MODE SOMBRE
   ========================================= */
[data-theme="dark"] .cpw-hero {
    background: radial-gradient(circle at top right, rgba(var(--cpw-primary-rgb), 0.1) 0%, transparent 60%);
}

[data-theme="dark"] .cpw-card,
[data-theme="dark"] .cpw-testimonial-card,
[data-theme="dark"] .home-blog-card {
    background-color: #1e293b; 
    border-color: rgba(255,255,255,0.1);
    box-shadow: none;
}

[data-theme="dark"] .cpw-card:hover,
[data-theme="dark"] .home-blog-card:hover {
    background-color: #1e293b;
    border-color: var(--cpw-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

[data-theme="dark"] .cpw-hero h1,
[data-theme="dark"] .cpw-title-wrapper h2,
[data-theme="dark"] .cpw-feature-text h2 { color: #f1f5f9; }

[data-theme="dark"] .cpw-lead,
[data-theme="dark"] .cpw-title-wrapper p,
[data-theme="dark"] .cpw-feature-text p,
[data-theme="dark"] .cpw-review,
[data-theme="dark"] .cpw-hero-badge,
[data-theme="dark"] .cpw-trust-item { color: #cbd5e1; }

[data-theme="dark"] .cpw-author strong,
[data-theme="dark"] .cpw-feature-list strong { color: #f1f5f9; }

[data-theme="dark"] .home-blog-title { color: #f1f5f9; }
[data-theme="dark"] .home-blog-date { color: #94a3b8; }
[data-theme="dark"] .home-blog-img { 
    background-color: #0f172a; 
    border-bottom-color: rgba(255,255,255,0.1); 
}

[data-theme="dark"] .cpw-btn-outline {
    color: #f1f5f9;
    border-color: rgba(255,255,255,0.2);
}
[data-theme="dark"] .cpw-btn-outline:hover {
    border-color: var(--cpw-primary);
    color: var(--cpw-primary);
}

/* =========================================
   8. RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .cpw-hero {
        padding: 120px 0 60px 0; 
    }
    .cpw-hero-grid { 
        grid-template-columns: 1fr; 
        text-align: center;
        gap: 3rem;
    }
    .cpw-hero-content { 
        text-align: center;
        order: 1;
    }
    .cpw-hero-visual { 
        order: 2;
        margin-top: 0;
    }
    .cpw-hero-visual img {
        max-width: 80%; 
    }
    .cpw-lead { margin-left: auto; margin-right: auto; }
    .cpw-hero-actions { justify-content: center; }
    .cpw-trust-indicators { justify-content: center; gap: 1rem; }
    .cpw-trust-item { font-size: 0.85rem; }

    .cpw-section { padding: 60px 0; } 
    .cpw-title-wrapper { margin-bottom: 3rem; }

    .cpw-feature-row, .cpw-feature-row.cpw-reverse {
        flex-direction: column; text-align: center; gap: 2.5rem; margin-bottom: 4rem;
    }
    .cpw-feature-list { text-align: left; display: inline-block; }
    
    .cpw-btn-primary, .cpw-btn-outline, .cpw-btn-white { 
        width: 100%; 
        justify-content: center;
    }
    
    .cpw-cta-section {
        margin: 3rem 15px; 
        padding: 3rem 1.5rem;
    }
}