:root {
    --primary: #03045e;
    --primary-light: #0077b6;
    --accent: #0096c7;
    --red: #d00000;
    --dark: #1a1a1a;
    --gray: #6c757d;
    --gray-light: #f8f9fa;
    --white: #ffffff;
    --success: #10b981;
} 

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.page-hero {
    background: linear-gradient(135deg, rgba(3, 4, 94, 0.97), rgba(0, 119, 182, 0.92)),
                url('https://images.unsplash.com/photo-1524178232363-1fb2b075b655?w=1920') center/cover fixed;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 150, 199, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(3, 4, 94, 0.4) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    font-size: 14px;
    position: relative;
    z-index: 2;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.breadcrumb a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s;
    padding: 4px 8px;
    border-radius: 6px;
}

.breadcrumb a:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.breadcrumb span {
    color: rgba(255,255,255,0.4);
}

.page-title {
    font-size: 56px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
    letter-spacing: -1px;
    animation: slideUp 0.8s ease-out 0.2s both;
}

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

.page-subtitle {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    position: relative;
    z-index: 2;
    font-weight: 300;
    animation: slideUp 0.8s ease-out 0.4s both;
}

.formations-main-section {
    padding: 60px 0 100px;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
}

.formations-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 50px;
    position: relative;
}

.mobile-filter-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 24px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.mobile-filter-toggle:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(3,4,94,0.12);
    transform: translateY(-2px);
}

.mobile-filter-toggle i {
    color: var(--primary);
    font-size: 18px;
}

.filter-count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    background: linear-gradient(135deg, #d00000, #ff0000);
    color: white;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(208,0,0,0.3);
}

.filtres-sidebar {
    background: white;
    border-radius: 20px;
    padding: 36px;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s;
}

.filtres-sidebar:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.close-sidebar {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: none;
    border-radius: 10px;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
}

.close-sidebar:hover {
    background: var(--red);
    color: white;
    transform: rotate(90deg);
}

.filter-actions {
    margin-bottom: 28px;
}

.btn-reset-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: var(--dark);
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    justify-content: center;
    border: 2px solid transparent;
}

.btn-reset-all:hover {
    background: linear-gradient(135deg, var(--red), #ff0000);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(208,0,0,0.25);
    border-color: var(--red);
}

.btn-reset-all i {
    transition: transform 0.3s;
}

.btn-reset-all:hover i {
    transform: rotate(-180deg);
}

.filter-group {
    margin-bottom: 32px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 13px;
    font-weight: 900;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, var(--red), #ff0000);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(208,0,0,0.3);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 14px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid transparent;
}

.checkbox-label:hover {
    background: linear-gradient(135deg, rgba(3,4,94,0.04), rgba(0,119,182,0.04));
    border-color: rgba(3,4,94,0.1);
    transform: translateX(4px);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2.5px solid #dee2e6;
    border-radius: 7px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    background: white;
}

.checkbox-label:hover .checkbox-custom {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(3,4,94,0.08);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(3,4,94,0.3);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    animation: checkPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkPop {
    0% { transform: rotate(45deg) scale(0); }
    50% { transform: rotate(45deg) scale(1.2); }
    100% { transform: rotate(45deg) scale(1); }
}

.checkbox-text {
    font-size: 14px;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s;
}

.checkbox-label:hover .checkbox-text {
    color: var(--primary);
    font-weight: 600;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-text {
    color: var(--primary);
    font-weight: 700;
}

.formations-content {
    min-height: 400px;
}

.formations-header {
    margin-bottom: 36px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.formations-count {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: white;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 2px solid rgba(3,4,94,0.06);
    transition: all 0.3s;
}

.formations-count:hover {
    box-shadow: 0 8px 24px rgba(3,4,94,0.15);
    transform: translateY(-2px);
}

.formations-count i {
    color: var(--primary);
    font-size: 20px;
}

.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 36px;
}

.formation-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
    animation: cardAppear 0.6s ease-out both;
}

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

.formation-card:nth-child(1) { animation-delay: 0.1s; }
.formation-card:nth-child(2) { animation-delay: 0.2s; }
.formation-card:nth-child(3) { animation-delay: 0.3s; }
.formation-card:nth-child(4) { animation-delay: 0.4s; }
.formation-card:nth-child(5) { animation-delay: 0.5s; }
.formation-card:nth-child(6) { animation-delay: 0.6s; }

.formation-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(3,4,94,0.2);
    border-color: rgba(3,4,94,0.1);
}

.formation-image {
    height: 220px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.formation-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(255,255,255,0.1), transparent 50%);
    animation: imageShimmer 3s ease-in-out infinite;
}

