/* Services Page Specific Styles */

/* Variables CSS */
:root {
    --primary: #215cca;
    --primary-dark: #1a4a9c;
    --secondary: #6c63ff;
    --accent: #f31212;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --text: #555;
    --text-light: #777;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --bronze: #cd7f32;
    --silver: #c0c0c0;
    --gold: #ffd700;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* Hero Section - TEXTE EN BLANC */
.services-hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 180px 0 100px;
    position: relative;
    overflow: hidden;
}

.services-hero-section: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 1200 800"><polygon fill="rgba(255,255,255,0.05)" points="0,800 0,0 1200,0 1200,800"/><circle fill="rgba(255,255,255,0.03)" cx="600" cy="400" r="300"/></svg>');
}

.services-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    color: white; /* TEXTE EN BLANC */
}

.services-hero-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
    color: white; /* TEXTE EN BLANC */
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.hero-scroll-indicator {
    margin-top: 50px;
}

.scroll-to-poles {
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
    display: inline-block;
    padding: 10px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Poles Navigation Section */
.poles-navigation-section {
    padding: 100px 0;
    background: var(--light);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark);
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 50px;
}

.poles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.pole-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--text);
    border: 2px solid transparent;
    display: block;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.pole-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.pole-card:hover:before {
    left: 100%;
}

.pole-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: var(--primary);
    color: var(--text);
    text-decoration: none;
}

.pole-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
    transition: var(--transition);
}

.pole-card:hover .pole-icon {
    transform: scale(1.1) rotate(5deg);
}

.pole-card h4 {
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark);
}

.pole-card p {
    color: var(--text-light);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.pole-card-badge {
    display: block;
    background: rgba(33, 92, 202, 0.1);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 15px;
    transition: var(--transition);
}

.pole-card:hover .pole-card-badge {
    background: var(--primary);
    color: white;
}

/* Pole Detail Container */
.pole-detail-container {
    padding: 60px 0;
    background: white;
    min-height: 80vh;
}

/* Header du pôle */
.pole-header {
    padding: 20px 0;
}

.pole-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark);
    margin: 20px 0;
}

.pole-header .pole-description {
    font-size: 1.3rem;
    color: var(--text-light);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.pole-badge {
    background: var(--accent);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
}

/* Section Services */
.services-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    height: 100%;
}

.services-list h4 {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 25px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.services-list h4 i {
    color: var(--primary);
    margin-right: 10px;
}

.services-list ul {
    list-style: none;
    padding: 0;
}

.services-list li {
    padding: 15px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid #f0f0f0;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.services-list li.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.services-list li:last-child {
    border-bottom: none;
}

.services-list li i {
    color: var(--success);
    margin-right: 15px;
    font-size: 1.1rem;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Processus Horizontal avec survol */
.processus-horizontal {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f5ff 100%);
    padding: 40px 30px;
    border-radius: 15px;
    margin-top: 40px;
}

.processus-horizontal h4 {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.processus-horizontal h4 i {
    color: var(--primary);
    margin-right: 10px;
}

.processus-timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-top: 40px;
}

.processus-timeline:before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50px;
    right: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    z-index: 1;
}

.processus-step-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    flex: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    cursor: pointer;
}

.processus-step-horizontal.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.step-number-horizontal {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 25px rgba(33, 92, 202, 0.3);
    border: 4px solid white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.step-number-horizontal:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(33, 92, 202, 0.4);
}

/* Tooltip pour le survol des numéros */
.step-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--dark);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.step-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--dark);
}

.step-number-horizontal:hover .step-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-15px);
}

