/* ============================================
   MycoGest - Thème Apple Gris Bootstrap 5.3
   Design minimaliste, épuré et élégant
   ============================================ */

/* ============================================
   Variables CSS personnalisées
   ============================================ */
:root {
    /* Palette gris Apple */
    --apple-gray-900: #1d1d1f;
    --apple-gray-800: #2e2e30;
    --apple-gray-700: #424245;
    --apple-gray-600: #6e6e73;
    --apple-gray-500: #86868b;
    --apple-gray-400: #aeaeb2;
    --apple-gray-300: #c7c7cc;
    --apple-gray-200: #d1d1d6;
    --apple-gray-100: #e5e5ea;
    --apple-gray-50: #f5f5f7;
    
    /* Accents subtils */
    --apple-blue: #007aff;
    --apple-teal: #5ac8fa;
    --apple-green: #34c759;
    
    /* Override Bootstrap */
    --bs-primary: #1d1d1f;
    --bs-primary-rgb: 29, 29, 31;
    --bs-secondary: #86868b;
    --bs-light: #f5f5f7;
    --bs-dark: #1d1d1f;
    
    --bs-body-font-size: 0.9375rem;
    --bs-body-line-height: 1.6;
    --bs-body-color: #1d1d1f;
    --bs-body-bg: #ffffff;
    
    /* Espacements compacts */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Ombres Apple style */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border radius Apple style */
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.25rem;
}

/* ============================================
   Base & Reset
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--apple-gray-900);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* ============================================
   Navigation - Compact & Fixed
   ============================================ */
.navbar {
    padding: 0.75rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--apple-gray-200);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
    background: rgba(255, 255, 255, 0.95);
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--apple-gray-900) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.brand-icon {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-size: 0.875rem;
    font-weight: 400;
    padding: 0.5rem 0.875rem;
    color: var(--apple-gray-700);
    transition: var(--transition);
    position: relative;
    letter-spacing: -0.01em;
}

.navbar-nav .nav-link:hover {
    color: var(--apple-gray-900);
}

.navbar-nav .nav-link.active {
    color: var(--apple-gray-900);
    font-weight: 500;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.875rem;
    right: 0.875rem;
    height: 2px;
    background: var(--apple-gray-900);
    border-radius: 2px;
}

/* Button dans la nav */
.btn-nav {
    margin-left: 0.5rem;
    padding: 0.5rem 1.25rem !important;
    font-size: 0.875rem !important;
}

/* Toggle mobile */
.navbar-toggler {
    border: none;
    padding: 0.25rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    width: 22px;
    height: 2px;
    background: var(--apple-gray-900);
    display: block;
    position: relative;
    transition: var(--transition);
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background: var(--apple-gray-900);
    left: 0;
    transition: var(--transition);
}

.navbar-toggler-icon::before {
    top: -7px;
}

.navbar-toggler-icon::after {
    bottom: -7px;
}

/* ============================================
   Boutons personnalisés
   ============================================ */
.btn {
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--apple-gray-900);
    color: white;
}

.btn-primary:hover {
    background: var(--apple-gray-800);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    border: 1.5px solid var(--apple-gray-300);
    color: var(--apple-gray-900);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--apple-gray-50);
    border-color: var(--apple-gray-400);
    color: var(--apple-gray-900);
}

.btn-light {
    background: var(--apple-gray-50);
    color: var(--apple-gray-900);
}

.btn-light:hover {
    background: var(--apple-gray-100);
    color: var(--apple-gray-900);
}

.btn-outline-light {
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* ============================================
   Cartes compactes
   ============================================ */
.card {
    border: 1px solid var(--apple-gray-200);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    background: white;
}

.card:hover {
    border-color: var(--apple-gray-300);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-body {
    padding: 1.5rem;
}

/* Carte avec bordure accent */
.card-accent {
    border-left: 3px solid var(--apple-gray-900);
}

/* ============================================
   Sections & Espacements
   ============================================ */
section {
    padding: 2.5rem 0;
}

@media (min-width: 768px) {
    section {
        padding: 3.5rem 0;
    }
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--apple-gray-900);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

.section-subtitle {
    font-size: 1rem;
    color: var(--apple-gray-600);
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Background alterné */
.bg-light-custom {
    background: var(--apple-gray-50);
}

/* ============================================
   Hero Section - Compact
   ============================================ */
.hero {
    padding-top: 80px;
    min-height: auto;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--apple-gray-900);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--apple-gray-600);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

/* Gradient hero - Style Apple */
.hero-gradient {
    background: linear-gradient(135deg, var(--apple-gray-800) 0%, var(--apple-gray-900) 100%);
    color: white;
}

.hero-gradient h1,
.hero-gradient h2,
.hero-gradient h3,
.hero-gradient p,
.hero-gradient span {
    color: white;
}

.hero-gradient .hero-title {
    color: white;
}

.hero-gradient .hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

/* Stats badges */
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 0.75rem;
    color: white;
    backdrop-filter: blur(10px);
}

/* ============================================
   Features Grid
   ============================================ */
.feature-card {
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--apple-gray-200);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    border-color: var(--apple-gray-300);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--apple-gray-900);
}

.feature-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--apple-gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.feature-text {
    font-size: 0.9375rem;
    color: var(--apple-gray-600);
    line-height: 1.5;
    margin: 0;
}

/* ============================================
   Étapes / Process
   ============================================ */
.step-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
}

.step-number {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--apple-gray-900);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--apple-gray-900);
    letter-spacing: -0.01em;
}

.step-content p {
    font-size: 0.9375rem;
    color: var(--apple-gray-600);
    margin: 0;
}

