@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --brand-dark-blue: #1A3B5C;
    --brand-light-blue: #007BFF;
    --brand-red: #E63946;
    --brand-gray: #ECF3F8;
    --text-color: #333333;
    --border-color: #E2E8F0;
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    background-color: #FFFFFF;
    line-height: 1.6;
}

a {
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Header */
.site-header {
    background: #FFFFFF;
    padding: 1.5rem 0 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.logo-placeholder {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brand-dark-blue);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.logo-placeholder span {
    color: var(--brand-red);
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.5rem;
}

.social-search {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-search a {
    color: var(--brand-dark-blue);
    font-size: 1.1rem;
}

.social-search a:hover {
    color: var(--brand-light-blue);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    color: var(--brand-dark-blue);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 0;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.nav-item > a:hover {
    color: var(--brand-light-blue);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.nav-item i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.nav-item:hover > a > i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #FFFFFF;
    min-width: 220px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    z-index: 200;
}

/* Ensure right-aligned menus drop down properly without expanding page width */
.nav-item:last-child .dropdown-menu {
    left: auto;
    right: 0;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 0.8rem 1.2rem;
    color: var(--brand-dark-blue);
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid #F0F4F8;
    transition: background 0.2s, color 0.2s;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: #F8FAFC;
    color: var(--brand-light-blue);
}

/* Sub-dropdown */
.dropdown-menu .has-sub-dropdown {
    position: relative;
}

.sub-dropdown-menu {
    position: absolute;
    top: -1px;
    left: 100%;
    background: #FFFFFF;
    min-width: 320px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    z-index: 210;
}

.has-sub-dropdown:hover > a {
    background: #2B76B9;
    color: #FFFFFF;
}

.has-sub-dropdown:hover > .sub-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.sub-dropdown-menu a {
    white-space: normal;
    line-height: 1.4;
    padding: 0.8rem 1.2rem;
    color: var(--brand-dark-blue);
}

/* =========================================
   Formation Cards - Grid and List Views
========================================= */

/* View Toggle */
.view-toggle {
    display: inline-flex;
    margin-bottom: 2rem;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
}

.view-toggle button {
    padding: 0.8rem 1.8rem;
    font-weight: 500;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s;
}

.view-toggle button.active {
    background: #113255;
    color: white;
}

.view-toggle button:not(.active) {
    background: #EFF4F8;
    color: #113255;
}

.view-toggle button:first-child {
    border-radius: 6px 0 0 6px;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
    padding-right: 2.5rem;
    position: relative;
    z-index: 2;
}

.view-toggle button:last-child {
    border-radius: 0 6px 6px 0;
    margin-left: -15%;
    padding-left: 2rem;
}

/* Base View Layout */
.formations-view {
    margin-bottom: 2rem;
}

.formations-view.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.formations-view.list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Base Card Styles */
.formation-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.formation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.formation-card-header {
    background: #EFF4F8;
    padding: 1.8rem;
}

.formation-card-header h3 {
    color: #113255;
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.formation-meta {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #113255;
}

.formation-meta-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.formation-meta-item i {
    width: 16px;
    text-align: center;
}

.formation-card-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.formation-tags {
    font-size: 0.75rem;
    color: #2B76B9;
    font-weight: 600;
    margin-bottom: 1rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.formation-desc {
    font-size: 0.95rem;
    color: #4A5568;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.formation-action a {
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Overrides for Grid */
.formations-view.grid .formation-card-header h3 {
    min-height: 4.8rem; /* approximate 3 lines */
}

.formations-view.grid .formation-action {
    text-align: right;
    margin-top: auto;
}

/* Overrides for List */
.formations-view.list .formation-card {
    flex-direction: column; /* maintain structure but adjust interior */
}

.formations-view.list .formation-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
}

.formations-view.list .formation-card-header h3 {
    min-height: auto;
    margin-bottom: 1.2rem;
}

.formations-view.list .formation-card-body {
    flex-direction: row;
    align-items: center;
    padding: 2rem;
}

.formations-view.list .formation-body-content {
    flex-grow: 1;
    padding-right: 2rem;
}

.formations-view.list .formation-desc {
    margin-bottom: 0;
}

.formations-view.list .formation-action {
    border-left: 1px solid var(--border-color);
    padding-left: 2rem;
    min-width: 150px;
    display: flex;
    justify-content: center;
}
/* Dashboard Sub-navigation */
.dashboard-nav {
    display: flex;
    gap: 1.5rem;
    padding: 1.2rem 0;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-nav-link {
    text-decoration: none;
    color: #637B96;
    font-size: 0.95rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    position: relative;
    transition: color 0.2s;
    cursor: pointer;
}

.dashboard-nav-link:hover, .dashboard-nav-link.active {
    color: var(--brand-dark-blue);
}

.dashboard-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--brand-red);
}

/* Modal System (Alpine.js compatible) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 50, 85, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    background: #F8FAFC;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--brand-dark-blue);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--brand-light-blue);
}
/* Hero Section */
.hero-inner {
    background: var(--brand-dark-blue);
    padding: 4rem 1rem;
    text-align: center;
    color: #FFFFFF;
}
.hero-inner h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}
.hero-inner p {
    font-size: 1.15rem;
    opacity: 0.9;
}

.hero-bf {
    background: linear-gradient(105deg, #0066CC 20%, #E30613 20%, #E30613 80%, #0066CC 80%);
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
    position: relative;
    padding-bottom: 80px; /* Space for overlapping search box */
}

.hero-bf h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.hero-bf p {
    font-size: 1.25rem;
    font-weight: 400;
}

/* Search Box Overlap */
.search-box-container {
    max-width: 900px;
    margin: -80px auto 4rem;
    position: relative;
    z-index: 10;
    padding: 0 1rem;
}

.search-box {
    background: var(--brand-dark-blue);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    color: #FFFFFF;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.search-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.search-box-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.search-box-header a {
    color: #FFFFFF;
    font-size: 0.9rem;
    text-decoration: underline;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-group input, .input-group select {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.search-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.search-options a {
    color: #FFFFFF;
}

.search-action {
    display: flex;
    justify-content: flex-end;
}

/* Global Buttons */
.btn-dark-blue {
    background: var(--brand-dark-blue);
    color: #FFFFFF;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-dark-blue:hover {
    background: #112840;
}

/* Text Section */
.text-section {
    margin-bottom: 4rem;
}

.text-section h2 {
    color: var(--brand-dark-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.text-section p {
    font-size: 1.1rem;
    max-width: 900px;
    margin-bottom: 1.5rem;
}

.text-section p a {
    color: var(--brand-light-blue);
    font-weight: 600;
    text-decoration: underline;
}

.button-group {
    display: flex;
    gap: 1rem;
}

/* News Section */
.news-section {
    margin-bottom: 4rem;
}

.news-section h2 {
    color: var(--brand-dark-blue);
    font-size: 2rem;
    margin-bottom: 2rem;
}

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

.news-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-content .category {
    color: var(--brand-light-blue);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.news-card-content h3 {
    color: var(--brand-dark-blue);
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.news-card-content .date {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.news-card-content p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more {
    color: var(--brand-light-blue);
    font-weight: 600;
    font-size: 0.9rem;
    align-self: flex-end;
}

/* Parcours de formation */
.training-path {
    background: var(--brand-gray);
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 4rem;
}

.training-path h2 {
    color: var(--brand-dark-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 3rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    width: 140px;
}

.step-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2px solid var(--brand-dark-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #4CAF50;
    background: #FFFFFF;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.step-icon i {
    color: inherit;
}
.step:nth-child(1) .step-icon { color: #4CAF50; border-color:#4CAF50; }
.step:nth-child(3) .step-icon { color: #1A3B5C; border-color:#1A3B5C; }
.step:nth-child(5) .step-icon { color: #E91E63; border-color:#E91E63; }
.step:nth-child(7) .step-icon { color: #FF9800; border-color:#FF9800; }
.step:nth-child(9) .step-icon { color: #00BCD4; border-color:#00BCD4; }

.step span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--brand-dark-blue);
}

.step-arrow {
    font-size: 1.5rem;
    color: var(--brand-dark-blue);
    opacity: 0.5;
}

/* Sessions */
.info-sessions {
    margin-bottom: 4rem;
}

.info-sessions h2 {
    color: var(--brand-dark-blue);
    font-size: 2rem;
    margin-bottom: 2rem;
}

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

.session-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.session-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--brand-dark-blue);
}

.session-date .day {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.session-date .month {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
}

.session-title {
    color: var(--brand-light-blue);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Footer */
.logos-section {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.logo-placeholder-sm {
    padding: 1rem 2rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-weight: 600;
    color: #64748B;
}

.site-footer {
    background: var(--brand-gray);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.footer-logo .logo-placeholder {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-logo .social-icons {
    display: flex;
    gap: 1rem;
}

.footer-logo .social-icons a {
    width: 35px;
    height: 35px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-dark-blue);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-links-grid ul {
    list-style: none;
}

.footer-links-grid li {
    margin-bottom: 0.8rem;
}

.footer-links-grid a {
    color: var(--brand-dark-blue);
    font-size: 0.9rem;
}

.footer-links-grid a:hover {
    text-decoration: underline;
}

/* Utilities */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-4 { margin-top: 2rem; }/* Responsive Search Box */
@media (max-width: 900px) {
    .search-box > div {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .hero-bf h1 {
        font-size: 2.5rem;
    }
}

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

.search-box-container .form-control {
    border: 1px solid #E2E8F0;
    font-family: inherit;
    transition: all 0.2s;
}

.search-box-container .form-control:focus {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
