/* ==========================================================================
   PAEEJ TECHNOPOLE — PROGRAMMES.CSS (relooké Lot 9)
   --------------------------------------------------------------------------
   Charte : doré #c4932c + bleu marine #054c7a + doré clair #f5d68f
   Polices : Poppins (body) + League Spartan (titres)
   Cible : liste publique des programmes + carte (fiche-programme-ds-programme.php)
   ========================================================================== */

/* ====== HERO ====== */
.hero-programmes {
    background: linear-gradient(135deg, #054c7a 0%, #0a6294 100%);
    color: #fff;
    padding: 60px 0 110px;
    position: relative;
    overflow: hidden;
}
.hero-programmes::before {
    content: '';
    position: absolute;
    right: -100px;
    top: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(196, 147, 44, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-programmes .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(196, 147, 44, 0.2);
    color: #f5d68f;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 16px;
}
.hero-programmes h1.titre-programme {
    font-family: 'League Spartan', sans-serif;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 12px;
    color: #fff;
    text-transform: none;
    letter-spacing: -0.5px;
}
.hero-programmes h1 .accent {
    color: #f5d68f;
}
.hero-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 680px;
    margin-bottom: 0;
}
.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.hero-stat .num {
    font-family: 'League Spartan', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #f5d68f;
    line-height: 1;
}
.hero-stat .lbl {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 4px;
}

/* ====== BARRE DE RECHERCHE FLOTTANTE ====== */
.search-floating-wrap {
    max-width: 1280px;
    margin: -50px auto 0;
    padding: 0 40px;
    position: relative;
    z-index: 10;
}
.search-floating {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    display: grid;
    grid-template-columns: 2.2fr 1.5fr 1.5fr 1.5fr 130px;
    gap: 10px;
    box-shadow: 0 12px 40px rgba(5, 76, 122, 0.18);
}
.search-field {
    background: #f6f8fb;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.search-field i.field-icon {
    color: #c4932c;
    font-size: 14px;
    flex-shrink: 0;
    z-index: 2;
}
.search-field input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #2d2e3e;
}
.search-field select {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #2d2e3e;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 16px;
}
.search-field .chev {
    color: #94a3b8;
    font-size: 12px;
    position: absolute;
    right: 14px;
    pointer-events: none;
}

/* ========== OVERRIDES CHOICES.JS ========== */
.search-field-select {
    padding: 0; /* Choices apporte son propre padding */
}
.search-field-select .field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}
.search-field-select .choices {
    width: 100%;
    margin-bottom: 0;
    padding: 0;
}
.search-field-select .choices__inner {
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 12px 26px 12px 38px;
    min-height: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #2d2e3e;
    cursor: pointer;
    transition: background 0.15s;
}
.search-field-select .choices__inner:hover {
    background: rgba(196, 147, 44, 0.05);
}
.search-field-select .choices.is-open .choices__inner {
    background: rgba(196, 147, 44, 0.08);
    border: none;
    border-radius: 12px 12px 0 0;
}
.search-field-select .choices__list--single {
    padding: 0;
}
.search-field-select .choices__list--single .choices__item {
    font-size: 13px;
    color: #2d2e3e;
    padding: 0;
    line-height: 1.4;
}
.search-field-select .choices__placeholder {
    opacity: 0.55;
    color: #5e5e5e;
}
/* Flèche dropdown */
.search-field-select .choices[data-type*="select-one"]::after {
    border-color: #94a3b8 transparent transparent transparent;
    right: 14px;
    top: 50%;
    margin-top: -2px;
}
.search-field-select .choices[data-type*="select-one"].is-open::after {
    border-color: transparent transparent #c4932c transparent;
    margin-top: -5px;
}
/* Dropdown (la liste qui s'ouvre) */
.search-field-select .choices__list--dropdown,
.search-field-select .choices__list[aria-expanded] {
    background: #fff;
    border: 1px solid #eef1f5;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 32px rgba(5, 76, 122, 0.12);
    margin-top: 0;
    padding: 6px;
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
}
.search-field-select .choices__list--dropdown .choices__item,
.search-field-select .choices__list[aria-expanded] .choices__item {
    font-size: 13px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #2d2e3e;
    font-family: 'Poppins', sans-serif;
}
.search-field-select .choices__list--dropdown .choices__item--selectable.is-highlighted,
.search-field-select .choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
    background: rgba(196, 147, 44, 0.12);
    color: #054c7a;
}
.search-field-select .choices__list--dropdown .choices__item--selectable.is-selected,
.search-field-select .choices__list[aria-expanded] .choices__item--selectable.is-selected {
    background: rgba(5, 76, 122, 0.08);
    color: #054c7a;
    font-weight: 500;
}
/* Champ de recherche dans le dropdown */
.search-field-select .choices__input {
    background: #f6f8fb;
    border-radius: 10px;
    padding: 9px 12px;
    margin: 4px 0 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    border: 1px solid #eef1f5;
    width: 100%;
    box-sizing: border-box;
}
.search-field-select .choices__input:focus {
    outline: none;
    border-color: #c4932c;
    background: #fff;
}
/* Désactivé */
.search-field-select .choices.is-disabled .choices__inner,
.search-field-select .choices.is-disabled .choices__input {
    background: transparent;
    cursor: not-allowed;
}
.search-field-select .choices.is-disabled .choices__list--single .choices__item {
    color: #94a3b8;
}
/* Wrapper du select-search en surcouche */
.search-field-select {
    background: #f6f8fb;
    border-radius: 12px;
    position: relative;
}
.search-field-select:focus-within {
    background: rgba(196, 147, 44, 0.05);
}

