/**
 * Styles spécifiques pour la page Services
 * Optimisé pour les performances avec animations GPU-accelerated
 */

/* ========== APPROACH SECTION ========== */
.services-intro {
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

.services-intro::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(234, 93, 111, 0.03) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

@media (min-width: 992px) {
    .approach-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.approach-card {
    background: var(--bg);
    padding: 3rem 2rem;
    border-radius: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.approach-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(234, 93, 111, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.approach-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(234, 93, 111, 0.3);
}

.approach-card:hover::before {
    opacity: 1;
}

.approach-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(234, 93, 111, 0.1);
    border-radius: 50%;
    color: var(--accent-red);
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.approach-card:nth-child(2) .approach-icon {
    background: rgba(0, 161, 77, 0.1);
    color: var(--accent-green);
}

.approach-card:nth-child(3) .approach-icon {
    background: rgba(251, 204, 64, 0.1);
    color: var(--accent-yellow);
}

.approach-card:nth-child(4) .approach-icon {
    background: rgba(234, 93, 111, 0.1);
    color: var(--accent-red);
}

.approach-card:hover .approach-icon {
    transform: scale(1.1) rotate(5deg);
}

.approach-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.approach-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1.4rem;
    position: relative;
    z-index: 1;
}

/* ========== SERVICES CAROUSEL ========== */
.services-carousel-section {
    padding: 10rem 0 8rem;
    position: relative;
    overflow: hidden;
    background: var(--surface);
}

.services-carousel-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -30%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(234, 93, 111, 0.03) 0%, transparent 70%);
    animation: rotate-slow 40s linear infinite;
    pointer-events: none;
}

.services-carousel-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -30%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 161, 77, 0.03) 0%, transparent 70%);
    animation: rotate-slow 40s linear infinite reverse;
    pointer-events: none;
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Services Navigation moderne */
.services-nav-modern {
    margin-bottom: 4rem;
    display: flex;
    justify-content: center;
}

.nav-track {
    display: inline-flex;
    position: relative;
    padding: 0.5rem;
    background: var(--surface);
    border-radius: 5rem;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .services-nav-modern {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -2rem 4rem;
        padding: 0 2rem;
    }
    
    .nav-track {
        border-radius: 1rem;
        min-width: max-content;
    }
}

.nav-indicator {
    position: absolute;
    top: 0.5rem;
    height: calc(100% - 1rem);
    background: var(--accent-red);
    border-radius: 5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    opacity: 0;
}

.nav-track.initialized .nav-indicator {
    opacity: 1;
}

@media (max-width: 768px) {
    .nav-indicator {
        border-radius: 0.8rem;
    }
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-radius: 5rem;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    color: var(--text-muted);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .nav-item {
        padding: 0.8rem 1.5rem;
        border-radius: 0.8rem;
    }
}

.nav-item.active {
    color: white;
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-label {
    font-size: 1.6rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .nav-label {
        display: none;
    }
}

/* Service Panels */
.services-content-modern {
    position: relative;
}

.service-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.service-panel.active {
    display: block;
}

.panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

@media (max-width: 992px) {
    .panel-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.panel-info h2 {
    font-size: clamp(2.8rem, 4vw, 4.2rem);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.panel-info > p {
    font-size: 1.8rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.panel-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-features {
    margin-bottom: 3rem;
}

.service-features h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
    margin-bottom: 3rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
}

.check-icon {
    color: var(--accent-green);
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.service-image {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: auto;
}

.service-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

.service-image.floating {
    animation: float 6s ease-in-out infinite;
}

.service-image.floating-delayed {
    animation: float 6s ease-in-out infinite;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Dark mode adjustments pour le carousel */
[data-theme="dark"] .services-carousel-section {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .nav-track {
    background: var(--surface);
}

[data-theme="dark"] .nav-indicator {
    background: var(--accent-red);
}

/* ========== PROCESS SECTION ========== */
.process-modern {
    background: var(--surface);
    position: relative;
}

.process-timeline {
    position: relative;
    padding: 4rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.process-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, var(--accent-red) 0%, var(--accent-yellow) 100%);
    transform: translateX(-50%);
    transition: height 2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    .process-line {
        left: 2rem;
    }
}

.process-step {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 6rem;
}

.process-step:nth-child(even) {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .process-step,
    .process-step:nth-child(even) {
        flex-direction: row;
    }
}

.step-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--bg);
    border: 3px solid var(--accent-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--accent-red);
    z-index: 2;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .step-marker {
        left: 2rem;
    }
}

.process-step:hover .step-marker {
    background: var(--accent-red);
    color: white;
    transform: translateX(-50%) scale(1.1);
}

.step-content {
    width: 45%;
    padding: 2.5rem;
    background: var(--bg);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.process-step:nth-child(odd) .step-content {
    margin-right: auto;
}

.process-step:nth-child(even) .step-content {
    margin-left: auto;
}

@media (max-width: 768px) {
    .step-content {
        width: calc(100% - 6rem);
        margin-left: 5rem !important;
        margin-right: 0 !important;
    }
}

.process-step:hover .step-content {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.step-content h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.step-content ul {
    list-style: none;
}

.step-content li {
    padding-left: 2rem;
    margin-bottom: 1rem;
    position: relative;
    color: var(--text-muted);
}

.step-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-red);
    font-weight: bold;
}

/* ========== TESTIMONIALS SECTION ========== */
.testimonials-modern {
    position: relative;
    padding: 10rem 0;
}

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .testimonials-slider {
        grid-template-columns: 1fr;
    }
}

.testimonial-card {
    background: var(--surface);
    padding: 3rem;
    border-radius: 2rem;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    display: none;
}

.testimonial-card.active {
    display: block;
}

@media (min-width: 768px) {
    .testimonial-card {
        display: block !important;
    }
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.testimonial-stars {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--accent-yellow);
}

.testimonial-card blockquote {
    font-size: 1.8rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 2.5rem;
    position: relative;
}

.testimonial-card blockquote::before {
    content: '"';
    position: absolute;
    top: -2rem;
    left: -1rem;
    font-size: 6rem;
    color: var(--accent-red);
    opacity: 0.2;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-yellow));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.8rem;
}

