/* ==========================================================================
   MADINTOUCH.FR - Global Stylesheet
   Version: 1.0.0
   Date: 2025-10-13
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLES
   ========================================================================== */
:root {
    /* Colors */
    --primary: #c41e3a;
    --primary-dark: #8b1528;
    --primary-light: #e63950;
    --secondary: #2c3e50;
    --accent: #d4af37;
    
    /* Backgrounds */
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    
    /* Text Colors */
    --text-primary: #2c2c2c;
    --text-secondary: #666666;
    --text-light: #999999;
    --text-white: #ffffff;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-xl: 0 15px 60px rgba(196, 30, 58, 0.2);
    
    /* Borders & Radius */
    --border-radius: 15px;
    --border-radius-sm: 10px;
    --border-radius-lg: 20px;
    --border-radius-xl: 50px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.5s ease;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 5rem;
    
    /* Font Families */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    
    /* Breakpoints */
    --screen-sm: 640px;
    --screen-md: 768px;
    --screen-lg: 1024px;
    --screen-xl: 1280px;
    --screen-2xl: 1536px;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-white);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { 
    font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl));
    font-weight: 900;
}

h2 { 
    font-size: clamp(var(--text-2xl), 4vw, var(--text-5xl));
    font-weight: 800;
}

h3 { 
    font-size: clamp(var(--text-xl), 3vw, var(--text-4xl));
    font-weight: 700;
}

h4 { font-size: var(--text-3xl); }
h5 { font-size: var(--text-2xl); }
h6 { font-size: var(--text-xl); }

p {
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

strong, b {
    font-weight: 700;
}

em, i {
    font-style: italic;
}

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--spacing-4xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-title {
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ==========================================================================
   5. HEADER & NAVIGATION
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    padding: var(--spacing-md) 0;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 30px rgba(196, 30, 58, 0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    align-items: center;
}

.nav-menu a {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* ==========================================================================
   6. HERO SECTION
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    filter: grayscale(20%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-white);
    padding: var(--spacing-3xl) var(--spacing-xl);
    max-width: 900px;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-bottom: var(--spacing-lg);
}

.hero-subtitle {
    font-size: var(--text-xl);
    opacity: 0.95;
    margin-bottom: var(--spacing-2xl);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-2xl);
    margin: var(--spacing-2xl) 0;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    font-size: var(--text-sm);
    opacity: 0.9;
}

/* ==========================================================================
   7. BUTTONS & CTAs
   ========================================================================== */
.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-2xl);
    border-radius: var(--border-radius-xl);
    font-weight: 600;
    font-size: var(--text-base);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary,
.cta-primary {
    background: var(--bg-white);
    color: var(--primary);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.btn-primary:hover,
.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.btn-secondary,
.cta-secondary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid var(--text-white);
}

.btn-secondary:hover,
.cta-secondary:hover {
    background: var(--bg-white);
    color: var(--primary);
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-white) !important;
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius-xl);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(196, 30, 58, 0.3);
}

/* ==========================================================================
   8. CARDS & COMPONENTS
   ========================================================================== */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: var(--spacing-xl);
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--border-radius-lg);
    font-size: var(--text-sm);
    font-weight: 600;
}

/* Featured Row in Tables */
.featured-row {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    position: relative;
}

.featured-badge {
    background: var(--accent);
    color: var(--primary-dark);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--text-xs);
    font-weight: 700;
    border-radius: var(--border-radius-lg);
}

/* ==========================================================================
   9. FORMS
   ========================================================================== */
input,
textarea,
select {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: var(--text-base);
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

/* ==========================================================================
   10. TABLES
   ========================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--text-white);
}

th,
td {
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--bg-light);
}

/* ==========================================================================
   11. FOOTER
   ========================================================================== */
.footer {
    background: var(--secondary);
    color: var(--text-white);
    padding: var(--spacing-3xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
    margin-bottom: var(--spacing-md);
    color: var(--primary-light);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   12. ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.fade-in { animation: fadeIn 0.8s ease; }
.slide-up { animation: slideUp 0.8s ease; }

/* ==========================================================================
   13. UTILITY CLASSES
   ========================================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-white { color: var(--text-white); }

.bg-light { background: var(--bg-light); }
.bg-white { background: var(--bg-white); }
.bg-primary { background: var(--primary); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }
.mt-5 { margin-top: var(--spacing-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }
.mb-5 { margin-bottom: var(--spacing-2xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }
.p-4 { padding: var(--spacing-xl); }
.p-5 { padding: var(--spacing-2xl); }

.rounded { border-radius: var(--border-radius); }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-full { border-radius: var(--border-radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.gap-3 { gap: var(--spacing-lg); }
.gap-4 { gap: var(--spacing-xl); }

/* ==========================================================================
   14. RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Hero */
    .hero-content {
        padding: var(--spacing-xl);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    /* Typography */
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }
    
    /* Layout */
    .section {
        padding: var(--spacing-3xl) 0;
    }
    
    /* Cards */
    .card {
        margin-bottom: var(--spacing-xl);
    }
    
    /* Tables */
    table {
        font-size: var(--text-sm);
    }
    
    th, td {
        padding: var(--spacing-sm);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 15px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   15. PRINT STYLES
   ========================================================================== */
@media print {
    .header,
    .footer,
    .nav-menu,
    .hero-stats,
    .cta-section,
    .btn,
    .nav-cta {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* ==========================================================================
   16. ACCESSIBILITY
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: var(--text-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* ==========================================================================
   END OF STYLESHEET
   ========================================================================== */