/* ===== Page Formation Styles ===== */

/* Hero Section */
.formation-hero {
    background: linear-gradient(135deg, var(--ats-blue-dark) 0%, var(--ats-blue-light) 100%);
    padding: 100px 0;
    text-align: center;
    color: var(--ats-white);
    position: relative;
    overflow: hidden;
}

.formation-hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><path d="M30 0 L60 30 L30 60 L0 30 Z" fill="rgba(255,255,255,0.02)"/></svg>');
    opacity: 0.1;
    animation: rotate 60s linear infinite;
}

.formation-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.formation-hero h1 {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease;
}

.formation-hero p {
    font-size: 20px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Section Tag */
.section-tag {
    display: inline-block;
    background: var(--ats-red);
    color: var(--ats-white);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

/* Introduction */
.formation-intro {
    padding: 80px 0;
    text-align: center;
}

.intro-wrapper {
    max-width: 900px;
    margin: 0 auto 50px;
}

.intro-wrapper h2 {
    font-size: 42px;
    color: var(--ats-blue-dark);
    margin: 20px 0 30px;
    line-height: 1.3;
}

.intro-text {
    font-size: 18px;
    color: #666;
    line-height: 1.8;
}

.formation-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.formation-stats .stat-item {
    text-align: center;
}

.formation-stats .stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: var(--ats-red);
    line-height: 1;
    margin-bottom: 10px;
}

.formation-stats .stat-label {
    font-size: 16px;
    color: #666;
}

/* Catégories */
.formation-categories {
    padding: 80px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    background: var(--ats-white);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(227, 17, 47, 0.1);
}

.category-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 40px;
    color: var(--ats-white);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(360deg);
}

.category-card h3 {
    font-size: 20px;
    color: var(--ats-blue-dark);
    margin-bottom: 15px;
}

.category-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.category-link {
    color: var(--ats-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.category-link:hover {
    gap: 10px;
    color: var(--ats-blue-dark);
}

/* Liste des formations */
.formations-list {
    padding: 80px 0;
}

.formation-item {
    background: var(--ats-white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    overflow: hidden;
}

.formation-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border-bottom: 2px solid #eee;
}

.formation-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--ats-white);
    flex-shrink: 0;
}

.formation-title {
    flex: 1;
}

.formation-title h3 {
    font-size: 22px;
    color: var(--ats-blue-dark);
    margin-bottom: 10px;
}

.formation-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.formation-meta span {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.formation-meta i {
    color: var(--ats-red);
}

.formation-price {
    text-align: right;
}

.price {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--ats-red);
    line-height: 1;
}

.price-note {
    font-size: 12px;
    color: #999;
}

.formation-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 30px;
}

.formation-description h4 {
    font-size: 16px;
    color: var(--ats-blue-dark);
    margin: 20px 0 10px;
}

.formation-description h4:first-child {
    margin-top: 0;
}

.formation-description p {
    color: #666;
    line-height: 1.7;
    font-size: 14px;
    margin-bottom: 20px;
}

.formation-description ul {
    list-style: none;
    margin-bottom: 20px;
}

.formation-description li {
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.formation-description li i {
    color: var(--ats-red);
    font-size: 16px;
}

.programme {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.programme-day {
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
    font-size: 14px;
    color: #555;
}

.programme-day:last-child {
    border-bottom: none;
}

.formation-prerequis {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--ats-blue-light);
}

.formation-prerequis p {
    margin: 0;
    font-size: 14px;
}

.formation-sidebar .sidebar-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    position: sticky;
    top: 100px;
}

.formation-sidebar h4 {
    font-size: 18px;
    color: var(--ats-blue-dark);
    margin-bottom: 20px;
}

.dates-list {
    list-style: none;
    margin-bottom: 25px;
}

