/* ==========================================================================
   RÉALISATIONS PAGE STYLES
   ========================================================================== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 25%, #7c3aed 50%, #db2777 75%, #dc2626 100%);
    padding: 120px 0 80px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.03"><circle cx="30" cy="30" r="2"/></g></svg>') repeat;
    animation: patternMove 30s linear infinite;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Stats Section */
.stats-section {
    padding: 60px 0;
    background: var(--background);
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .stats-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

[data-theme="dark"] .stat-item {
    background: linear-gradient(145deg, #2d2d2d, #3d3d3d);
    border: 1px solid #404040;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

[data-theme="dark"] .stat-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-color: #505050;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    opacity: 0;
    transition: opacity 0.6s ease;
}

[data-theme="dark"] .stat-number {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(254, 163, 71, 0.3);
}

.stat-item.animate .stat-number {
    opacity: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

[data-theme="dark"] .stat-label {
    color: #b0b0b0;
}

/* Filters Section */
.filters-section {
    padding: 40px 0;
    background: linear-gradient(180deg, var(--surface) 0%, var(--background) 100%);
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.3s ease;
}

[data-theme="dark"] .filters-section {
    background: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
    border-bottom: 1px solid #404040;
}

.filters-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e2e8f0 50%, transparent 100%);
    transition: background 0.3s ease;
}

[data-theme="dark"] .filters-section::before {
    background: linear-gradient(90deg, transparent 0%, #404040 50%, transparent 100%);
}

.filters-wrapper {
    display: flex;
    justify-content: center;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: linear-gradient(145deg, var(--surface), var(--background));
    border: 2px solid #e2e8f0;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

[data-theme="dark"] .filter-btn {
    background: linear-gradient(145deg, #3d3d3d, #2d2d2d);
    border: 2px solid #505050;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.filter-btn::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;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    background: linear-gradient(145deg, #f0f9ff, #e0f2fe);
    border-color: #3b82f6;
    color: #1d4ed8;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .filter-btn:hover {
    background: linear-gradient(145deg, #4d4d4d, #5d5d5d);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 8px 25px rgba(254, 163, 71, 0.2);
}

.filter-btn.active {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    border-color: #1d4ed8;
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(29, 78, 216, 0.4);
    position: relative;
}

[data-theme="dark"] .filter-btn.active {
    background: linear-gradient(145deg, var(--primary), #e09940);
    border-color: var(--primary);
    color: #1a1a1a;
    box-shadow: 0 8px 25px rgba(254, 163, 71, 0.4);
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 46px;
    pointer-events: none;
}

.filter-btn:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

/* Réalisations Section */
.realisations-section {
    padding: 80px 0;
    background: var(--background);
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .realisations-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.realisations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Realisation Card */
.realisation-card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
    border: 1px solid transparent;
}

[data-theme="dark"] .realisation-card {
    background: linear-gradient(145deg, #2d2d2d, #3d3d3d);
    border: 1px solid #404040;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.realisation-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.realisation-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

[data-theme="dark"] .realisation-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    border-color: #505050;
}

.card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: var(--highlight);
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .card-image {
    background: #3d3d3d;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.7), rgba(var(--primary-rgb), 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.card-actions {
    display: flex;
    gap: 1rem;
}

.btn-action {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: scale(1.1);
}

.card-content {
    padding: 2rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-sector {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .card-sector {
    background: rgba(254, 163, 71, 0.2);
    color: var(--primary);
}

.card-year {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

[data-theme="dark"] .card-year {
    color: #b0b0b0;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.card-client {
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 1rem;
    font-size: 1rem;
    transition: color 0.3s ease;
}

[data-theme="dark"] .card-client {
    color: var(--primary);
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

[data-theme="dark"] .card-description {
    color: #b0b0b0;
}

.card-services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.service-tag {
    background: linear-gradient(135deg, #FEA347, #ff8c42);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(254, 163, 71, 0.2);
}

[data-theme="dark"] .service-tag {
    background: linear-gradient(135deg, #FEA347, #e09940);
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(254, 163, 71, 0.3);
}

.service-tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(254, 163, 71, 0.3);
}

[data-theme="dark"] .service-tag:hover {
    box-shadow: 0 4px 12px rgba(254, 163, 71, 0.4);
}

.card-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fff5eb 0%, #fed7aa 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

[data-theme="dark"] .card-result {
    background: linear-gradient(135deg, rgba(254, 163, 71, 0.15) 0%, rgba(254, 163, 71, 0.08) 100%);
    border-left: 4px solid var(--primary);
    border: 1px solid rgba(254, 163, 71, 0.3);
    backdrop-filter: blur(10px);
}

.card-result i {
    color: var(--primary);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

[data-theme="dark"] .card-result i {
    color: var(--primary);
}

.card-result span {
    font-weight: 600;
    color: #8b4513;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

[data-theme="dark"] .card-result span {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--surface);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

[data-theme="dark"] .modal-content {
    background: linear-gradient(145deg, #2d2d2d, #3d3d3d);
    border: 1px solid #404040;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    color: #aaa;
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: var(--surface);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

[data-theme="dark"] .modal-close {
    background: #3d3d3d;
    border: 1px solid #505050;
    color: #ccc;
}

.modal-close:hover {
    background: #f8fafc;
    color: #3b82f6;
    transform: scale(1.1);
}

[data-theme="dark"] .modal-close:hover {
    background: #4d4d4d;
    color: var(--primary);
    border-color: var(--primary);
}

.modal-header {
    padding: 2rem 2rem 1rem;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.modal-sector {
    color: #3b82f6;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

[data-theme="dark"] .modal-sector {
    color: var(--primary);
}

.modal-image {
    margin: 0 2rem 2rem;
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    padding: 0 2rem 2rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--highlight);
    padding-bottom: 0.5rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .detail-section h3 {
    border-bottom: 2px solid #4a4a4a;
}

.detail-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    transition: color 0.3s ease;
}

[data-theme="dark"] .detail-section p {
    color: #b0b0b0;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.services-list,
.technologies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

[data-theme="dark"] .tech-tag {
    background: linear-gradient(135deg, var(--primary), #e09940);
    color: #1a1a1a;
}

.result-highlight {
    background: linear-gradient(135deg, #fff5eb 0%, #fed7aa 100%);
    color: #8b4513 !important;
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    font-weight: 600;
    margin: 0.5rem 0 0 0;
    transition: all 0.3s ease;
}

[data-theme="dark"] .result-highlight {
    background: linear-gradient(135deg, rgba(254, 163, 71, 0.15) 0%, rgba(254, 163, 71, 0.08) 100%);
    color: #ffffff !important;
    border-left: 4px solid var(--primary);
    border: 1px solid rgba(254, 163, 71, 0.3);
    backdrop-filter: blur(10px);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.modal-actions {
    margin-top: 2rem;
    text-align: center;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern-dots.svg') repeat;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.btn-primary:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .realisations-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .detail-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-header,
    .modal-details {
        padding: 1.5rem;
    }
    
    .modal-image {
        margin: 0 1.5rem 1.5rem;
        height: 200px;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}