/* ============================================
   AGL RESPONSIVE ENHANCEMENTS CSS
   Mobile-First Responsive Design System
   ============================================ */

/* Base responsive utilities */
:root {
    --mobile-padding: 15px;
    --tablet-padding: 20px;
    --desktop-padding: 25px;
    --max-content-width: 1400px;
}

/* Container improvements */
.container-fluid {
    width: 100%;
    padding: 0 var(--mobile-padding);
    margin: 0 auto;
}

.container-responsive {
    width: 95%;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--mobile-padding);
}

/* Typography responsive */
.responsive-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--bleu-marine);
    text-align: center;
    margin-bottom: 1rem;
}

.responsive-subtitle {
    font-size: 1rem;
    color: var(--gris);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.responsive-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gris);
}

/* Button system responsive */
.btn-responsive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--bleu-marine), var(--bleu-clair));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--jaune), #FFE55C);
    color: var(--bleu-marine);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}

.btn-secondary {
    background: var(--gris-clair);
    color: var(--bleu-marine);
    border: 2px solid var(--bleu-marine);
}

.btn-secondary:hover {
    background: var(--bleu-marine);
    color: white;
}

.btn-full-width {
    width: 100%;
}

/* Card system responsive */
.card-responsive {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,51,102,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-responsive:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: var(--jaune);
}

.card-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--bleu-marine), var(--bleu-clair));
    color: white;
}

.card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-footer {
    padding: 20px;
    background: var(--gris-clair);
    margin-top: auto;
}

/* Form system responsive */
.form-responsive {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.form-group-responsive {
    margin-bottom: 20px;
}

.form-label-responsive {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--bleu-marine);
    font-size: 0.95rem;
}

.form-input-responsive {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px; /* Prevents zoom on iOS */
    transition: all 0.3s ease;
    background: white;
    min-height: 44px;
    box-sizing: border-box;
}

.form-input-responsive:focus {
    outline: none;
    border-color: var(--bleu-marine);
    box-shadow: 0 0 0 3px rgba(0,51,102,0.1);
}

.form-select-responsive {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Grid system responsive */
.grid-responsive {
    display: grid;
    gap: 20px;
    width: 100%;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Navigation responsive */
.nav-responsive {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px var(--mobile-padding);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bleu-marine);
}

.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 0 0 10px 10px;
}

.nav-menu.active {
    display: block;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    border-bottom: 1px solid var(--gris-clair);
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--bleu-marine);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background: var(--gris-clair);
    color: var(--jaune);
}

.nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--bleu-marine);
    cursor: pointer;
}

/* Hero section responsive */
.hero-responsive {
    background: linear-gradient(135deg, var(--bleu-marine), var(--bleu-clair));
    color: white;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-responsive::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"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="80" r="2" fill="white" opacity="0.1"/></svg>');
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Section spacing responsive */
.section-responsive {
    padding: 40px 0;
}

.section-light {
    background: var(--gris-clair);
}

.section-dark {
    background: var(--bleu-marine);
    color: white;
}

/* ============================================
   TABLET RESPONSIVE (768px+)
   ============================================ */
@media (min-width: 768px) {
    .container-responsive {
        width: 90%;
        padding: 0 var(--tablet-padding);
    }
    
    .responsive-title {
        font-size: 2.5rem;
    }
    
    .responsive-subtitle {
        font-size: 1.2rem;
    }
    
    .responsive-text {
        font-size: 1rem;
    }
    
    .btn-responsive {
        padding: 15px 25px;
        font-size: 1.1rem;
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: 25px;
    }
    
    .grid-responsive {
        gap: 25px;
    }
    
    /* Grid adjustments */
    .grid-2-tablet { grid-template-columns: repeat(2, 1fr); }
    .grid-3-tablet { grid-template-columns: repeat(3, 1fr); }
    
    /* Navigation tablet */
    .nav-content {
        padding: 20px var(--tablet-padding);
    }
    
    .nav-menu {
        position: static;
        display: flex;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }
    
    .nav-menu ul {
        display: flex;
        gap: 20px;
    }
    
    .nav-menu li {
        border: none;
    }
    
    .nav-menu a {
        padding: 10px 15px;
        border-radius: 5px;
    }
    
    .nav-toggle {
        display: none;
    }
    
    .hero-responsive {
        padding: 80px 0;
    }
    
    .section-responsive {
        padding: 60px 0;
    }
}

/* ============================================
   DESKTOP RESPONSIVE (992px+)
   ============================================ */
@media (min-width: 992px) {
    .container-responsive {
        width: 85%;
        padding: 0 var(--desktop-padding);
    }
    
    .responsive-title {
        font-size: 3rem;
    }
    
    .responsive-subtitle {
        font-size: 1.3rem;
    }
    
    .btn-responsive {
        padding: 18px 30px;
        font-size: 1.2rem;
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: 30px;
    }
    
    .grid-responsive {
        gap: 30px;
    }
    
    /* Grid adjustments */
    .grid-3-desktop { grid-template-columns: repeat(3, 1fr); }
    .grid-4-desktop { grid-template-columns: repeat(4, 1fr); }
    
    .hero-responsive {
        padding: 100px 0;
    }
    
    .section-responsive {
        padding: 80px 0;
    }
}

/* ============================================
   LARGE DESKTOP RESPONSIVE (1200px+)
   ============================================ */
@media (min-width: 1200px) {
    .container-responsive {
        width: 80%;
        max-width: 1400px;
    }
    
    .responsive-title {
        font-size: 3.5rem;
    }
    
    .grid-responsive {
        gap: 35px;
    }
    
    /* Grid adjustments */
    .grid-4-large { grid-template-columns: repeat(4, 1fr); }
    .grid-5-large { grid-template-columns: repeat(5, 1fr); }
}

/* ============================================
   ACCESSIBILITY & INTERACTION ENHANCEMENTS
   ============================================ */

/* Focus indicators */
*:focus {
    outline: 2px solid var(--jaune);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card-responsive {
        border: 2px solid var(--bleu-marine);
    }
    
    .btn-responsive {
        border: 2px solid currentColor;
    }
}

/* Print optimizations */
@media print {
    .nav-responsive,
    .btn-responsive,
    .nav-toggle {
        display: none !important;
    }
    
    .container-responsive {
        width: 100%;
        max-width: none;
        padding: 0;
    }
    
    .card-responsive {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}