.dates-list li {
    margin-bottom: 12px;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dates-list i {
    color: var(--ats-red);
}

.btn-block {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
}

/* Formateurs */
.formation-trainers {
    padding: 80px 0;
}

.trainers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.trainer-card {
    background: var(--ats-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.trainer-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(227, 17, 47, 0.1);
}

.trainer-image {
    height: 300px;
    overflow: hidden;
}

.trainer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.trainer-card:hover .trainer-image img {
    transform: scale(1.1);
}

.trainer-info {
    padding: 25px;
    text-align: center;
}

.trainer-info h3 {
    font-size: 20px;
    color: var(--ats-blue-dark);
    margin-bottom: 5px;
}

.trainer-specialty {
    display: inline-block;
    background: var(--ats-red);
    color: var(--ats-white);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    margin-bottom: 15px;
}

.trainer-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.trainer-social a {
    width: 35px;
    height: 35px;
    background: #f0f0f0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ats-blue-dark);
    transition: all 0.3s ease;
}

.trainer-social a:hover {
    background: var(--ats-red);
    color: var(--ats-white);
}

/* Modalités */
.formation-modalities {
    padding: 80px 0;
}

.modalities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.modality-item {
    text-align: center;
    padding: 40px 30px;
    background: var(--ats-white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.modality-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(227, 17, 47, 0.1);
}

.modality-icon {
    width: 80px;
    height: 80px;
    background: var(--ats-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--ats-white);
    transition: all 0.3s ease;
}

.modality-item:hover .modality-icon {
    background: var(--ats-blue-dark);
    transform: scale(1.1) rotate(360deg);
}

.modality-item h3 {
    font-size: 18px;
    color: var(--ats-blue-dark);
    margin-bottom: 15px;
}

.modality-item p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Calendrier */
.formation-calendar {
    padding: 80px 0;
}

.calendar-table {
    overflow-x: auto;
    margin-top: 40px;
}

.calendar-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ats-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.calendar-table th {
    background: var(--ats-blue-dark);
    color: var(--ats-white);
    padding: 15px;
    font-weight: 500;
    font-size: 14px;
}

.calendar-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.calendar-table tr:last-child td {
    border-bottom: none;
}

.calendar-table tr:hover td {
    background: #f8f9fa;
}

.btn-calendar {
    display: inline-block;
    padding: 6px 15px;
    background: var(--ats-red);
    color: var(--ats-white);
    text-decoration: none;
    border-radius: 50px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.btn-calendar:hover {
    background: var(--ats-blue-dark);
    transform: scale(1.05);
}

/* FAQ Formation */
.formation-faq {
    padding: 80px 0;
}

.faq-formation-grid {
    max-width: 900px;
    margin: 40px auto 0;
}

.faq-formation-item {
    background: var(--ats-white);
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.faq-formation-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-formation-question:hover {
    background: #f8f9fa;
}

.faq-formation-question h4 {
    font-size: 16px;
    color: var(--ats-blue-dark);
    margin: 0;
    font-weight: 500;
}

.faq-toggle {
    width: 30px;
    height: 30px;
    background: var(--ats-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ats-white);
    transition: all 0.3s ease;
}

.faq-formation-item.active .faq-toggle {
    background: var(--ats-blue-dark);
}

.faq-formation-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-formation-item.active .faq-formation-answer {
    padding: 0 20px 20px;
    max-height: 200px;
}

.faq-formation-answer p {
    color: #666;
    line-height: 1.7;
    font-size: 14px;
}

/* CTA */
.formation-cta {
    background: linear-gradient(135deg, var(--ats-red) 0%, var(--ats-red-light) 100%);
    padding: 100px 0;
    text-align: center;
    color: var(--ats-white);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Responsive */
@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trainers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modalities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .formation-hero h1 {
        font-size: 42px;
    }
    
    .formation-content {
        grid-template-columns: 1fr;
    }
    
    .formation-sidebar .sidebar-box {
        position: static;
    }
    
    .formation-header {
        flex-direction: column;
        text-align: center;
    }
    
    .formation-price {
        text-align: center;
    }
    
    .formation-meta {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .formation-hero h1 {
        font-size: 32px;
    }
    
    .formation-hero p {
        font-size: 16px;
    }
    
    .intro-wrapper h2 {
        font-size: 28px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .trainers-grid {
        grid-template-columns: 1fr;
    }
    
    .modalities-grid {
        grid-template-columns: 1fr;
    }
    
    .formation-stats {
        gap: 30px;
    }
    
    .formation-stats .stat-number {
        font-size: 36px;
    }
    
    .formation-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}