/* ================================
   ROUFF DESIGN - Main CSS
   Version: 2.0
   Author: ROUFF DESIGN
   ================================ */

/* ========== Variables CSS ========== */
:root {
    /* Couleurs principales */
    --primary: #C1272D;
    --primary-dark: #8B1F23;
    --primary-light: #E63946;
    --secondary: #006233;
    --neon-green: #00FF41;
    --accent: #D4AF37;
    
    /* Couleurs neutres */
    --gray-900: #1A1A1A;
    --gray-800: #2A2A2A;
    --gray-700: #404040;
    --gray-600: #525252;
    --gray-500: #737373;
    --gray-400: #A3A3A3;
    --gray-300: #D4D4D4;
    --gray-200: #E5E5E5;
    --gray-100: #F5F5F5;
    --gray-50: #FAFAFA;
    --white: #FFFFFF;
    
    /* Typographie */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    
    /* Couleurs thème clair */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-tertiary: #E5E5E5;
    --text-primary: #1A1A1A;
    --text-secondary: #404040;
    --text-tertiary: #525252;
    --border-color: #E5E5E5;
    --card-bg: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-md: rgba(0, 0, 0, 0.15);
    --shadow-lg: rgba(0, 0, 0, 0.2);
    
    /* Espacements */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Bordures */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-full: 50px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-tooltip: 1050;
}

/* Thème sombre */
[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1A1A1A;
    --bg-tertiary: #2A2A2A;
    --text-primary: #FFFFFF;
    --text-secondary: #D4D4D4;
    --text-tertiary: #A3A3A3;
    --border-color: #2A2A2A;
    --card-bg: #1A1A1A;
    --shadow: rgba(0, 0, 0, 0.5);
    --shadow-md: rgba(0, 0, 0, 0.6);
    --shadow-lg: rgba(0, 0, 0, 0.7);
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

/* ========== Utilities ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-3xl) 0;
}

.text-center {
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========== Section Headers ========== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-label {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-tertiary);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    min-height: 48px;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 20px rgba(193, 39, 45, 0.4);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(193, 39, 45, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(193, 39, 45, 0.3);
}

.btn-whatsapp {
    background: #25D366;
    color: var(--white);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    border: none;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

/* ========== Header ========== */
.header {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-sm) 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: 0 2px 20px var(--shadow);
    transition: all var(--transition-base);
}

.header.scrolled {
    padding: var(--space-xs) 0;
    box-shadow: 0 4px 30px var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-image {
    height: 50px;
    width: auto;
}

.logo-fallback {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(193, 39, 45, 0.3);
    transition: all var(--transition-base);
}

.logo:hover .logo-icon {
    transform: rotate(10deg);
    box-shadow: 0 6px 20px rgba(193, 39, 45, 0.4);
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary);
}

.tagline {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 600;
    font-style: italic;
}

/* Navigation */
.nav-desktop {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.938rem;
    position: relative;
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.theme-toggle {
    width: 45px;
    height: 45px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    font-size: 1.125rem;
    color: var(--text-primary);
}

.theme-toggle:hover {
    background: var(--primary);
    color: var(--white);
    transform: rotate(180deg);
    border-color: var(--primary);
}

.header-cta {
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-radius: var(--radius-full);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(193, 39, 45, 0.3);
}

.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(193, 39, 45, 0.4);
}

/* Mobile Menu */
.mobile-menu-btn {
width: 48px; 
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.nav-mobile {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-md);
    z-index: var(--z-dropdown);
    box-shadow: 0 4px 20px var(--shadow);
}

.nav-mobile.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.nav-mobile a {
    display: block;
    padding: var(--space-sm);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-base);
    min-height: 48px;
}

.nav-mobile a:hover {
    background: var(--bg-secondary);
    color: var(--primary);
    padding-left: var(--space-md);
}

