/* Variables CSS */
:root {
    --primary-color: #2c5f8d;
    --primary-dark: #1e4263;
    --secondary-color: #d4a574;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

.dark-theme {
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
    --bg-color: #1a1a1a;
    --bg-light: #2a2a2a;
    --border-color: #404040;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.4);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
    width: 100%;
}

/* Header */
.header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-light);
}

.theme-icon-dark {
    display: none;
}

.dark-theme .theme-icon-light {
    display: none;
}

.dark-theme .theme-icon-dark {
    display: block;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 5rem 0;
    min-height: 500px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
    }
}

.hero-content {
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.hero-cta .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    animation: fadeIn 0.8s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.btn-secondary:hover {
    background: #c49564;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-whatsapp {
    background: #25D366;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-whatsapp:hover {
    background: #20BA5A;
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.realisations-preview,
.why-us {
    padding: 5rem 0;
}

.services-preview {
    background: var(--bg-light);
    padding: 5rem 0;
}

.services-preview .container {
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Réalisations Grid */
.realisations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.realisation-card {
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.realisation-card a {
    text-decoration: none;
    color: inherit;
}

.realisation-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.realisation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.realisation-type {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.realisation-content {
    padding: 1.5rem;
}

.realisation-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.realisation-content p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* Why Us */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.why-item {
    text-align: center;
    padding: 2rem;
}

.why-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.why-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Page Header */
.page-header {
    background: var(--primary-color);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.page-header .container {
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Realisation Detail */
.realisation-detail {
    padding: 3rem 0;
}

.realisation-header {
    margin-bottom: 2rem;
}

.realisation-type-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.realisation-date {
    color: var(--text-light);
}

/* Carousel */
.realisation-carousel {
    margin-bottom: 3rem;
}

.carousel-container {
    position: relative;
    max-width: 100%;
    margin-bottom: 1rem;
}

.carousel-slides {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-slide {
    display: none;
}

.carousel-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn.prev {
    left: 1rem;
}

.carousel-btn.next {
    right: 1rem;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.8);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.active {
    background: var(--primary-color);
}

.realisation-info {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.realisation-details {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.detail-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.back-link {
    color: white;
    text-decoration: none;
    opacity: 0.9;
}

.back-link:hover {
    opacity: 1;
}

/* Contact */
.contact-page {
    padding: 3rem 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-info h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-form {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 141, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

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

.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-map {
    margin-top: 3rem;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Services Page */
.services-page {
    padding: 3rem 0;
}

.service-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.service-section.reverse {
    direction: rtl;
}

.service-section.reverse > * {
    direction: ltr;
}

.service-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    margin-top: 1.5rem;
}

.service-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.service-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.services-cta {
    text-align: center;
    padding: 3rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-top: 3rem;
}

/* About Page */
.about-page {
    padding: 3rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.about-text h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-text h2:first-child {
    margin-top: 0;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.value-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.value-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Main - Flexbox pour footer fixe */
main {
    flex: 1;
    width: 100%;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 4rem 0 1.5rem;
    margin-top: auto;
}

.footer .container {
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

/* Scroll Top */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
    z-index: 1000;
}

.scroll-top.visible {
    display: flex;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* Legal Pages */
.legal-page {
    padding: 3rem 0;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content ul {
    margin-left: 2rem;
    margin-top: 1rem;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

/* Error Page */
.error-page {
    padding: 4rem 0;
    text-align: center;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility */
.text-center {
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 clamp(1rem, 4vw, 2rem);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        flex-direction: column;
        padding: 1rem clamp(1rem, 4vw, 2rem);
        box-shadow: var(--shadow);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-cta {
        justify-content: center;
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .services-preview,
    .realisations-preview,
    .why-us {
        padding: 3rem 0;
    }
    
    .realisations-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-wrapper,
    .realisation-info,
    .about-content,
    .service-section {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .about-values {
        grid-template-columns: 1fr;
    }
    
    .footer {
        padding: 3rem 0 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}

