/* ==========================================================================
   OMS - Organisation mondiale de la Santé (projet RP – design pro)
   ========================================================================== */
:root {
    --oms-navy: #002244;
    --oms-navy-mid: #003366;
    --oms-blue: #0093d5;
    --oms-blue-light: #4da6d9;
    --oms-white: #ffffff;
    --oms-gray: #f8f9fa;
    --oms-gray-border: #e8ecf0;
    --oms-text: #334155;
    --oms-text-dark: #002244;
    --oms-text-light: #64748b;
    --oms-radius-sm: 10px;
    --oms-radius: 14px;
    --oms-radius-lg: 20px;
    --oms-radius-xl: 24px;
    --oms-shadow: 0 4px 14px rgba(0, 35, 68, 0.06);
    --oms-shadow-hover: 0 12px 28px rgba(0, 35, 68, 0.12);
    --header-nav-height: 52px;
    --container-max: 1200px;
    --main-padding: 1.75rem 1.25rem;
    --section-gap: 2.25rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    color: var(--oms-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

/* ----- Fil d'Ariane (sous la nav) ----- */
.breadcrumb-wrap {
    background: var(--oms-gray);
    border-bottom: 1px solid var(--oms-gray-border);
    padding: 0.5rem 0;
}

.breadcrumb-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

.breadcrumb-link {
    color: var(--oms-blue);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-link:hover {
    text-decoration: underline;
    color: var(--oms-navy);
}

.breadcrumb-sep {
    color: var(--oms-text-light);
    margin: 0 0.4rem;
    font-weight: 400;
}

.breadcrumb-current {
    color: var(--oms-text-dark);
    font-weight: 600;
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--main-padding);
}

/* ----- Page header (toutes les pages sauf index) ----- */
.page-header {
    margin-bottom: var(--section-gap);
    padding-bottom: 1.25rem;
    border-bottom: 3px solid var(--oms-gray-border);
    border-radius: 0 0 var(--oms-radius-sm) 0;
}

.page-header h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 800;
    color: var(--oms-text-dark);
    letter-spacing: -0.02em;
}

.page-header .page-intro {
    margin: 0;
    font-size: 1rem;
    color: var(--oms-text);
}

/* ----- HEADER (logo + barre nav) ----- */
.site-header {
    overflow: visible;
    background: var(--oms-white);
    box-shadow: 0 2px 12px rgba(0, 35, 68, 0.06);
}

.header-top {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--oms-text-dark);
}

.logo-img {
    height: 48px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.header-nav-wrap {
    background: var(--oms-navy);
    width: 100%;
    border-radius: 0;
}

.nav-link-home {
    padding: 0.5rem 0.75rem !important;
}
.nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}
.nav-link-text {
    display: none;
}

.header-nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-nav-height);
}

.nav-main ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-main > ul > li > a {
    color: var(--oms-white);
    text-decoration: none;
    padding: 0.65rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: var(--oms-radius-sm);
    transition: background 0.2s, transform 0.15s;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-main > ul > li > a:hover {
    background: rgba(255,255,255,0.15);
}

.nav-main .dropdown > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 0.25rem;
}

.btn-login {
    background: var(--oms-white);
    color: var(--oms-navy) !important;
    font-weight: 600;
}

.btn-login:hover {
    background: var(--oms-gray);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--oms-white);
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    align-items: center;
    justify-content: center;
}

.nav-toggle:focus {
    outline: 2px solid var(--oms-white);
    outline-offset: 2px;
}

.dropdown {
    position: relative;
}

/* Sous-menus fermés par défaut ; ouverture uniquement au clic (.is-open) */
.dropdown.is-open .dropdown-menu {
    display: block !important;
}

.dropdown-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--oms-white);
    min-width: 220px;
    box-shadow: var(--oms-shadow-hover);
    border-radius: var(--oms-radius);
    padding: 0.5rem 0;
    list-style: none;
    margin: 0;
    z-index: 100;
    border: 1px solid var(--oms-gray-border);
}

.dropdown-menu a {
    color: var(--oms-text-dark) !important;
    padding: 0.5rem 1rem;
    display: block;
    font-size: 0.95rem;
}

.dropdown-menu a:hover {
    background: var(--oms-gray);
    color: var(--oms-navy) !important;
}

