/* ========================================
   departements/detail.html
   ======================================== */

.dept-detail { max-width: 1100px; margin: 0 auto; }

/* ── Navigation onglets ── */
.nav-dept {
    display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-border); padding-bottom: 0.75rem;
}
.nav-dept a {
    padding: 0.5rem 1rem; border-radius: 0.5rem; text-decoration: none;
    color: var(--color-text-secondary); font-size: 0.9rem; font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.nav-dept a:hover, .nav-dept a.active { background: #2563eb; color: #fff; }

/* ── Hero ── */
.dept-hero {
    display: flex; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.dept-hero-text { flex: 1; min-width: 0; color: var(--color-text); }
.dept-hero-stats {
    display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem;
}
.dept-hero-stat {
    background: var(--color-background-light); padding: 1rem 1.5rem;
    border-radius: 0.75rem; text-align: center; min-width: 100px;
    border: 1px solid var(--color-border);
}
.dept-hero-stat strong { display: block; font-size: 1.5rem; color: #2563eb; }
body.dark-mode .dept-hero-stat strong { color: #60a5fa; }
.dept-hero-stat span { font-size: 0.8rem; color: var(--color-text-muted); }
a.dept-hero-stat {
    text-decoration: none; cursor: pointer;
    transition: transform var(--transition-speed, 0.3s), border-color var(--transition-speed, 0.3s), box-shadow var(--transition-speed, 0.3s);
}
a.dept-hero-stat:hover, a.dept-hero-stat:focus-visible {
    transform: translateY(-2px); border-color: #2563eb;
    box-shadow: 0 0.25rem 0.75rem rgba(37, 99, 235, 0.15);
}
body.dark-mode a.dept-hero-stat:hover, body.dark-mode a.dept-hero-stat:focus-visible { border-color: #60a5fa; }

/* ── Sections ── */
.dept-section { margin-bottom: 2.5rem; }
.dept-section-title {
    font-size: 1.3rem; font-weight: 600; color: var(--color-text);
    padding-bottom: 0.75rem; border-bottom: 2px solid #2563eb;
    margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem;
}

/* ── Mini-organigramme ── */
.mini-org { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.org-chef-card {
    background: var(--color-background-white); border: 2px solid #2563eb;
    border-radius: 1rem; padding: 1.25rem 2rem; text-align: center;
    box-shadow: 0 4px 16px rgba(37,99,235,0.12); max-width: 300px;
    color: var(--color-text); overflow-wrap: break-word;
}
.org-photo {
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
    border: 3px solid #2563eb; margin: 0 auto 0.75rem; display: block;
}
.org-photo-empty {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--color-background-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-muted); font-size: 2rem; margin: 0 auto 0.75rem;
}
.org-sub-row {
    display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
}
.org-sub-card {
    background: var(--color-background-white); border: 1px solid var(--color-border);
    border-radius: 0.75rem; padding: 1rem; text-align: center;
    min-width: 140px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow-wrap: break-word;
    color: var(--color-text);
}
.org-sub-photo {
    width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--color-border); margin: 0 auto 0.5rem; display: block;
}
.org-sub-photo-empty {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--color-background-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-muted); font-size: 1.3rem; margin: 0 auto 0.5rem;
}
.org-connector {
    width: 2px; height: 24px; background: var(--color-border); margin: 0 auto;
}

/* ── Badges filieres ── */
.filieres-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filiere-badge {
    padding: 0.4rem 0.8rem; border-radius: 2rem; font-size: 0.8rem;
    font-weight: 500; text-decoration: none; transition: opacity 0.2s;
}
.filiere-badge:hover { opacity: 0.8; }
.filiere-badge-licence { background: #dbeafe; color: #1d4ed8; }
.filiere-badge-master { background: #fce7f3; color: #be185d; }
body.dark-mode .filiere-badge-licence { background: #1e3a5f; color: #93c5fd; }
body.dark-mode .filiere-badge-master { background: #4a1942; color: #f9a8d4; }

/* ── Activites ── */
.activite-item {
    display: flex; gap: 1rem; padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}
.activite-date {
    background: #2563eb; color: #fff; border-radius: 0.5rem;
    padding: 0.5rem; text-align: center; min-width: 60px;
    display: flex; flex-direction: column; justify-content: center;
}
.activite-date .day { font-size: 1.3rem; font-weight: 700; line-height: 1; }
.activite-date .month { font-size: 0.7rem; text-transform: uppercase; }

/* ── Filtre pills (reutilise sur sous-pages) ── */
.dept-filter {
    display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.dept-filter a {
    padding: 0.4rem 0.8rem; border-radius: 2rem; font-size: 0.8rem;
    text-decoration: none; border: 1px solid var(--color-border);
    color: var(--color-text-secondary); transition: all 0.2s;
}
.dept-filter a:hover, .dept-filter a.active {
    background: #2563eb; color: #fff; border-color: #2563eb;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .nav-dept a { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
    .nav-dept a .fas { display: none; }
    .dept-hero { gap: 1rem; }
    .dept-hero-stat { min-width: 80px; padding: 0.75rem; }
    .dept-hero-stat strong { font-size: 1.2rem; }
    .dept-section-title { font-size: 1.1rem; }
    .org-chef-card { padding: 1rem; max-width: 100%; }
    .org-photo { width: 64px; height: 64px; }
    .org-photo-empty { width: 64px; height: 64px; font-size: 1.5rem; }
    .org-sub-card { min-width: 100%; }
    .org-sub-row { gap: 0.75rem; }
    .mini-org { gap: 1rem; }
    .activite-item { flex-wrap: wrap; }
}

/* ========================================
   departements/equipe.html
   ======================================== */

.enseignant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.enseignant-card {
    background: var(--color-background-white);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.enseignant-card .org-sub-photo,
.enseignant-card .org-sub-photo-empty {
    margin: 0; flex-shrink: 0;
}
.enseignant-info { min-width: 0; overflow-wrap: break-word; }
a.enseignant-card { transition: box-shadow 0.2s, border-color 0.2s; }
a.enseignant-card:hover { border-color: #2563eb; box-shadow: 0 4px 12px rgba(37,99,235,0.15); }
.enseignant-info strong { font-size: 0.9rem; color: var(--color-text); }
.enseignant-info small { color: var(--color-text-muted); }
.enseignant-specialite { color: #2563eb; }
body.dark-mode .enseignant-specialite { color: #60a5fa; }

@media (max-width: 480px) {
    .enseignant-grid { grid-template-columns: 1fr; }
    .enseignant-card { padding: 0.75rem; gap: 0.5rem; }
}

/* ========================================
   departements/filieres.html
   ======================================== */

.filiere-section {
    margin-bottom: 2.5rem;
    background: var(--color-background-white);
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    overflow: hidden;
}
.filiere-header {
    padding: 1rem 1.25rem;
    background: var(--color-background-light);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.filiere-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-text);
}
.sem-block {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.sem-block:last-child { border-bottom: none; }
.sem-title {
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
body.dark-mode .sem-title { color: #60a5fa; }
.programme-table {
    width: 100%;
    font-size: 0.8rem;
    border-collapse: collapse;
    color: var(--color-text);
}
.programme-table th {
    background: var(--color-background-light);
    padding: 0.4rem 0.6rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    border-bottom: 2px solid var(--color-border);
}
.programme-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}
.programme-table tr:hover td {
    background: var(--color-background-light);
}
.ue-row td {
    background: var(--color-background-light);
    font-weight: 600;
    color: var(--color-text);
    border-top: 2px solid var(--color-border);
}
.ue-type-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
}
.ue-type-FONDAMENTALE { background: #dbeafe; color: #1d4ed8; }
.ue-type-TRANSVERSALE { background: #fef3c7; color: #92400e; }
.ue-type-PROFESSIONNELLE { background: #d1fae5; color: #065f46; }
.ue-type-STAGE { background: #fce7f3; color: #be185d; }
.ue-type-MEMOIRE { background: #ede9fe; color: #5b21b6; }
body.dark-mode .ue-type-FONDAMENTALE { background: #1e3a5f; color: #93c5fd; }
body.dark-mode .ue-type-TRANSVERSALE { background: #422006; color: #fcd34d; }
body.dark-mode .ue-type-PROFESSIONNELLE { background: #064e3b; color: #6ee7b7; }
body.dark-mode .ue-type-STAGE { background: #4a1942; color: #f9a8d4; }
body.dark-mode .ue-type-MEMOIRE { background: #2e1065; color: #c4b5fd; }
.cycle-section-header {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #2563eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
body.dark-mode .cycle-section-header { border-bottom-color: #60a5fa; }
.filiere-description {
    padding: 1rem 1.25rem;
    margin: 0;
    background: var(--color-background-light);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}
.filiere-description p {
    margin: 0 0 0.5rem;
}
.filiere-description p:last-child {
    margin-bottom: 0;
}
.total-row td {
    font-weight: 700; background: var(--color-background-light); border-top: 2px solid #2563eb;
    color: var(--color-text);
}
.sem-block { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Mobile ── */
@media (max-width: 480px) {
    .filiere-header { padding: 0.75rem 1rem; }
    .filiere-header h3 { font-size: 1rem; }
    .sem-title { font-size: 0.85rem; }
    .sem-block { padding: 0.75rem; }
    .programme-table { font-size: 0.7rem; min-width: 500px; }
    .programme-table th, .programme-table td { padding: 0.3rem 0.4rem; }
}

/* ========================================
   departements/activites.html
   ======================================== */

.activite-img {
    width: 100px; height: 70px; object-fit: cover;
    border-radius: 0.5rem; flex-shrink: 0;
}
@media (max-width: 480px) {
    .dept-detail--activites .activite-item { flex-wrap: wrap; }
    .activite-img { width: 100%; height: 120px; order: -1; }
    .dept-detail--activites .activite-date { min-width: 50px; }
}

/* ========================================
   departements/liste.html
   ======================================== */

.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.dept-card {
    background: var(--color-background-white);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    /* La carte entière est un lien vers la page d'exploration */
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.dept-card:hover, .dept-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--dept-color);
    box-shadow: 0 0 0 2px var(--dept-color), 0 8px 24px rgba(0,0,0,0.18);
    color: inherit;
    outline: none;
}
.dept-card:hover .dept-card-footer .btn {
    background: var(--dept-color);
    border-color: var(--dept-color);
    color: #fff;
}
.dept-card-header {
    background: var(--dept-color);
    padding: 0.75rem 1rem;
    color: #fff;
    text-align: center;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.dept-card-header h3 {
    /* Réserve la place du sigle (DES, DSHS…) placé en haut à droite */
    padding: 0 2.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}
.dept-card-header .dept-code {
    font-size: 1.25rem;
    font-weight: 700;
    opacity: 0.3;
    position: absolute;
    top: 0.25rem;
    right: 0.75rem;
}
.dept-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.dept-chef {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.dept-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
    flex-shrink: 0;
}
.dept-photo-empty {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.dept-chef-info {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}
.dept-chef-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text);
}
.dept-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.dept-stat {
    text-align: center;
    padding: 0.5rem;
    background: var(--color-background-light);
    border-radius: 0.5rem;
}
.dept-stat-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
}
.dept-stat-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}
.dept-card-footer {
    padding: 0 1.25rem 1.25rem;
    margin-top: auto;
}
.dept-card-footer .btn {
    width: 100%;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .dept-grid { grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
    .dept-card-header { min-height: 45px; padding: 0.5rem 0.75rem; }
    .dept-card-header .dept-code { font-size: 1rem; }
    .dept-card-body { padding: 1rem; }
    .dept-card-footer { padding: 0 1rem 1rem; }
    .dept-chef-info strong { overflow-wrap: break-word; }
}

/* ========================================
   departements/profil_personnel.html
   ======================================== */

.profil-container { max-width: 900px; margin: 0 auto; }

/* ── Header card ── */
.profil-header {
    display: flex; gap: 2rem; align-items: center;
    background: var(--color-background-white);
    border: 1px solid var(--color-border);
    border-radius: 1rem; padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.profil-photo {
    width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
    border: 3px solid #2563eb; flex-shrink: 0;
}
.profil-photo-empty {
    width: 120px; height: 120px; border-radius: 50%;
    background: var(--color-background-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-muted); font-size: 3rem; flex-shrink: 0;
}
.profil-header-info { min-width: 0; }
.profil-name {
    font-size: 1.6rem; font-weight: 700; color: var(--color-text);
    margin: 0 0 0.25rem;
}
.profil-fonction {
    font-size: 0.95rem; color: var(--color-text-muted); margin-bottom: 0.5rem;
}
.profil-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Section blocks ── */
.profil-section {
    background: var(--color-background-white);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem; padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.profil-section-title {
    font-size: 1.1rem; font-weight: 600; color: var(--color-text);
    margin: 0 0 1rem; display: flex; align-items: center; gap: 0.5rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid #2563eb;
}
.profil-field { margin-bottom: 0.75rem; }
.profil-field-label {
    font-size: 0.8rem; font-weight: 600; color: var(--color-text-muted);
    text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.15rem;
}
.profil-field-value {
    color: var(--color-text); font-size: 0.95rem; line-height: 1.5;
    white-space: pre-line;
}

/* ── Badges ── */
.badge-grade {
    display: inline-block; padding: 0.3rem 0.75rem; border-radius: 2rem;
    font-size: 0.8rem; font-weight: 600;
    background: #dbeafe; color: #1d4ed8;
}
body.dark-mode .badge-grade { background: #1e3a5f; color: #93c5fd; }

.badge-fonction {
    display: inline-block; padding: 0.3rem 0.75rem; border-radius: 2rem;
    font-size: 0.8rem; font-weight: 500;
    background: #f0fdf4; color: #166534;
}
body.dark-mode .badge-fonction { background: #14532d; color: #86efac; }

.badge-role {
    display: inline-block; padding: 0.25rem 0.6rem; border-radius: 2rem;
    font-size: 0.75rem; font-weight: 500;
    background: #fef3c7; color: #92400e;
}
body.dark-mode .badge-role { background: #78350f; color: #fde68a; }

/* ── Department link ── */
.profil-dept-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    text-decoration: none; color: #2563eb; font-weight: 500;
    transition: opacity 0.2s;
}
.profil-dept-link:hover { opacity: 0.7; }
body.dark-mode .profil-dept-link { color: #60a5fa; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .profil-header {
        flex-direction: column; text-align: center; padding: 1.25rem;
    }
    .profil-name { font-size: 1.3rem; }
    .profil-badges { justify-content: center; }
}

/* ========================================
   direction/liste.html
   ======================================== */

.dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.dir-card {
    background: var(--color-background-white);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.dir-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.dir-card-header {
    padding: 1.5rem;
    color: #fff;
    text-align: center;
    position: relative;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.dir-card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}
.dir-card-header .dir-icon {
    font-size: 2rem;
    opacity: 0.3;
    position: absolute;
    top: 0.75rem;
    right: 1rem;
}
.dir-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.dir-resp {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.dir-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
    flex-shrink: 0;
}
.dir-photo-empty {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 1.3rem;
    flex-shrink: 0;
}
.dir-resp-info {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}
.dir-resp-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text);
}
.dir-stat-row {
    display: flex; flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}
.dir-stat-item {
    text-align: center;
    flex: 1;
    padding: 0.5rem;
    background: var(--color-background-light);
    border-radius: 0.5rem;
}
.dir-stat-item strong {
    display: block;
    font-size: 1.2rem;
    color: var(--color-text);
}
.dir-stat-item span {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}
.dir-card-footer {
    padding: 0 1.25rem 1.25rem;
    margin-top: auto;
}
.dir-card-footer .btn { width: 100%; }
.dir-resp-info strong { overflow-wrap: break-word; }

/* ── Mobile ── */
@media (max-width: 480px) {
    .dir-grid { grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
    .dir-card-header { min-height: 80px; padding: 1rem; }
    .dir-card-body { padding: 1rem; }
    .dir-card-footer { padding: 0 1rem 1rem; }
}

/* ========================================
   direction/detail.html
   ======================================== */

.dir-detail { max-width: 1100px; margin: 0 auto; }

/* Couleur propre au type d'entité (classe dir-entite-<type> sur .dir-detail) */
.dir-detail { --dir-color: #475569; }
.dir-entite-dg { --dir-color: #1e40af; }
.dir-entite-sg { --dir-color: #059669; }
.dir-entite-de { --dir-color: #7c3aed; }
.dir-entite-ac { --dir-color: #b45309; }

/* ── Section ── */
.dir-section { margin-bottom: 2.5rem; }
.dir-section-title {
    font-size: 1.3rem; font-weight: 600; color: var(--color-text);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--dir-color);
    margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem;
}

/* ── Hero ── */
.dir-hero {
    display: flex; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap;
    align-items: flex-start;
}
.dir-hero-text { flex: 1; min-width: 0; color: var(--color-text); }

/* ── Organigramme ── */
.dir-org { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.dir-org-card {
    background: var(--color-background-white);
    border: 2px solid var(--dir-color);
    border-radius: 1rem; padding: 1.25rem 2rem; text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08); max-width: 320px;
    color: var(--color-text); overflow-wrap: break-word;
}
.dir-org-photo {
    width: 90px; height: 90px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--dir-color);
    margin: 0 auto 0.75rem; display: block;
}
.dir-org-photo-empty {
    width: 90px; height: 90px; border-radius: 50%;
    background: var(--color-background-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-muted); font-size: 2.2rem; margin: 0 auto 0.75rem;
}
.dir-org-connector {
    width: 2px; height: 24px;
    background: var(--color-border); margin: 0 auto;
}
.dir-org-sub-row {
    display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
}
.dir-org-sub-card {
    background: var(--color-background-white); border: 1px solid var(--color-border);
    border-radius: 0.75rem; padding: 1rem; text-align: center;
    min-width: 140px; max-width: 220px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    color: var(--color-text); overflow-wrap: break-word;
}
.dir-org-sub-photo {
    width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--color-border); margin: 0 auto 0.5rem; display: block;
}
.dir-org-sub-photo-empty {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--color-background-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-muted); font-size: 1.3rem; margin: 0 auto 0.5rem;
}

/* ── Services ── */
.dir-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.dir-service-card {
    background: var(--color-background-white);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: box-shadow 0.2s;
}
.dir-service-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.dir-service-header {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.dir-service-icon {
    width: 40px; height: 40px; border-radius: 0.5rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
    background: var(--color-background-light);
    color: var(--color-text-secondary);
}
.dir-service-header h4 {
    font-size: 0.9rem; font-weight: 600; margin: 0;
    color: var(--color-text);
}
.dir-service-chef {
    display: flex; align-items: center; gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}
.dir-service-chef-photo {
    width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--color-border); flex-shrink: 0;
}
.dir-service-chef-empty {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--color-background-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-muted); font-size: 0.9rem; flex-shrink: 0;
}

/* ── Missions ── */
.dir-missions {
    background: var(--color-background-light);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    color: var(--color-text);
    white-space: pre-line;
    line-height: 1.8;
    font-size: 0.9rem;
}

/* ── Navigation retour ── */
.dir-back {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin-bottom: 1.5rem; font-size: 0.9rem;
    color: var(--color-text-secondary); text-decoration: none;
}
.dir-back:hover { color: var(--color-text); }
.dir-service-header h4 { overflow-wrap: break-word; }

/* ── Mobile ── */
@media (max-width: 480px) {
    .dir-hero { gap: 1rem; }
    .dir-section-title { font-size: 1.1rem; }
    .dir-org-card { padding: 1rem; max-width: 100%; }
    .dir-org-photo { width: 64px; height: 64px; }
    .dir-org-photo-empty { width: 64px; height: 64px; font-size: 1.5rem; }
    .dir-org-sub-card { min-width: 100%; max-width: 100%; }
    .dir-org-sub-row { gap: 0.75rem; }
    .dir-org { gap: 1rem; }
    .dir-services-grid { grid-template-columns: 1fr; }
    .dir-service-card { padding: 1rem; }
    .dir-missions { padding: 1rem; font-size: 0.85rem; }
}

/* ========================================
   services/liste.html
   ======================================== */

.svc-categories { max-width: 1100px; margin: 0 auto; }
.svc-category { margin-bottom: 2.5rem; }
.svc-category-title {
    font-size: 1.2rem; font-weight: 600; color: var(--color-text);
    padding-bottom: 0.75rem; margin-bottom: 1.25rem;
    border-bottom: 2px solid #2563eb;
    display: flex; align-items: center; gap: 0.5rem;
}
.svc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.svc-card {
    background: var(--color-background-white);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.svc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.svc-card-header {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.svc-icon {
    width: 44px; height: 44px; border-radius: 0.5rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
    color: #fff;
}
.svc-icon-admin { background: #059669; }
.svc-icon-acad { background: #7c3aed; }
.svc-icon-finance { background: #b45309; }
.svc-icon-dg { background: #1e40af; }
.svc-icon-conseil { background: #475569; }
.svc-card-header h3 {
    font-size: 0.9rem; font-weight: 600; margin: 0;
    color: var(--color-text); line-height: 1.3;
}
.svc-card-chef {
    display: flex; align-items: center; gap: 0.5rem;
    margin-top: auto; padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}
.svc-chef-photo {
    width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--color-border); flex-shrink: 0;
}
.svc-chef-empty {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--color-background-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-muted); font-size: 0.9rem; flex-shrink: 0;
}
.svc-rattachement {
    display: inline-block; font-size: 0.65rem; font-weight: 600;
    padding: 0.15rem 0.4rem; border-radius: 0.25rem;
    background: var(--color-background-light); color: var(--color-text-muted);
    margin-top: 0.25rem;
}
.svc-card-header h3 { overflow-wrap: break-word; }

/* ── Mobile ── */
@media (max-width: 480px) {
    .svc-grid { grid-template-columns: 1fr; }
    .svc-card { padding: 1rem; }
    .svc-category-title { font-size: 1rem; }
}

/* ========================================
   services/detail.html
   ======================================== */

.svc-detail { max-width: 900px; margin: 0 auto; }
.svc-back {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin-bottom: 1.5rem; font-size: 0.9rem;
    color: var(--color-text-secondary); text-decoration: none;
}
.svc-back:hover { color: var(--color-text); }
.svc-section { margin-bottom: 2rem; }
.svc-section-title {
    font-size: 1.2rem; font-weight: 600; color: var(--color-text);
    padding-bottom: 0.5rem; border-bottom: 2px solid #2563eb;
    margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem;
}
.svc-info-card {
    background: var(--color-background-white);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem; padding: 1.25rem;
    color: var(--color-text);
}
.svc-rattachement-badge {
    display: inline-block; padding: 0.3rem 0.75rem;
    border-radius: 2rem; font-size: 0.8rem; font-weight: 500;
    background: var(--color-background-light); color: var(--color-text-secondary);
    border: 1px solid var(--color-border); margin-bottom: 1rem;
}

/* Mini-organigramme */
.svc-org { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.svc-org-chef {
    background: var(--color-background-white); border: 2px solid #2563eb;
    border-radius: 1rem; padding: 1.25rem 2rem; text-align: center;
    box-shadow: 0 4px 16px rgba(37,99,235,0.12); max-width: 300px;
    color: var(--color-text);
}
.svc-org-photo {
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
    border: 3px solid #2563eb; margin: 0 auto 0.75rem; display: block;
}
.svc-org-photo-empty {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--color-background-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-muted); font-size: 2rem; margin: 0 auto 0.75rem;
}
.svc-org-connector {
    width: 2px; height: 24px; background: var(--color-border); margin: 0 auto;
}
.svc-org-row {
    display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
}
.svc-org-sub {
    background: var(--color-background-white); border: 1px solid var(--color-border);
    border-radius: 0.75rem; padding: 1rem; text-align: center;
    min-width: 140px; max-width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); color: var(--color-text);
    overflow-wrap: break-word;
}
.svc-org-sub-photo {
    width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--color-border); margin: 0 auto 0.5rem; display: block;
}
.svc-org-sub-photo-empty {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--color-background-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-muted); font-size: 1.2rem; margin: 0 auto 0.5rem;
}
.svc-org-chef { overflow-wrap: break-word; }

/* ── Mobile ── */
@media (max-width: 480px) {
    .svc-section-title { font-size: 1rem; }
    .svc-org-chef { padding: 1rem; max-width: 100%; }
    .svc-org-photo { width: 64px; height: 64px; }
    .svc-org-photo-empty { width: 64px; height: 64px; font-size: 1.5rem; }
    .svc-org-sub { min-width: 100%; max-width: 100%; }
    .svc-org-row { gap: 0.75rem; }
    .svc-org { gap: 1rem; }
    .svc-info-card { padding: 1rem; }
}
