/* Variables */
:root {
    --primary-color: #3498db;
    --secondary-color: #9b59b6;
    --accent-color: #27ae60;
    --success-color: #1abc9c;
    --purple-color: #8e44ad;
    --text-color: #2c3e50;
    --light-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --white: #ffffff;
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Legal Page Styles */
.legal-page {
    padding: 120px 0 60px;
    min-height: 100vh;
    background-color: var(--light-color);
}

.legal-page .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.legal-page h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.legal-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.legal-section h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.legal-content strong {
    color: var(--primary-color);
}

.back-link {
    text-align: center;
    margin-top: 3rem;
}

.btn-primary {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 5%;
    min-height: var(--header-height);
}

.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo-img {
    height: auto;
    width: auto;
    max-height: 70px;
    max-width: 320px;
    object-fit: contain;
    transition: var(--transition);
}

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

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.nav-links a {
    color: var(--primary-color);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}
.burger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 40vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--white);
    padding: 2rem 5%;
    margin-top: var(--header-height);
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    animation: fadeInUp 1s ease;
}

.hero h1 .highlight {
    color: var(--accent-color);
    position: relative;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
    animation: fadeInUp 1s ease 0.3s both;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    animation: fadeInUp 1s ease 0.6s both;
    text-decoration: none;
}

.cta-button:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero-visual {
    flex: 0 0 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.printer-container {
    width: 300px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

.printer-image {
    width: 100%;
    height: auto;
    max-width: 280px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.printer-image:hover {
    transform: scale(1.05);
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Services Section */
.services {
    padding: 6rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.service-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 0;
    border-radius: 20px;
    text-align: left;
    border: 1px solid rgba(52, 152, 219, 0.15);
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #3498db, #9b59b6, #27ae60, #1abc9c);
    background-size: 300% 100%;
    animation: gradientShift 4s ease infinite;
}

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

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: rgba(52, 152, 219, 0.3);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto 1.5rem auto;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0 2rem;
}

.service-card p {
    padding: 0 2rem 2rem 2rem;
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Gallery Section */
.gallery {
    padding: 6rem 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.gallery h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Placeholder discret pour le chargement des images */
.image-placeholder {
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Optimisations pour les performances */
.gallery-item {
    contain: layout style paint;
    transform: translateZ(0);
}

.gallery-item:hover img {
    transform: scale(1.05) translateZ(0);
}

/* Optimisation pour les images en cours de chargement */
.gallery-item img[src=''] {
    visibility: hidden;
}

.gallery-item img:not([src='']) {
    visibility: visible;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: white;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* Modal pour affichage plein écran - optimisé */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
    will-change: opacity;
    backface-visibility: hidden;
}

/* Optimisations pour les performances de rendu */
.fullscreen-modal {
    will-change: opacity, transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.fullscreen-image {
    will-change: transform;
    backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2001;
}

.modal-close:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

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

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-light);
    pointer-events: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.8rem;
    font-size: 0.8rem;
    background: var(--white);
    padding: 0 0.5rem;
    color: var(--primary-color);
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-info {
    padding: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-right: 1rem;
    margin-top: 0.3rem;
}

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

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

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 4rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3,
.footer-section h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after,
.footer-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-section p {
    color: var(--light-color);
    margin-bottom: 1rem;
}

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

.footer-section a {
    color: var(--light-color);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    background-color: rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

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

/* Responsive Design */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        margin-left: 0;
    }

    .nav-links.active {
        left: 0;
    }

    .burger {
        display: flex;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .services-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 3rem 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-visual {
        margin-top: 2rem;
    }

    .hero-visual {
        flex: none;
    }

    .printer-container {
        width: 200px;
        height: 150px;
    }

    .printer-image {
        max-width: 180px;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}

/* Tooltip pour Coming Soon */
.social-link {
    position: relative;
    cursor: not-allowed;
}

.social-link::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-color);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.social-link::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-color);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.social-link:hover::after,
.social-link:hover::before {
    opacity: 1;
    visibility: visible;
}

.social-link:hover {
    background-color: #e74c3c !important;
    transform: translateY(-3px);
}