/* ----- HERO (index uniquement) ----- */
.hero {
    background: linear-gradient(145deg, var(--oms-navy-mid) 0%, var(--oms-blue) 50%, var(--oms-blue-light) 100%);
    color: var(--oms-white);
    padding: 3.5rem 1.75rem;
    margin: 0 calc(-1 * 1.25rem) 2rem;
    border-radius: 0 0 var(--oms-radius-xl) var(--oms-radius-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-with-bg {
    background-image: url('../Image/Mounty.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-with-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(0, 34, 68, 0.75) 0%, rgba(0, 147, 213, 0.6) 50%, rgba(77, 166, 217, 0.5) 100%);
    z-index: 0;
}

.hero-with-bg .hero-title,
.hero-with-bg .hero-subtitle,
.hero-with-bg .btn {
    position: relative;
    z-index: 1;
}

.hero-with-bg .hero-title {
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-with-bg .hero-subtitle {
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.hero-title {
    margin: 0 0 1rem;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.hero-subtitle {
    margin: 0 0 1.5rem;
    font-size: 1.05rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.hero .btn {
    background: var(--oms-white);
    color: var(--oms-navy);
    padding: 0.85rem 1.75rem;
    border-radius: var(--oms-radius);
    font-weight: 700;
    position: relative;
    z-index: 1;
    box-shadow: var(--oms-shadow);
}

.hero .btn:hover {
    background: var(--oms-gray);
    color: var(--oms-navy);
    transform: translateY(-1px);
}

/* ----- Section head (titre + lien "Toutes") - base index ----- */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--oms-gray-border);
    border-radius: 0 0 var(--oms-radius-sm) 0;
}

.section-head h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--oms-text-dark);
    letter-spacing: -0.02em;
}

.section-head .link-all {
    color: var(--oms-text-dark);
    font-weight: 600;
    text-decoration: none;
}

.section-head .link-all:hover {
    text-decoration: underline;
}

/* ----- Section title (titre avec barre bleue) ----- */
.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--oms-text-dark);
    margin: 0 0 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 4px solid var(--oms-navy);
    display: inline-block;
    letter-spacing: -0.02em;
    border-radius: 0 0 2px 0;
}

.section-block {
    margin-top: var(--section-gap);
}

.section-block:first-child { margin-top: 0; }

/* ----- News grid + news card (base index Actualités & Accès rapide) ----- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: var(--oms-white);
    border-radius: var(--oms-radius-lg);
    overflow: hidden;
    box-shadow: var(--oms-shadow);
    transition: box-shadow 0.25s, transform 0.2s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--oms-gray-border);
}

.news-card:hover {
    box-shadow: var(--oms-shadow-hover);
    transform: translateY(-4px);
}

.news-card-image {
    height: 170px;
    background: var(--oms-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--oms-text-light);
    font-size: 0.9rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Accès rapide : cartes avec logo OMS (assets/Image/Logo.svg) */
.quick-card .news-card-image {
    background-color: var(--oms-navy-mid);
}
.quick-card .news-card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../Image/Logo.svg') center/55% no-repeat;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    pointer-events: none;
}
.quick-card .news-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}
.quick-card.quick-card-pays .news-card-image { background-color: #0d4d2b; }
.quick-card.quick-card-info .news-card-image { background-color: var(--oms-navy-mid); }
.quick-card.quick-card-urgences .news-card-image { background-color: #8b2914; }
.quick-card.quick-card-data .news-card-image { background-color: #1e3a5f; }

.news-card-body {
    padding: 1rem;
    flex: 1;
}

.news-card .meta {
    color: var(--oms-text-light);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.news-card h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--oms-text-dark);
    line-height: 1.35;
}

.news-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--oms-text);
    line-height: 1.4;
}

/* ----- Profile card (Directeur général) ----- */
.profile-card {
    background: var(--oms-white);
    border-radius: var(--oms-radius-lg);
    overflow: hidden;
    box-shadow: var(--oms-shadow);
    max-width: 420px;
    border: 1px solid var(--oms-gray-border);
    transition: box-shadow 0.25s;
}

.profile-card:hover {
    box-shadow: var(--oms-shadow-hover);
}

