/* ===============================
GLOBAL
=============================== */

.org-chart-page {
    max-width: 1380px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    font-family: Arial, sans-serif;
    color: #1f2937;
}

.org-chart-page,
.org-chart-page *,
.olima-modal-overlay,
.olima-modal-overlay * {
    box-sizing: border-box;
}

.org-chart-page button,
.olima-modal-overlay button {
    font: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* ===============================
HEADER
=============================== */

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.3rem;
    margin-bottom: 8px;
    color: #0f172a;
}

.hero p {
    color: #667085;
}

/* ===============================
STRUCTURE ARBRE
=============================== */

.org-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-level {
    display: flex;
    justify-content: center;
    gap: 24px;
    width: 100%;
}

.level-2 {
    margin-top: 20px;
    flex-wrap: wrap;
}

.tree-line-vertical {
    width: 2px;
    height: 36px;
    background: #cbd5e1;
}

.tree-line-horizontal {
    width: min(1100px, 82%);
    height: 2px;
    background: #cbd5e1;
}

/* ===============================
CARDS ORGANIGRAMME
=============================== */

.tree-card {
    width: 280px;
    min-height: 170px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: all 0.25s ease;
}

.tree-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.10);
    border-color: #14b8a6;
}

.tree-card-main {
    width: 340px;
}

.tree-badge {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 14px;
}

.tree-card h2,
.tree-card h3 {
    margin: 0 0 10px;
    color: #0f172a;
}

.tree-card p {
    color: #4b5563;
}

/* ===============================
GRID FORMATEURS
=============================== */

.olima-person-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* ===============================
CARTE FORMATEUR
=============================== */

.olima-person-card {
    text-align: left;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    transition: all 0.25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.olima-person-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: #14b8a6;
}

/* ===============================
IMAGES (BASE)
=============================== */

.olima-person-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: top center;
    border-radius: 14px;
    margin-bottom: 14px;
    background: #e5e7eb;
    transition: transform 0.3s ease;
}

.olima-person-card:hover img {
    transform: scale(1.04);
}

/* ===============================
CORRECTIONS INDIVIDUELLES
=============================== */

/* Olivia */
.photo-olivia {
    object-position: 50% 10% !important;
    transform: translateY(-15px);
}

/* Christelle (exemple déjà vu) */
.photo-christelle {
    object-position: 50% 5%;
}

/* ===============================
TEXTES
=============================== */

.olima-person-card h4 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.olima-person-card p {
    margin: 0;
    font-size: 15px;
    color: #0f766e;
    font-weight: 600;
}

/* ===============================
MODALES
=============================== */

.olima-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 99999;
}

.olima-modal-overlay.active {
    display: flex;
}

.olima-modal {
    width: 100%;
    max-height: 88vh;
    overflow: auto;
    background: #ffffff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.olima-modal-large { max-width: 820px; }
.olima-modal-xl { max-width: 1100px; }
.olima-modal-medium { max-width: 680px; }

.olima-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eef2f7;
    font-size: 20px;
}

.olima-modal h2 {
    margin-bottom: 10px;
}

.olima-modal-subtitle {
    color: #0f766e;
    font-weight: 600;
    margin-bottom: 18px;
}

.olima-mission-list {
    padding-left: 20px;
}

.olima-mission-list li {
    margin-bottom: 10px;
}

/* ===============================
RESPONSIVE
=============================== */

@media (max-width: 1024px) {
    .olima-person-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tree-level {
        flex-direction: column;
        align-items: center;
    }

    .olima-person-grid {
        grid-template-columns: 1fr;
    }

    .tree-card {
        width: 100%;
        max-width: 420px;
    }
}