/* ============================================
   CTA Sections
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--apple-gray-800) 0%, var(--apple-gray-900) 100%);
    color: white;
    border-radius: var(--border-radius-xl);
    padding: 3rem 2rem;
    text-align: center;
}

.cta-section h2,
.cta-section h3,
.cta-section p,
.cta-section .h3 {
    color: white;
}

.cta-section h2 {
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.cta-section p {
    opacity: 0.85;
    margin-bottom: 1.5rem;
}

/* ============================================
   Badges & Tags
   ============================================ */
.badge-custom {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--apple-gray-100);
    color: var(--apple-gray-900);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* ============================================
   Footer - Compact
   ============================================ */
.footer {
    background: var(--apple-gray-900);
    color: var(--apple-gray-400);
    padding: 2.5rem 0 1.5rem;
    font-size: 0.875rem;
}

.footer h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.footer a {
    color: var(--apple-gray-400);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: white;
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.footer-brand:hover {
    color: white !important;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--apple-gray-800);
    text-align: center;
    font-size: 0.8125rem;
}

.footer-bottom p {
    margin: 0.25rem 0;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

/* ============================================
   Messages / Alerts
   ============================================ */
.messages-container {
    position: fixed;
    top: 90px;
    right: 1rem;
    z-index: 1050;
    max-width: 400px;
}

.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--border-radius);
    border-left: 4px solid;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

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

.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================
   Forms
   ============================================ */
.form-control,
.form-select {
    font-size: 0.9375rem;
    padding: 0.75rem 0.875rem;
    border: 1.5px solid var(--apple-gray-300);
    border-radius: var(--border-radius);
    transition: var(--transition);
    letter-spacing: -0.01em;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--apple-gray-500);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.05);
    outline: none;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--apple-gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

/* ============================================
   Pricing Cards
   ============================================ */
.pricing-card {
    border: 2px solid var(--apple-gray-200);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    background: white;
    transition: var(--transition);
    position: relative;
}

.pricing-card:hover {
    border-color: var(--apple-gray-400);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
    border-color: var(--apple-gray-900);
    box-shadow: var(--shadow-lg);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--apple-gray-900);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--apple-gray-900);
    margin: 1rem 0;
    letter-spacing: -0.02em;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.pricing-features li {
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features li i {
    color: var(--apple-gray-900);
}

/* ============================================
   Utilitaires compacts
   ============================================ */
.text-gray-900 {
    color: var(--apple-gray-900) !important;
}

.text-gray-600 {
    color: var(--apple-gray-600) !important;
}

.bg-gray-50 {
    background-color: var(--apple-gray-50) !important;
}

.bg-gray-100 {
    background-color: var(--apple-gray-100) !important;
}

.border-gray {
    border-color: var(--apple-gray-300) !important;
}

/* Classes de compatibilité (anciennes couleurs -> nouvelles) */
.text-myco-brown { color: var(--apple-gray-900) !important; }
.bg-myco-cream { background-color: var(--apple-gray-50) !important; }
.border-myco { border-color: var(--apple-gray-300) !important; }

/* Classes hero pour compatibilité */
.hero-gradient .stat-badge {
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
}

.feature-icon {
    color: var(--apple-gray-900) !important;
}

/* Espacements responsifs compacts */
@media (max-width: 767.98px) {
    .pt-mobile-sm { padding-top: 1rem !important; }
    .pb-mobile-sm { padding-bottom: 1rem !important; }
    .py-mobile-sm { padding-top: 1rem !important; padding-bottom: 1rem !important; }
}

/* ============================================
   Animations subtiles
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

/* Hover lift effect */
.hover-lift {
    transition: var(--transition);
}

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

/* ============================================
   Responsive - Mobile First
   ============================================ */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.125rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .btn + .btn {
        margin-top: 0.5rem;
    }
}

/* Tablettes */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ============================================
   Components supplémentaires
   ============================================ */

/* Timeline vertical */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--apple-gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--apple-gray-900);
    border: 3px solid white;
}

/* List avec icônes */
.list-icon {
    list-style: none;
    padding: 0;
}

.list-icon li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.list-icon li i {
    color: var(--apple-gray-900);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Divider décoratif */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--apple-gray-300), transparent);
    margin: 2rem 0;
}

/* Badge avec point */
.badge-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: var(--apple-gray-100);
    border-radius: 50px;
    font-size: 0.8125rem;
    letter-spacing: -0.01em;
}

.badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--apple-gray-900);
}

/* Card avec ribbon */
.card-ribbon {
    position: relative;
    overflow: hidden;
}

.card-ribbon::before {
    content: attr(data-ribbon);
    position: absolute;
    top: 1rem;
    right: -2rem;
    transform: rotate(45deg);
    background: var(--apple-gray-900);
    color: white;
    padding: 0.25rem 3rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: var(--shadow);
    letter-spacing: 0.05em;
}

/* Stats card */
.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--apple-gray-200);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--apple-gray-900);
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-card-label {
    font-size: 0.875rem;
    color: var(--apple-gray-600);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.stat-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.7;
    color: var(--apple-gray-900);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--apple-gray-700) 0%, var(--apple-gray-900) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Image avec overlay */
.img-overlay {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
}

.img-overlay img {
    display: block;
    width: 100%;
    height: auto;
    transition: var(--transition);
}

.img-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(74, 63, 53, 0.7) 100%);
    opacity: 0;
    transition: var(--transition);
}

.img-overlay:hover::before {
    opacity: 1;
}

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

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid var(--apple-gray-200);
    border-top-color: var(--apple-gray-900);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: var(--border-radius);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: #6C6158;
    font-size: 0.875rem;
}

/* ============================================
   Print - Optimisation
   ============================================ */
@media print {
    .navbar,
    .footer,
    .btn,
    .messages-container {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
    }
    
    .card {
        break-inside: avoid;
    }
}