@keyframes imageShimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.formation-icon {
    font-size: 80px;
    color: rgba(255,255,255,0.95);
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.formation-card:hover .formation-icon {
    transform: scale(1.15) translateY(-6px) rotate(5deg);
}

.formation-code {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(12px);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 11px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.5px;
    z-index: 3;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.formation-type {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(3,4,94,0.1);
}

.formation-date {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 3;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.5);
}

.formation-date i {
    color: var(--primary);
    font-size: 14px;
}

.formation-deadline {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    background: linear-gradient(135deg, #d00000, #ff0000);
    backdrop-filter: blur(12px);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 3;
    box-shadow: 0 4px 16px rgba(208,0,0,0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.formation-body {
    padding: 28px;
}

.formation-domaine-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.formation-domaine {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(3,4,94,0.08), rgba(0,119,182,0.06));
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    border: 1px solid rgba(3,4,94,0.1);
    transition: all 0.3s;
}

.formation-card:hover .formation-domaine {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(3,4,94,0.3);
}

.formation-delivree-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.08));
    border-radius: 10px;
    font-size: 11px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: all 0.3s;
}

.formation-card:hover .formation-delivree-badge {
    background: linear-gradient(135deg, var(--success), #059669);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.delivree-label {
    font-weight: 600;
    color: var(--gray);
    transition: color 0.3s;
}

.formation-card:hover .delivree-label {
    color: rgba(255,255,255,0.9);
}

.delivree-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--success);
    transition: color 0.3s;
}

.formation-card:hover .delivree-value {
    color: white;
}

.delivree-value i {
    font-size: 12px;
}

.formation-titre {
    font-size: 19px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 14px;
    line-height: 1.4;
    min-height: 54px;
    transition: all 0.3s;
    letter-spacing: -0.3px;
}

.formation-card:hover .formation-titre {
    color: var(--primary);
}

.formation-description {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 20px;
}

.formation-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 22px;
    padding: 20px 0;
    border-top: 2px solid #f5f5f5;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
    transition: all 0.3s;
}

.meta-item:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.meta-item i {
    color: var(--primary);
    font-size: 15px;
}

.btn-view {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(3,4,94,0.25);
}

.btn-view::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-view:hover::before {
    transform: translateX(100%);
}

.btn-view:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(3,4,94,0.4);
}

.btn-view i {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-view:hover i {
    transform: translateX(6px);
}

.no-results {
    text-align: center;
    padding: 100px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.no-results i {
    font-size: 100px;
    color: var(--primary);
    opacity: 0.15;
    margin-bottom: 28px;
}

.no-results h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.no-results p {
    color: var(--gray);
    font-size: 16px;
    margin-bottom: 36px;
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(3,4,94,0.25);
}

.btn-reset:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(3,4,94,0.4);
}

.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255,255,255,0.1), transparent 50%);
    animation: ctaGlow 6s ease-in-out infinite alternate;
}

@keyframes ctaGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: 42px;
    font-weight: 800;
    color: white;
    margin-bottom: 14px;
    letter-spacing: -1px;
}

.cta-content p {
    font-size: 19px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 36px;
    font-weight: 300;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.btn-cta:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.btn-cta i {
    transition: transform 0.3s;
}

.btn-cta:hover i {
    transform: translateX(4px);
}

@media (max-width: 1200px) {
    .formations-layout {
        grid-template-columns: 300px 1fr;
        gap: 40px;
    }
    
    .formations-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 1024px) {
    .formations-layout {
        grid-template-columns: 1fr;
    }
    
    .mobile-filter-toggle {
        display: flex;
    }
    
    .filtres-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 360px;
        max-width: 90vw;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        border-radius: 0;
    }
    
    .filtres-sidebar.active {
        transform: translateX(0);
        box-shadow: 20px 0 60px rgba(0,0,0,0.3);
    }
    
    .filtres-sidebar.active::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: -1;
        backdrop-filter: blur(4px);
    }
    
    .close-sidebar {
        display: flex;
    }
    
    .formations-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 28px;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 100px 0 60px;
    }
    
    .page-title {
        font-size: 38px;
    }
    
    .page-subtitle {
        font-size: 17px;
    }
    
    .formations-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .formation-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .cta-content h2 {
        font-size: 32px;
    }
    
    .cta-content p {
        font-size: 16px;
    }
    
    .formation-domaine-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 30px;
    }
    
    .page-subtitle {
        font-size: 15px;
    }
    
    .filtres-sidebar {
        width: 100%;
        max-width: 100vw;
    }
    
    .formation-titre {
        font-size: 17px;
        min-height: auto;
    }
    
    .formations-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-content h2 {
        font-size: 26px;
    }
}