/* ========== Footer ========== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: var(--space-2xl) 0 var(--space-lg);
    border-top: 1px solid var(--gray-800);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-logo img {
    height: 50px;
    width: auto;
    margin-bottom: var(--space-sm);
    filter: brightness(0) invert(1);
}

.footer-logo-fallback {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--space-sm);
}

.footer-logo-fallback i {
    font-size: 1.5rem;
    color: var(--primary);
}

.footer-description {
    color: var(--gray-400);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--gray-800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all var(--transition-base);
    font-size: 1.125rem;
}

.social-links a:hover {
    background: var(--neon-green);
    color: var(--gray-900);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.4);
}

.footer-col h4 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    font-size: 1.063rem;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--gray-400);
    transition: color var(--transition-base);
    font-size: 0.938rem;
}

.footer-col ul li a:hover {
    color: var(--neon-green);
}

.footer-col ul li i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-800);
    color: var(--gray-400);
    font-size: 0.875rem;
}

.footer-bottom a {
    color: var(--primary);
    font-weight: 600;
}

/* ========== Scroll to Top ========== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
    z-index: var(--z-fixed);
    box-shadow: 0 4px 20px rgba(193, 39, 45, 0.4);
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: all;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(193, 39, 45, 0.5);
}

/* ========== WhatsApp Float ========== */
.whatsapp-float {
    position: fixed;
    bottom: 5.5rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    background: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.7);
}

/* ========== Animations ========== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-whatsapp {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 30px rgba(37, 211, 102, 0.7);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gradient-text {
    background: linear-gradient(135deg, var(--neon-green) 0%, var(--accent) 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-cta {
        display: none;
    }

    .logo-image,
    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .tagline {
        font-size: 0.625rem;
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .scroll-top {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 50px;
        height: 50px;
    }

    .whatsapp-float {
        bottom: 4.5rem;
        right: var(--space-md);
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.938rem;
    }
}

/* ========== Accessibility ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
/* ================================
   OPTIMISATION MOBILE PROFESSIONNELLE
   ================================ */

@media (max-width: 768px) {
    /* Container plus aéré */
    .container {
        padding: 0 1rem;
    }

    /* Sections avec meilleur espacement */
    .section {
        padding: 2rem 1rem;
    }

    /* Header mobile optimisé */
    .header {
        padding: 0.75rem 0;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        flex-shrink: 0;
    }

    .logo-text {
        font-size: 1.125rem;
    }

    .tagline {
        display: none; /* Masquer le slogan sur mobile */
    }

    /* Navigation mobile améliorée */
    .nav-mobile {
        top: 70px;
        padding: 1.5rem 1rem;
    }

    .nav-mobile a {
        padding: 1rem;
        font-size: 1.063rem;
        border-radius: 0.5rem;
        margin-bottom: 0.5rem;
    }

    /* Titres responsive */
    h1, .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    h2, .section-title {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    /* Textes lisibles */
    p, li {
        font-size: 1rem;
        line-height: 1.7;
    }

    /* Boutons mobile-friendly */
    .btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 52px;
    }

    .btn i {
        font-size: 1.125rem;
    }

    /* Hero Section mobile */
    .hero {
        padding: 6rem 0 3rem;
        min-height: auto;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-badge {
        font-size: 0.813rem;
        padding: 0.5rem 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Stats responsive */
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.813rem;
    }

    /* Services Grid mobile */
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card,
    .portfolio-item {
        padding: 1.5rem;
    }

    /* Prix mobile optimisé */
    .price-primary {
        font-size: 1.75rem !important;
    }

    .price-label {
        font-size: 0.75rem !important;
    }

    .price-secondary {
        font-size: 1rem !important;
    }

    .service-price {
        margin: 1rem 0;
    }

    /* Footer mobile */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-col {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .social-links a {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    /* Formulaire mobile */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Évite le zoom iOS */
        padding: 1rem;
        min-height: 52px;
    }

    /* WhatsApp float optimisé */
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1.75rem;
    }

    .scroll-top {
        width: 50px;
        height: 50px;
        bottom: 5rem;
        right: 1.5rem;
    }

    /* Images responsive */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Portfolio mobile */
    .portfolio-item {
        height: 350px;
    }

    .portfolio-overlay {
        padding: 1.5rem;
    }

    .portfolio-overlay h3 {
        font-size: 1.25rem;
    }

    /* Contact methods mobile */
    .contact-methods {
        gap: 1rem;
    }

    .contact-method {
        padding: 1.25rem;
    }

    .method-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    /* Améliorations touch */
    a, button, input, select, textarea {
        -webkit-tap-highlight-color: rgba(193, 39, 45, 0.2);
    }

    /* Scroll smooth */
    html {
        scroll-padding-top: 80px;
    }
}

/* iPhone SE et petits écrans */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.75rem !important;
    }

    .section-title {
        font-size: 1.5rem !important;
    }

    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.938rem;
    }

    .price-primary {
        font-size: 1.5rem !important;
    }
}