/*
|==============================================
| REMICOM - STYLESHEET PRINCIPAL
|==============================================
| Transmission d'entreprise en Suisse romande
| Version: 2.0 - Optimisée et structurée
| Date: Septembre 2025
|==============================================
*/

/*
|----------------------------------------------
| 1. VARIABLES CSS & CONFIGURATION
|----------------------------------------------
*/
:root {
    /* Couleurs principales */
    --remicom-red: #C00000;
    --remicom-red-light: #E53E3E;
    --remicom-red-dark: #9B0000;
    
    /* Palette de gris */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-600: #4B5563;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --white: #FFFFFF;
    
    /* Typographie */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
    
    /* Ombres */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --shadow-red: 0 8px 30px rgba(192, 0, 0, 0.3);
}

/*
|----------------------------------------------
| 2. RESET & BASE STYLES
|----------------------------------------------
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height-base);
    color: var(--gray-900);
    background-color: var(--white);
    overflow-x: hidden;
}

/*
|----------------------------------------------
| 3. TYPOGRAPHIE
|----------------------------------------------
*/
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-900);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--gray-800);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--gray-600);
    font-size: 1.1rem;
    line-height: 1.7;
}

/*
|----------------------------------------------
| 4. LAYOUT & CONTAINERS
|----------------------------------------------
*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

section {
    padding: 6rem 0;
}

/*
|----------------------------------------------
| 5. NAVIGATION
|----------------------------------------------
*/
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.nav-container {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 2rem;
    padding: var(--spacing-sm) var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--remicom-red);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform var(--transition-normal);
    grid-column: 1;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 40px;
    width: auto;
    transition: transform var(--transition-normal);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
    margin: 0;
    padding: 0;
    grid-column: 3;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 500;
    transition: color var(--transition-normal);
    position: relative;
}

.nav-link:hover {
    color: var(--remicom-red);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--remicom-red);
    transition: width var(--transition-normal);
}

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

/*
|----------------------------------------------
| 6. BOUTONS
|----------------------------------------------
*/
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    white-space: nowrap;
}

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

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

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

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

/*
|----------------------------------------------
| 7. HERO SECTION
|----------------------------------------------
*/
.hero {
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    min-height: 500px;
}

.hero-content {
    text-align: left;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: var(--spacing-md);
}

.hero-content .text-red {
    color: var(--remicom-red);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: var(--gray-600);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: nowrap;
    justify-content: center;
}

/*
|----------------------------------------------
| 8. VIDEO CONTAINER & CONTRÔLES
|----------------------------------------------
*/
.video-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--white);
    border: 1px solid rgba(229, 231, 235, 0.8);
    transition: all var(--transition-normal);
}

.video-container:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15), 0 12px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: rgba(192, 0, 0, 0.2);
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(192, 0, 0, 0.02) 0%, 
        transparent 50%, 
        rgba(192, 0, 0, 0.01) 100%);
    pointer-events: none;
    z-index: 1;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 2;
}

/* Contrôles vidéo */
.video-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.video-control-btn,
.sound-control {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(192, 0, 0, 0.2);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-control-btn:hover,
.sound-control:hover {
    background: rgba(192, 0, 0, 0.95);
    border-color: var(--remicom-red);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 0, 0, 0.4);
}

.video-control-btn:hover svg,
.sound-control:hover svg {
    color: white;
    stroke: white;
}

.video-control-btn svg,
.sound-control svg {
    width: 20px;
    height: 20px;
    color: var(--remicom-red);
    stroke: var(--remicom-red);
    transition: all var(--transition-normal);
}

/* Contrôle de son spécialisé */
.sound-control {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--remicom-red);
    font-weight: 600;
    font-size: 0.75rem;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: auto;
}

.sound-control:hover {
    background: linear-gradient(135deg, var(--remicom-red), var(--remicom-red-dark));
    color: white;
}

.sound-control.active {
    background: linear-gradient(135deg, var(--remicom-red), var(--remicom-red-dark));
    color: white;
}

.sound-control.muted {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.95), rgba(75, 85, 99, 0.85));
    color: white;
    border-color: rgba(107, 114, 128, 0.3);
}

.sound-icon {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-normal);
}

