/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #374151;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Empêcher le scroll de fond quand le menu mobile est ouvert */
body.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Variables CSS */
:root {
    --primary-color: #f97316;
    --secondary-color: #374151;
    --accent-color: #1f2937;
    --light-gray: #f8fafc;
    --border-color: #e5e7eb;
    --text-light: #6b7280;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header */
.header {
    background: var(--white);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    z-index: 1001;
}

.nav-brand i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

/* Menu hamburger - CACHÉ par défaut */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    transition: var(--transition);
}

/* S'assurer que le menu hamburger est caché sur desktop */
@media (min-width: 769px) {
    .nav-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Navigation menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(249, 115, 22, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Assurer que le menu normal reste visible sur tablettes */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        background: transparent;
        box-shadow: none;
        padding: 0;
        gap: 2rem;
        height: auto;
        width: auto;
        left: auto;
    }
    
    .nav-toggle {
        display: none;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 120px 0 80px;
    /* Utiliser l'unité svh pour un meilleur support mobile (barres d'adresse dynamiques) */
    min-height: 100svh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

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

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

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

.hero .highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.7;
    max-width: 500px;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: fadeInRight 0.8s ease-out 0.3s both;
}

.hero-image i {
    font-size: 8rem;
    color: var(--primary-color);
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

/* Boutons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    min-width: 160px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

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

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

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

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

.btn-secondary:hover {
    background: var(--white);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-full {
    width: 100%;
}

/* En-têtes de section */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: var(--light-gray);
}

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

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

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

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary-color);
    transform: scale(1.1);
}

.service-icon i {
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.service-card:hover .service-icon i {
    color: var(--white);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text .section-header {
    text-align: left;
    margin-bottom: 2rem;
}

.about-features {
    list-style: none;
    padding: 0;
}

.about-features li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.about-features i {
    color: var(--primary-color);
    margin-right: 1rem;
    font-size: 1.2rem;
}

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

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

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

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--light-gray);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contact-text {
    display: flex;
    flex-direction: column;
}

.contact-text strong {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-text span {
    color: var(--text-light);
}

/* Formulaire */
.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

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

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

/* Footer */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.footer-brand i {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Tablettes */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-wrapper {
        gap: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .about-content,
    .contact-content {
        gap: 3rem;
    }
}

/* Mobile Navigation - Smartphones uniquement */
@media (max-width: 768px) {
    .nav {
        padding: 1rem;
    }
    
    /* Afficher le bouton hamburger SEULEMENT sur mobile */
    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1002;
        order: 3;
    }
    
    /* Cacher le menu normal */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        /* Utiliser dvh pour couvrir toute la hauteur visible */
        height: 100dvh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        transition: left 0.3s ease;
        z-index: 1001;
        box-shadow: var(--shadow-lg);
    }
    
    /* Menu actif - slide depuis la gauche */
    .nav-menu.active {
        left: 0;
    }
    
    /* Liens du menu mobile */
    .nav-menu li {
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        display: block;
        padding: 1.5rem 2rem;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--secondary-color);
        text-decoration: none;
        border-radius: var(--border-radius);
        transition: var(--transition);
        width: 100%;
    }
    
    .nav-link:hover {
        background: var(--primary-color);
        color: var(--white);
        transform: translateX(10px);
    }
    
    .nav-link::after {
        display: none;
    }
}

/* Tablettes portrait et petits laptops */
@media (max-width: 768px) {
    /* Hero mobile */
    .hero {
        padding: 100px 0 60px;
        text-align: center;
    }
    
    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-image {
        order: -1;
    }
    
    .hero-image i {
        font-size: 5rem;
    }

    /* Texte du hero légèrement réduit sur mobile */
    .hero p {
        font-size: 1.05rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Sections mobile */
    .services,
    .about,
    .contact {
        padding: 80px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-text .section-header {
        text-align: center;
    }
    
    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Limiter la largeur minimale des boutons sur mobile */
    .btn {
        min-width: auto;
    }

    /* Marque plus compacte sur mobile */
    .nav-brand {
        font-size: 1.25rem;
    }
    .nav-brand i {
        font-size: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Smartphones */
@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .nav {
        padding: 1rem;
    }
    
    .hero {
        padding: 80px 0 50px;
    }
    
    .hero-image i {
        font-size: 4rem;
    }

    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .services,
    .about,
    .contact {
        padding: 60px 0;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .contact-item {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .container {
        padding: 0 15px;
    }
    
    .service-card {
        padding: 1.5rem 1rem;
    }
    
    .contact-form {
        padding: 1.5rem 1rem;
    }
    
    .stat-item {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2.25rem;
    }
}

/* Mode paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 60px 0 40px;
        min-height: 80vh;
    }
    
    .services,
    .about,
    .contact {
        padding: 60px 0;
    }
}

/* Préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-content,
    .hero-image {
        animation: none !important;
    }
}

/* Support tactile */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .service-card:hover,
    .contact-item:hover,
    .stat-item:hover {
        transform: none !important;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    .service-card:active,
    .contact-item:active {
        transform: translateY(-2px);
    }
}

/* Écrans haute résolution */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-wrapper {
        gap: 5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .service-card {
        padding: 3rem;
    }
    
    .about-content,
    .contact-content {
        gap: 5rem;
    }
}