.search-btn-main {
    background: linear-gradient(135deg, #c4932c 0%, #d4a23c 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(196, 147, 44, 0.3);
    transition: transform 0.15s;
    padding: 0;
}
.search-btn-main:hover {
    transform: translateY(-1px);
}

/* ====== RÉSULTATS HEADER ====== */
.results-header {
    max-width: 1280px;
    margin: 32px auto 16px;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.results-count {
    font-size: 14px;
    color: #5e5e5e;
}
.results-count strong {
    color: #054c7a;
    font-size: 20px;
    font-weight: 600;
    font-family: 'League Spartan', sans-serif;
}

/* ====== HERO CARD ====== */
.featured-card-wrap {
    max-width: 1280px;
    margin: 0 auto 24px;
    padding: 0 40px;
}
.featured-inner {
    background: #fff;
    border-radius: 18px;
    display: grid;
    grid-template-columns: 380px 1fr 220px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(5, 76, 122, 0.08);
    border-left: 4px solid #c4932c;
}
.featured-img {
    background: linear-gradient(135deg, #054c7a 0%, #c4932c 100%);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.featured-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #c4932c;
    color: #fff;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}
.featured-content {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.featured-cat {
    display: inline-block;
    font-size: 11px;
    color: #c4932c;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 8px;
}
.featured-content h2 {
    font-family: 'League Spartan', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #054c7a;
    margin-bottom: 10px;
    line-height: 1.2;
}
.featured-content p {
    font-size: 13px;
    color: #5e5e5e;
    margin-bottom: 16px;
    line-height: 1.55;
}
.featured-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #5e5e5e;
}
.meta-item i {
    color: #054c7a;
    font-size: 14px;
}
.meta-localite {
    background: linear-gradient(135deg, rgba(196, 147, 44, 0.15) 0%, rgba(196, 147, 44, 0.08) 100%);
    color: #8a6620;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.meta-localite i {
    color: #c4932c;
}
.featured-aside {
    background: #fafbfd;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid #eef1f5;
}
.deadline-block {
    text-align: center;
    margin-bottom: 16px;
}
.deadline-block .countdown {
    font-family: 'League Spartan', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #c4932c;
    line-height: 1;
}
.deadline-block .label {
    font-size: 11px;
    color: #5e5e5e;
    margin-top: 4px;
}
.deadline-block .date-val {
    font-size: 13px;
    color: #054c7a;
    font-weight: 500;
    margin-top: 8px;
}
.btn-apply {
    background: #054c7a;
    color: #fff !important;
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    text-decoration: none;
}
.btn-apply:hover {
    background: #043a5e;
    color: #fff;
}
.places-summary {
    text-align: center;
    font-size: 11px;
    color: #5e5e5e;
    margin-top: 8px;
}
.places-summary strong {
    color: #15803d;
}
.places-summary strong.urgent {
    color: #c4932c;
}
.places-summary strong.danger {
    color: #b91c1c;
}

/* ====== GRILLE 3 COLONNES ====== */
.programmes-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ====== CARTE PROGRAMME (fiche-programme-ds-programme.php) ====== */
.programme-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eef1f5;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
}
.programme-card a {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.programme-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(5, 76, 122, 0.12);
}
.programme-card .card-img {
    background: linear-gradient(135deg, #d4d8e0 0%, #b8c0cc 100%);
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.programme-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.programme-card:hover .card-img img {
    transform: scale(1.05);
}
.programme-card .card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #054c7a;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}
.programme-card .card-urgent {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ef4444;
    color: #fff;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    animation: pulseUrgent 2s ease-in-out infinite;
    z-index: 2;
}
@keyframes pulseUrgent {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.03); }
}
.programme-card .card-body {
    padding: 18px 18px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.programme-card .card-body h3 {
    font-family: 'League Spartan', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #054c7a;
    margin: 0 0 12px;
    line-height: 1.3;
    min-height: 44px;
}
.programme-card .card-localite {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #c4932c;
    margin-bottom: 14px;
    font-weight: 500;
}
.programme-card .card-localite i {
    font-size: 13px;
}
.programme-card .card-localite.national {
    color: #5e5e5e;
}
.programme-card .card-localite.national i {
    color: #94a3b8;
}
.programme-card .card-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 12px;
    margin-top: auto;
    border-top: 1px solid #eef1f5;
}
.programme-card .card-meta-item {
    font-size: 11px;
    color: #5e5e5e;
    display: flex;
    align-items: center;
    gap: 4px;
}
.programme-card .card-meta-item i {
    color: #054c7a;
    font-size: 13px;
}
.programme-card .card-footer {
    padding: 12px 18px;
    background: #fafbfd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eef1f5;
}
.programme-card .card-footer .price {
    font-size: 11px;
    color: #5e5e5e;
}
.programme-card .card-footer .price strong {
    color: #15803d;
    font-weight: 600;
}
.programme-card .card-footer .price strong.urgent {
    color: #c4932c;
}
.programme-card .card-footer .price strong.danger {
    color: #b91c1c;
}
.programme-card .card-cta {
    color: #c4932c;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ====== PAGINATION ====== */
.wrapper-pagination {
    max-width: 1280px;
    margin: 20px auto 60px;
    padding: 0 40px;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.wrapper-pagination-left {
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: #5e5e5e;
    margin-bottom: 16px;
}
.wrapper-pagination-left .nb-result,
.wrapper-pagination-left .number-page,
.wrapper-pagination-left .total-page {
    color: #054c7a;
    font-weight: 600;
}
.wrapper-pagination-right {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.wrap-pagination {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #e7eaf0;
    font-size: 13px;
    color: #5e5e5e;
    font-weight: 500;
    background: #fff;
    transition: all 0.15s;
    text-decoration: none;
}
.wrap-pagination:hover {
    border-color: #c4932c;
    color: #c4932c;
}
.wrap-pagination.actif {
    background: #054c7a;
    border-color: #054c7a;
    color: #fff;
}
.void-pagination {
    padding: 0 6px;
    color: #94a3b8;
}

/* ====== ÉTAT VIDE ====== */
.empty-state {
    max-width: 600px;
    margin: 60px auto;
    text-align: center;
    padding: 40px 20px;
}
.empty-state i {
    font-size: 56px;
    color: #cbd5e1;
    margin-bottom: 16px;
}
.empty-state h2 {
    font-family: 'League Spartan', sans-serif;
    font-size: 22px;
    color: #054c7a;
    margin-bottom: 8px;
}
.empty-state p {
    color: #5e5e5e;
    font-size: 14px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1100px) {
    .programmes-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-inner { grid-template-columns: 280px 1fr; }
    .featured-aside {
        grid-column: span 2;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        border-left: none;
        border-top: 1px solid #eef1f5;
    }
    .deadline-block { margin-bottom: 0; flex: 1; text-align: left; }
    .btn-apply { flex: 1; }
    .places-summary { flex-basis: 100%; }
}
@media (max-width: 768px) {
    .hero-programmes { padding: 40px 0 90px; }
    .hero-programmes .container { padding: 0 20px; }
    .hero-programmes h1.titre-programme { font-size: 26px; }
    .hero-stats { gap: 20px; }
    .hero-stat .num { font-size: 22px; }
    .search-floating-wrap { padding: 0 20px; }
    .search-floating { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
    .search-field { padding: 12px; }
    .programmes-grid { grid-template-columns: 1fr; padding: 0 20px 30px; }
    .featured-card-wrap { padding: 0 20px; }
    .featured-inner { grid-template-columns: 1fr; }
    .featured-img { aspect-ratio: 16 / 9; }
    .featured-aside { flex-direction: column; grid-column: span 1; border-top: 1px solid #eef1f5; }
    .deadline-block { text-align: center; margin-bottom: 12px; }
    .results-header { padding: 0 20px; }
    .wrapper-pagination { padding: 0 20px 40px; }
}