.step-content-horizontal {
    background: white;
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-top: 4px solid var(--primary);
    max-width: 250px;
    min-height: 120px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.step-content-horizontal p {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 500;
}

/* Animation pour les étapes horizontales */
.processus-step-horizontal:nth-child(1) { transition-delay: 0.1s; }
.processus-step-horizontal:nth-child(2) { transition-delay: 0.2s; }
.processus-step-horizontal:nth-child(3) { transition-delay: 0.3s; }
.processus-step-horizontal:nth-child(4) { transition-delay: 0.4s; }
.processus-step-horizontal:nth-child(5) { transition-delay: 0.5s; }

/* Image du pôle */
.pole-image {
    position: relative;
    text-align: center;
}

.pole-image img {
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: var(--transition);
    opacity: 0;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
}

.pole-image img.loaded {
    opacity: 1;
}

.pole-image:hover img {
    transform: scale(1.03);
}

/* Actions */
.pole-actions {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

/* CTA Section - TEXTE EN BLANC */
.services-cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white; /* TEXTE EN BLANC */
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.cta-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0.9;
    color: white; /* TEXTE EN BLANC */
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Enhanced dropdown for services */
.navbar .services-dropdown .dropdown-menu {
    min-width: 280px;
}

.navbar .services-dropdown .dropdown-item {
    padding: 12px 20px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.navbar .services-dropdown .dropdown-item:hover {
    border-left-color: var(--primary);
    background: rgba(33, 92, 202, 0.05);
    transform: translateX(5px);
}

/* Back to poles button */
#back-to-poles {
    margin-bottom: 30px;
    transition: var(--transition);
}

#back-to-poles:hover {
    transform: translateX(-5px);
}

/* Animation pour le nouveau layout */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.services-section.animate-up.animated {
    animation: slideInFromLeft 0.8s ease-out;
}

.pole-image.animate-up.animated {
    animation: slideInFromRight 0.8s ease-out;
}

.processus-horizontal.animate-up.animated {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-up.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design pour le nouveau layout */
@media (max-width: 1200px) {
    .processus-timeline:before {
        left: 40px;
        right: 40px;
    }
    
    .step-content-horizontal {
        max-width: 220px;
        padding: 20px 15px;
    }
}

@media (max-width: 992px) {
    .services-hero-title {
        font-size: 3rem;
    }
    
    .pole-header h2 {
        font-size: 2.4rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .processus-timeline {
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
    }
    
    .processus-timeline:before {
        display: none;
    }
    
    .processus-step-horizontal {
        flex: 0 0 calc(50% - 30px);
        margin-bottom: 30px;
    }
    
    .step-content-horizontal {
        max-width: 100%;
        min-height: auto;
    }
    
    .step-tooltip {
        display: none; /* Cacher les tooltips sur mobile */
    }
}

@media (max-width: 768px) {
    .services-hero-section {
        padding: 150px 0 80px;
    }
    
    .services-hero-title {
        font-size: 2.5rem;
    }
    
    .services-hero-subtitle {
        font-size: 1.2rem;
    }
    
    .poles-navigation-section {
        padding: 80px 0;
    }
    
    .poles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pole-card {
        padding: 30px 20px;
    }
    
    .pole-detail-container {
        padding: 30px 0;
    }
    
    .pole-header h2 {
        font-size: 2rem;
    }
    
    .pole-header .pole-description {
        font-size: 1.1rem;
    }
    
    .services-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .processus-horizontal {
        padding: 30px 20px;
    }
    
    .processus-step-horizontal {
        flex: 0 0 100%;
    }
    
    .step-number-horizontal {
        width: 70px;
        height: 70px;
        font-size: 1.3rem;
    }
    
    .services-list li {
        font-size: 1rem;
        padding: 12px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .services-hero-title {
        font-size: 2rem;
    }
    
    .pole-header h2 {
        font-size: 1.8rem;
    }
    
    .services-list h4 {
        font-size: 1.2rem;
    }
    
    .processus-horizontal h4 {
        font-size: 1.2rem;
    }
    
    .step-number-horizontal {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .step-content-horizontal {
        padding: 15px 12px;
    }
    
    .step-content-horizontal p {
        font-size: 0.9rem;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}

/* Performance Optimizations */
.pole-image img {
    transform: translateZ(0);
}

.pole-card {
    will-change: transform;
}

/* Focus styles for accessibility */
.pole-card:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(33, 92, 202, 0.5);
}

.step-number-horizontal:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading states */
body:not(.loaded) .animate-up {
    opacity: 0;
}

body.loaded .animate-up {
    transition: all 0.8s ease;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}