.testimonial-author h4 {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
}

.testimonial-author p {
    color: var(--text-muted);
    font-size: 1.4rem;
}

.testimonials-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .testimonials-navigation {
        display: none;
    }
}

.testimonial-prev,
.testimonial-next {
    background: none;
    border: 2px solid var(--border);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text);
}

.testimonial-prev:hover,
.testimonial-next:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    transform: scale(1.1);
}

.testimonial-dots {
    display: flex;
    gap: 1rem;
}

.testimonial-dots .dot {
    width: 10px;
    height: 10px;
    background: var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dots .dot.active {
    background: var(--accent-red);
    width: 30px;
    border-radius: 5px;
}

/* ========== FAQ SECTION ========== */
.faq-modern {
    background: var(--surface);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 2rem;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    padding: 2rem 2.5rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    transition: all 0.3s ease;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text);
}

.faq-question:hover {
    background: var(--surface);
}

.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 2.5rem;
}

.faq-answer p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.faq-answer ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.faq-answer li {
    padding-left: 2rem;
    margin-bottom: 1rem;
    position: relative;
}

.faq-answer li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-red);
}

/* ========== CTA SECTION ========== */
.cta {
    position: relative;
    overflow: hidden;
}

.cta-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-yellow));
    border-radius: 2rem;
    padding: 5rem 4rem;
    overflow: hidden;
    color: white;
}

@media (min-width: 768px) {
    .cta-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

.cta-content h2 {
    font-size: clamp(2.8rem, 4vw, 4.2rem);
    color: white;
    margin-bottom: 2rem;
}

.cta-content p {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.btn-light {
    background: white;
    color: var(--accent-red);
}

.btn-light:hover {
    background: #f5f5f5;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-outline-light {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--accent-red);
}

.cta-device {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-device img {
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
    transform: perspective(1000px) rotateY(-10deg);
    transition: transform 0.5s ease;
}

.cta-device:hover img {
    transform: perspective(1000px) rotateY(0deg);
}

.decoration-element {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rotate-slow 30s linear infinite;
}

/* Footer */
.footer {
    background: var(--surface);
    padding: 6rem 0 3rem;
    margin-top: 8rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 50%;
    color: var(--text);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-red);
    color: white;
    transform: translateY(-3px);
}

.footer-nav h4 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 0.8rem;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--accent-red);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 3rem;
    text-align: center;
    color: var(--text-muted);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-content {
    padding: 8rem 2rem 3rem;
}

.mobile-menu-nav {
    list-style: none;
    margin-bottom: 3rem;
}

.mobile-menu-nav li {
    margin-bottom: 2rem;
}

.mobile-menu-nav a {
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a[aria-current="page"] {
    color: var(--accent-red);
}

/* ========== ANIMATIONS STATES ========== */
[data-animate] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="fade-in"] {
    opacity: 0;
}

[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
}

[data-animate="fade-right"] {
    opacity: 0;
    transform: translateX(-30px);
}

[data-animate="fade-left"] {
    opacity: 0;
    transform: translateX(30px);
}

[data-animate="scale"] {
    opacity: 0;
    transform: scale(0.9);
}

[data-animate].animated {
    opacity: 1 !important;
    transform: translateY(0) translateX(0) scale(1) !important;
}

/* ========== OPTIMIZATIONS ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* GPU acceleration hints */
.service-device,
.approach-card,
.process-step,
.testimonial-card,
.faq-item {
    transform: translateZ(0);
    will-change: transform;
}

/* Dark mode adjustments */
[data-theme="dark"] .approach-card {
    background: var(--surface);
}

[data-theme="dark"] .process-step .step-content {
    background: var(--surface);
}

[data-theme="dark"] .testimonial-card {
    background: var(--surface);
}

[data-theme="dark"] .faq-item {
    background: var(--surface);
}