/**
 * Écoles — Habari Theme
 * Chargé sur :
 *   - is_singular('ecoles')
 *   - is_post_type_archive('ecoles')
 *   - is_singular('communes') — pour la section écoles
 */

/* ============================================================
   BADGES (niveau + secteur)
   ============================================================ */

.ecole-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ecole-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ecole-badge--niveau {
    background: var(--habari-secondary-navy);
    color: #fff;
}

.ecole-badge--secteur { background: var(--habari-dark-off); color: var(--habari-dark-shark); }
.ecole-badge--public  { background: #E8F4FD; color: #0268A5; }
.ecole-badge--privé   { background: #FFF3E0; color: #E65100; }

/* ============================================================
   SINGLE — Commune mention (au-dessus du titre)
   ============================================================ */

.ecole-commune-mention { margin-bottom: 0.15rem; }

.ecole-commune-link {
    color: var(--habari-dark-pale);
    text-decoration: none;
    font-weight: 500;
}
.ecole-commune-link:hover { color: var(--habari-primary-brand); }

/* ============================================================
   SINGLE — Contenu éditorial
   ============================================================ */

.ecole-content {
    margin-top: 1rem;
}

/* ============================================================
   SINGLE — Titres de sections
   ============================================================ */

.ecole-section-title {
    font-family: var(--habari-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--habari-secondary-navy);
    margin-bottom: 0.75rem;
    margin-top: 0;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--habari-dark-off);
}

/* ============================================================
   SINGLE — Liste des filières / dispositifs
   ============================================================ */

.ecole-dispositifs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ecole-dispositifs-list li {
    background: var(--habari-info-light, #e8f4fd);
    color: var(--habari-secondary-navy);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
}

/* ============================================================
   SINGLE — Services (badges dans la sidebar)
   ============================================================ */

.ecole-services-label {
    color: var(--habari-dark-pale);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
}

.ecole-services-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.35rem;
}

.ecole-service-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    background: var(--habari-dark-off);
    color: var(--habari-dark-shark);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ============================================================
   SINGLE — Lien Onisep
   ============================================================ */

.ecole-onisep-link {
    color: var(--habari-secondary-navy);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.ecole-onisep-link:hover { color: var(--habari-primary-brand); }

/* ============================================================
   ARCHIVE — Grille
   ============================================================ */

.ecole-archive-grid {
    display: grid;
    gap: 1.25rem;
}

.ecole-card {
    transition: box-shadow 0.15s ease;
}

.ecole-card .uk-card-title a {
    color: var(--habari-secondary-navy);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.15s;
}
.ecole-card .uk-card-title a:hover { color: var(--habari-primary-brand); }

.ecole-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.ecole-card-commune a {
    color: var(--habari-dark-pale);
    text-decoration: none;
    transition: color 0.15s;
}
.ecole-card-commune a:hover { color: var(--habari-primary-brand); }

/* ============================================================
   ARCHIVE — Filtres de niveau
   ============================================================ */

.ecole-level-filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* ============================================================
   SINGLE COMMUNE — Section Écoles
   ============================================================ */

.commune-ecoles-section {
    background: var(--habari-secondary-navy-off, #f4f6f9);
    padding: 2.5rem 0;
}

.commune-ecoles-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.commune-ecoles-voir-tout {
    color: var(--habari-primary-brand);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.commune-ecoles-voir-tout:hover { opacity: 0.75; }

.ecole-niveau-groupe { margin-bottom: 1.5rem; }

.ecole-niveau-titre {
    font-family: var(--habari-font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--habari-secondary-navy);
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Card inline dans la commune */
.ecole-card--inline .uk-card-title {
    font-size: 0.9rem;
    line-height: 1.3;
}
.ecole-card--inline .uk-card-title a {
    color: var(--habari-secondary-navy);
    text-decoration: none;
    transition: color 0.15s;
}
.ecole-card--inline .uk-card-title a:hover { color: var(--habari-primary-brand); }

/* ============================================================
   NAVIGATION (réutilise .commune-nav-intercommunes via communes.css)
   ============================================================ */

.ecole-nav { margin-top: 2rem; }

.ecole-prehead-title { padding-top: 0.15rem; }
