@charset "utf-8";
/* sondages_veille.css — adapté pour topbar.php + menu_droit.php,
   sur le modèle de obituary.css (page nécrologie) */

html, body {
    height: auto;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans Display', sans-serif;
}

.content-block { background:none !important; box-shadow:none !important; }

/* Page content (grid column 1) */
.page-wrapper .page-content {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.page-wrapper .main-content-area {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.polls-page-container {
    max-width: 100%;
    margin: 0 auto;
    border-radius: 16px;
    padding: 4px 4px 8px 4px;
    position: relative;
    background-color: transparent;
}

.polls-empty {
    text-align: center;
    color: #667;
    font-size: 1.05em;
    padding: 40px 20px;
}

.polls-retour {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #174b8a;
    font-weight: 700;
    font-size: 0.92em;
    text-decoration: none;
    margin-bottom: 16px;
}
.polls-retour:hover {
    text-decoration: underline;
}
.polls-retour i {
    width: 16px;
    height: 16px;
}

.polls-derniere-maj {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff7ef;
    border: 1px solid #fbe3c8;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.polls-derniere-maj:hover {
    background: #fdecd9;
}
.polls-derniere-maj-eyebrow {
    flex-shrink: 0;
    font-size: 0.7em;
    font-weight: 700;
    color: #e86c00;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-right: 1px solid #f0c896;
    padding-right: 12px;
}
.polls-derniere-maj-corps {
    flex: 1;
    font-size: 0.92em;
    color: #333;
}
.polls-derniere-maj-corps strong {
    color: #174b8a;
}
.polls-derniere-maj > i {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #e86c00;
}

.polls-section-title {
    font-size: 0.95em;
    font-weight: 700;
    color: #174b8a;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 24px 0 12px;
}
.polls-section-title:first-of-type {
    margin-top: 0;
}
.polls-section-title--secondaire {
    color: #889;
}

/* Vue liste : cartes calendrier, une par élection, triées de la plus
   proche à la plus lointaine (inspiré du calendrier électoral PolitPro) */
.polls-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.polls-calendar-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #eef1f6;
    border-radius: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}
.polls-calendar-card:hover {
    border-color: #e86c00;
    transform: translateY(-1px);
}

.polls-calendar-date {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    border: 1px solid #174b8a;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.polls-calendar-date-mois {
    background: #174b8a;
    color: #fff;
    font-size: 0.62em;
    font-weight: 700;
    text-align: center;
    padding: 2px 0;
}
.polls-calendar-date-jour {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1em;
    color: #174b8a;
}
.polls-calendar-date--vide {
    border-color: #d5dae3;
}
.polls-calendar-date--vide .polls-calendar-date-jour {
    color: #aab3c0;
}
.polls-calendar-date-jour--annee {
    font-size: 0.62em;
}

.polls-calendar-infos {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.polls-calendar-pays {
    font-weight: 700;
    color: #174b8a;
    font-size: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.polls-calendar-meta {
    font-size: 0.82em;
    color: #889;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Un groupe par élection : carte blanche surélevée, style "widget" */
.polls-election-group {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(30,56,87,0.08);
    padding: 16px 18px 18px;
    margin-bottom: 20px;
}
.polls-election-group:last-child {
    margin-bottom: 0;
}

.polls-election-title {
    color: #174b8a;
    font-size: 1.2em;
    font-weight: 700;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef1f6;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.polls-type-badge {
    font-size: 0.6em;
    font-weight: 700;
    color: #e86c00;
    background: #fdf0e4;
    border-radius: 12px;
    padding: 4px 11px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.polls-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.polls-row {
    background: #fbfcfe;
    border: 1px solid #eef1f6;
    border-left: 4px solid #e86c00;
    border-radius: 10px;
    padding: 12px 14px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.polls-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30,56,87,0.10);
}

.polls-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.polls-institut {
    font-weight: 700;
    color: #174b8a;
    font-size: 0.98em;
}

.polls-date {
    color: #889;
    font-size: 0.85em;
}

.poll-bar-row {
    display: grid;
    grid-template-columns: auto 110px 1fr 42px;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
}
.poll-bar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.poll-bar-label {
    font-size: 0.85em;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.poll-bar-row--tete .poll-bar-label {
    font-weight: 700;
    color: #174b8a;
}
.poll-bar-track {
    background: #eef1f6;
    border-radius: 5px;
    height: 10px;
    overflow: hidden;
}
.poll-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s;
}
.poll-bar-value {
    font-size: 0.85em;
    text-align: right;
    color: #333;
    font-weight: 600;
}
.poll-bar-more {
    font-size: 0.8em;
    color: #889;
    margin-top: 4px;
}

/* Sidebar : aligner le haut avec le haut du cadre blanc (comme necrologie.php) */
.page-wrapper .sidebar-blocks {
    min-width: 0;
    margin-top: 74px !important;
    align-self: start;
}
.page-wrapper .main-content {
    margin-top: 0 !important;
}

/* ============================================ */
/* RESPONSIVE                                    */
/* ============================================ */
@media (max-width: 1100px) {
    .page-wrapper .page-content {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 900px) {
    .polls-page-container {
        padding: 16px 12px;
    }
    .polls-list {
        grid-template-columns: 1fr;
    }
    .poll-bar-row {
        grid-template-columns: auto 90px 1fr 38px;
    }
}

@media (max-width: 768px) {
    .page-wrapper .sidebar-blocks {
        margin-top: 16px !important;
    }

    .polls-page-container {
        padding: 14px 8px;
    }

    .polls-row-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}
