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

body {
    font-family: "Montserrat", sans-serif;
    background-color: #f5f5f5;
    color: #171f46;
    line-height: 1.6;
}

.top-header {
    background-color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-container img {
    max-height: 60px;
    width: auto;
    display: block;
}

.logo-text {
    color: #171f46;
    font-weight: 700;
    font-size: 1.5rem;
    display: none;
}

.logo-container img:not([src]) + .logo-text,
.logo-container:has(img[src=""]) .logo-text {
    display: block;
}

.header {
    background: linear-gradient(135deg, #171f46 0%, #1a2548 100%);
    color: #deb578;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
}

.header svg {
    max-height: 250px;
    width: 15%;
}

.header .header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80%
}

.footer {
    background-color: #171f46;
    color: #deb578;
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #deb578;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

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

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

.footer-section ul li a {
    color: rgba(222, 181, 120, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #deb578;
}

.footer-bottom {
    border-top: 1px solid rgba(222, 181, 120, 0.2);
    padding-top: 1.5rem;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: rgba(222, 181, 120, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #deb578;
}

.footer-bottom p {
    color: rgba(222, 181, 120, 0.8);
    font-size: 0.85rem;
    margin: 0;
}

.footer-bottom .sponsor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(222, 181, 120, 0.6);
    font-size: 0.8rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.formations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.formation-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #deb578;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
}

.formation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.formation-card .card-main {
    flex: 1;
    min-width: 0;
}

.formation-card .card-side {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.formation-card h2 {
    color: #171f46;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.formation-card .description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.formation-card .details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.formation-card .detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.formation-card .detail-item strong {
    color: #171f46;
    font-weight: 600;
}

.formation-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.formation-card .tag {
    background-color: #deb578;
    color: #171f46;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.formation-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #171f46;
    text-align: right;
}

.formation-card .category {
    display: inline-block;
    background-color: #171f46;
    color: #deb578;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.formation-card .date-info {
    border-radius: 8px;
    margin-bottom: 1rem;
}

.formation-card .date-info .date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #DCDCDC;
    padding-bottom: 5px;
}

.formation-card .date-info .date-row:last-child {
    margin-bottom: 0;
}

.formation-card .date-info .date-label {
    font-weight: 600;
    color: #171f46;
    font-size: 0.9rem;
}

.formation-card .date-info .date-value {
    color: #555;
    font-size: 0.9rem;
}
.date-display {
    background: none;
    color: #171f46;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.date-main {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.date-day {
    font-size: 2rem;
    font-weight: 700;
    color: #171f46;
}

.date-month,
.date-year {
    font-size: 1rem;
    text-transform: capitalize;
    color: #171f46;
}

.date-range-label {
    font-size: 0.95rem;
    color: #171f46;
    letter-spacing: 0.05rem;
}

.category-row {
    margin-bottom: 0.5rem;
}

.formation-card .date-info .time-highlight {
    display: inline-block;
    background: linear-gradient(135deg, #deb578 0%, #c9a066 100%);
    color: #171f46;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(222, 181, 120, 0.3);
}

.formation-card .date-info .date-with-time {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.formation-card .date-info .date-part {
    color: #171f46;
    font-weight: 600;
}

.formation-card .date-info .time-part {
    display: inline-block;
    background: linear-gradient(135deg, #deb578 0%, #c9a066 100%);
    color: #171f46;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(222, 181, 120, 0.3);
}

.formation-card .inscription-btn {
    display: inline-block;
    background-color: #deb578;
    color: #171f46;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}

.formation-card .inscription-btn:hover {
    background-color: #c9a066;
    transform: translateY(-2px);
}

.formation-card .info-section {
    margin-bottom: 1rem;
}

.formation-card .info-section-title {
    font-weight: 600;
    color: #171f46;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: #666;
}

.error {
    background-color: #fee;
    color: #c33;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .top-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .logo-container img {
        max-height: 50px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .formations-grid {
        grid-template-columns: 1fr;
    }

    .formation-card {
        flex-direction: column;
    }

    .formation-card .card-side {
        flex: 1;
        align-items: stretch;
        width: 100%;
    }

    .formation-card .inscription-btn {
        width: 100%;
    }

    .formation-card .price {
        text-align: left;
    }

    .container {
        padding: 2rem 1rem;
    }

    .footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }
}