/*
|----------------------------------------------
| 9. EXPERTISE SECTION
|----------------------------------------------
*/
.expertise-label {
    color: var(--remicom-red);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.expertise-description {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.expertise-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.expertise-icon {
    width: 60px;
    height: 60px;
    background-color: var(--remicom-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    flex-shrink: 0;
}

.expertise-icon svg {
    width: 30px;
    height: 30px;
    color: white;
    stroke-width: 2;
}

.expertise-item h3 {
    color: var(--remicom-red);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.expertise-item p {
    color: var(--gray-600);
    font-size: 1rem;
    margin: 0;
}

/*
|----------------------------------------------
| 10. CARDS & GRILLES
|----------------------------------------------
*/
.card {
    background: var(--white);
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-200);
}

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

.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/*
|----------------------------------------------
| 11. FORMULAIRES
|----------------------------------------------
*/
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--gray-800);
}

.form-input {
    width: 100%;
    padding: 0.875rem var(--spacing-sm);
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color var(--transition-normal);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--remicom-red);
}

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

/*
|----------------------------------------------
| 12. MODALS & OVERLAYS
|----------------------------------------------
*/
.video-modal,
.auth-modal {
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.video-modal:not(.hidden),
.auth-modal:not(.hidden) {
    display: flex !important;
    opacity: 1;
}

.auth-container {
    animation: slideUp var(--transition-normal) ease;
}

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

/*
|----------------------------------------------
| 13. PREMIUM TRAINING GRID
|----------------------------------------------
*/
.training-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.training-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}

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

.training-card .video-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--remicom-red) 0%, var(--remicom-red-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.training-card .thumbnail-content {
    text-align: center;
    color: #F5F5DC;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    padding: var(--spacing-sm);
    z-index: 2;
}

.training-card .play-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--remicom-red);
    font-size: 1rem;
    transition: all var(--transition-normal);
    z-index: 3;
}

.training-card:hover .play-overlay {
    background: white;
    transform: scale(1.1);
}

.training-card .card-content {
    padding: var(--spacing-sm);
}

.training-card .card-status {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/*
|----------------------------------------------
| 14. ANIMATIONS & EFFETS
|----------------------------------------------
*/
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: all var(--transition-slow);
}

.fade-in.animate {
    opacity: 0;
    transform: translateY(30px);
}

.animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease 0.2s;
}

.animate-on-scroll.animate {
    opacity: 0;
    transform: translateY(50px);
}

.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Animation pour activation du son */
.sound-control.activated {
    animation: soundActivated 0.6s ease;
}

@keyframes soundActivated {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/*
|----------------------------------------------
| 15. FOOTER
|----------------------------------------------
*/
.footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

/*
|----------------------------------------------
| 16. UTILITIES & ACCESSIBILITÉ
|----------------------------------------------
*/

/* Accessibilité - Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states pour l'accessibilité */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--remicom-red);
    outline-offset: 2px;
}

/* Skip link */
a[href="#main-content"] {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--remicom-red);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
    border-radius: 4px;
}

a[href="#main-content"]:focus {
    top: 6px;
}

/* Utilities générales */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-red { color: var(--remicom-red); }
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Espacements */
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }

.space-y-4 > * + * {
    margin-top: var(--spacing-sm);
}

/*
|----------------------------------------------
| 17. RESPONSIVE DESIGN
|----------------------------------------------
*/

/* Tablettes */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .nav-container {
        padding: var(--spacing-sm);
    }
    
    .nav-menu {
        gap: var(--spacing-sm);
    }
    
    section {
        padding: 4rem 0;
    }
    
    .hero {
        padding: 6rem 0 4rem;
    }
    
    .hero-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
        order: 1;
    }
    
    .hero-video {
        order: 2;
    }
    
    .video-container {
        height: 250px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        margin-top: var(--spacing-lg);
    }
    
    .expertise-item {
        align-items: center;
        text-align: center;
    }
    
    .training-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .video-controls {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .video-control-btn,
    .sound-control {
        width: 42px;
        height: 42px;
        padding: 10px;
    }
    
    .video-control-btn svg,
    .sound-control svg {
        width: 18px;
        height: 18px;
    }
}

/* Mobiles */
@media (max-width: 480px) {
    .nav-menu {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .training-grid {
        grid-template-columns: 1fr;
    }
    
    .training-card .video-thumbnail {
        height: 140px;
    }
}

/*
|----------------------------------------------
| 18. PRINT STYLES
|----------------------------------------------
*/
@media print {
    .nav,
    .video-controls,
    .btn {
        display: none !important;
    }
    
    body {
        color: black !important;
        background: white !important;
    }
    
    .card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

/*
|==============================================
| FIN DU STYLESHEET
|==============================================
*/