.profile-card-image {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(145deg, var(--oms-navy) 0%, var(--oms-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

.profile-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-card-body {
    background: var(--oms-navy);
    color: var(--oms-white);
    padding: 1.5rem 1.75rem;
}

.profile-card-body .role {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.profile-card-body .name {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
}

.profile-card-body .tagline {
    font-size: 0.95rem;
    opacity: 0.95;
    font-style: italic;
    line-height: 1.45;
}

/* ----- Card & card-list (listes type index, détail article) ----- */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-list .card {
    list-style: none;
    margin: 0;
}

.card {
    background: var(--oms-white);
    border: 1px solid var(--oms-gray-border);
    border-radius: var(--oms-radius);
    padding: 1.35rem;
    transition: box-shadow 0.25s;
    box-shadow: var(--oms-shadow);
}

.card:hover {
    box-shadow: var(--oms-shadow-hover);
}

.card h1,
.card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--oms-text-dark);
}

.card h1 { font-size: 1.35rem; }

.card .meta {
    color: var(--oms-text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.card .content {
    margin-top: 0.75rem;
    color: var(--oms-text);
    line-height: 1.6;
}

.card .content p { margin: 0 0 0.5rem; }
.card .content p:last-child { margin-bottom: 0; }

.article-content .meta { margin-bottom: 0.5rem; }
.article-content .lead { font-size: 1.1rem; color: var(--oms-text); margin-bottom: 1.5rem; }
.article-content h2 { margin: 1.5rem 0 0.5rem; font-size: 1.25rem; }
.article-content h2:first-of-type { margin-top: 1rem; }
.article-content p { margin: 0 0 0.75rem; line-height: 1.6; }
.article-content ul { margin: 0.5rem 0 1rem 1.25rem; }
.article-content li { margin-bottom: 0.35rem; }

/* ----- Typo globale ----- */
h1, h2, h3 {
    color: var(--oms-text-dark);
    margin-top: 0;
    font-weight: 700;
}

h1 { font-size: clamp(1.5rem, 3vw, 1.85rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.4rem; font-weight: 800; }

/* ----- Boutons ----- */
.btn {
    display: inline-block;
    padding: 0.65rem 1.35rem;
    background: var(--oms-navy);
    color: var(--oms-white);
    border: none;
    border-radius: var(--oms-radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.btn:hover {
    background: var(--oms-navy-mid);
    color: var(--oms-white);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--oms-text-light);
}

.btn-secondary:hover {
    background: var(--oms-text);
}

.btn-danger {
    background: #c62828;
}

.btn-danger:hover {
    background: #b71c1c;
}

.btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
}

.actions-wrap {
    margin-top: 1rem;
}

/* ----- Formulaires (base index / connexion) ----- */
.form-wrap {
    max-width: 420px;
    margin-top: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    color: var(--oms-text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--oms-gray-border);
    border-radius: var(--oms-radius-sm);
    font-size: 1rem;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.alert {
    padding: 1rem 1.15rem;
    border-radius: var(--oms-radius-sm);
    margin-bottom: 1rem;
}

.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-error { background: #ffebee; color: #c62828; }
.alert-info { background: #e3f2fd; color: #1565c0; }

/* ----- Tableaux (admin) ----- */
.table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th, td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--oms-gray-border);
}

th {
    background: var(--oms-gray);
    font-weight: 600;
    color: var(--oms-text-dark);
}

/* ----- Dashboard (admin / espace-pays) - même grille que index ----- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.dashboard-card {
    background: var(--oms-white);
    border: 1px solid var(--oms-gray-border);
    border-radius: var(--oms-radius);
    padding: 1.35rem;
    text-align: center;
    box-shadow: var(--oms-shadow);
    transition: box-shadow 0.2s;
}
.dashboard-card:hover {
    box-shadow: var(--oms-shadow-hover);
}

.dashboard-card a {
    color: var(--oms-navy);
    text-decoration: none;
    font-weight: 600;
}

.dashboard-card a:hover {
    text-decoration: underline;
}

.dashboard-card .number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--oms-navy);
}

.dashboard-card p {
    margin: 0.35rem 0;
    font-size: 0.95rem;
    color: var(--oms-text);
}

/* ----- Empty state ----- */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--oms-text-light);
}

.empty-state p { margin: 0.5rem 0; }

/* ----- Utilitaires (alignés index) ----- */
.mt-0 { margin-top: 0; }
.mt-lg { margin-top: var(--section-gap); }

/* ----- FOOTER ----- */
.site-footer {
    background: var(--oms-navy);
    color: rgba(255,255,255,0.9);
    padding: 1.75rem 1.25rem;
    margin-top: auto;
    text-align: center;
    font-size: 0.9rem;
    border-radius: var(--oms-radius-xl) var(--oms-radius-xl) 0 0;
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer-inner p {
    margin: 0 0 0.5rem;
}

.site-footer .footer-disclaimer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.8rem;
    opacity: 0.85;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .breadcrumb-inner { padding: 0.5rem 1rem; }
    .main-content { padding: 1.25rem 1rem; }
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .breadcrumb-inner { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
    .nav-toggle { display: flex; }
    .nav-link-text { display: inline !important; }

    .nav-main {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--oms-navy);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 200;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    }

    .nav-main.is-open {
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-main > ul {
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 0;
        gap: 0;
    }

    .nav-main > ul > li > a {
        padding: 0.75rem 1rem;
        border-radius: 0;
    }

    .dropdown-menu {
        position: static;
        display: none !important;
        box-shadow: none;
        background: rgba(0,0,0,0.15);
        border: none;
        border-radius: 0;
        padding-left: 1rem;
        margin-bottom: 0.5rem;
    }

    .dropdown.is-open .dropdown-menu { display: block !important; }

    .dropdown-menu a {
        color: var(--oms-white) !important;
        padding: 0.5rem 0;
    }

    .dropdown-menu a:hover {
        background: rgba(255,255,255,0.1) !important;
        color: var(--oms-white) !important;
    }

    .header-nav-inner { position: relative; }

    .hero {
        padding: 2rem 1rem;
        margin: 0 -1rem 1.5rem;
    }

    .hero-title { font-size: 1.5rem; }
    .section-head h2 { font-size: 1.25rem; }
    .section-title { font-size: 1.25rem; }
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .news-card-image { height: 140px; }
    .main-content { padding: 1rem 0.75rem; }

    /* Tables en cartes sur mobile */
    .table-wrap { overflow: visible; }
    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    tr {
        margin-bottom: 1rem;
        border: 1px solid var(--oms-gray-border);
        border-radius: 8px;
        padding: 0.75rem;
    }
    td { padding: 0.35rem 0; border: none; }
    td::before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        min-width: 120px;
        color: var(--oms-text-dark);
    }
}

@media (max-width: 480px) {
    .header-top { padding: 0.5rem 0.75rem; }
    .logo-img { height: 40px; }
}
