.overlap {
    position: absolute;
    padding: 50px;
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
}

.btn-link {
    outline: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    border: 0px;
    padding: 0;
    background: inherit;
}

.response{
    width:100%; 
    border:1px solid #DDD; 
    padding: 10px 0px ;
}

.responseStd{
    display: inline-flex;
    align-items: flex-start;
    gap: 4px;
    border-radius: 8px;
    background-color: #eee;
    border: 1px solid #ddd;
    padding: 3px 8px;
    margin-left: 5px;
    margin-right: 0.2rem;
    word-break: break-word;
}

.closeIcon{
    cursor: pointer;
    flex-shrink: 0;
}
.table thead th{
    border-top: none;
}

.btn-reply.active {
    border: #000 4px solid !important;
}

.formGroup {
    width: 350px;
    float: left;
    margin: 2px;
}

.formTitle {
    font-weight: bold;
}

.formGroup {
    border: #DDDDDD 1px solid;
    padding: 20px;
    border-radius: 10px;
}

.formLabel {
    margin-bottom: 0px;
    margin-top: .5rem;
}

.formMandSign:after {
    color: #FF0000;
    content: '*';
}

.formMandError {
    border: 2px solid #FF0000;
}

.contBody {
    min-height: 0;
}

select {
    padding: 4px;
}

.fixed-top {
    position: inherit;
}

.IDN {
    text-align: center;
    font-size: 40px;
}

.IDNinfo {
    text-align: center;
    font-size: 40px;
}

.vxlight {
    color: #999;
}

.topBlock p {
    font-size: 50px;
    font-weight: 100;
}

.topBlock-fct {
    position: absolute;
    right: 0;
    bottom: -30px;
}

.reply,
.reply-lt {
    font-size: 40px;
    font-weight: bold;
    padding: 30px 0;
}

.reply-lt {
    padding: 40px 0 0 0;
    font-size: 25px;
}

.confirm-bt {
    font-size: 20px;
    font-weight: bold;
    padding: 30px 0;
    width: 49%;
}

.formRo-val {
    font-style: italic;
}

.formRo-label {
    color: #555555;
    margin-bottom: 0px;
    margin-top: .5rem;
    font-weight: lighter;
}

.modal-backdrop {
    opacity: 0.90 !important;
}

.posInline {
    float: left;
    padding-right: 5px;
}

.posInline.vxInlineFull {
    float: none;
    display: block;
    width: 100%;
    clear: both;
}

.vXquestionBox {
    border: 1px #EEEEEE solid;
    background-color: #F9F9F9;
    padding: 10px;
}

.questionBox {
    background-color: #F5F5F5;
    padding: 10px 20px;
    border-radius: 10px;
}

.roField {
    border: 0;
    background-color: #EEE
}

.iconBtn {
    border: 0;
    width: 16px;
    opacity: 60%;
    cursor: pointer;
    vertical-align: middle;
    text-align: center;
    margin-right: 12px;
    color: #000;
}

.iconBtnOff {
    border: 0;
    width: 16px;
    opacity: 40%;
    cursor: pointer;
    vertical-align: middle;
    text-align: center;
    margin-right: 12px;
}

i.iconBtn, i.iconBtnOff {
    display: inline-block;
    width: 16px;
    font-size: 16px;
    line-height: 16px;
    text-align: center;
}

.iconBtn:hover {
    opacity: 100%;
}

.ufc{
    max-width: 300px;
}

@media only screen and (max-width: 600px) {
    .topBlock {
        font-size: 0.8rem;
    }
    .topBlock p {
        font-size: 25px;
        font-weight: normal;
    }
    /* actions (e.g. "Nouvelle votation") flow under the title instead of covering the subtitle */
    .topBlock-fct {
        position: static;
        margin-bottom: .5rem;
    }
    .IDN {
        font-size: 30px;
    }
    .reply {
        font-size: 30px;
    }
    .reply-lt,
    .confirm-bt {
        font-size: 15px;
    }
}

.wrapper {
    width: 100%;
    margin: 0 auto;
  }
  .tabs {
    position: relative;
    top: 12px;
  }
  .tabs::before,
  .tabs::after {
    content: "";
    display: table;
  }
  .tabs::after {
    clear: both;
  }
  .tab {
    float: left;
  }
  .tab-switch {
    display: none;
  }
  .tab-label {
    position: relative;
    display: block;
    line-height: 2.75em;
    height: 3em;
    padding: 0 1.618em;
    background: #fff;
    border: 1px solid #bdc3c7;
    cursor: pointer;
    top: 0;
    transition: all 0.25s;
    border-bottom: 0px;
  }
  .tab-label:hover {
    top: -0.2rem;
    padding-bottom: 0.2rem;
    transition: top 0.25s;
    
  }
    
  .tab-switch:checked + .tab-label {
    color: #fff;
    transition: all 0.35s;
    z-index: 1;

  }
  .tab-switch:checked + label + .tab-content {
    z-index: 2;
    opacity: 1;
    transition: all 0.35s;
  }

/* ── Sticky footer layout ── */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.main-content {
    flex: 1;
}

/* ── Navbar ── */
/* Match voix-app's navbar color (#212529) instead of Bootstrap 4's default .bg-dark (#343a40) */
nav.navbar.bg-dark {
    background-color: #212529 !important;
}

/* ── Footer ── */
footer.footer-main {
    margin-top: 1rem;
    background-color: #212529;
    color: #adb5bd;
    padding: 2rem 0 1rem;
}

footer.footer-main a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.2s;
}

footer.footer-main a:hover {
    color: #fff;
}

.footer-brand {
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.footer-links li {
    margin-bottom: 0.4rem;
}

.footer-bottom {
    border-top: 1px solid #343a40;
    margin-top: 1.5rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
}

/* ── voixStats tiles ── */
.vs-section {
    margin-bottom: 1.4rem;
}

.vs-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #868e96;
    margin-bottom: 0.6rem;
}

.vs-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vs-tile {
    flex: 1;
    min-width: 60px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.65rem 0.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: inherit;
    text-decoration: none;
}

.vs-tile--link,
.vs-tile--click {
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.vs-tile--link:hover,
.vs-tile--click:hover {
    background: #e9ecef;
    border-color: #ced4da;
    color: inherit;
    text-decoration: none;
}

.vs-tile-label {
    font-size: 0.63rem;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
    white-space: nowrap;
}

.vs-tile-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #212529;
}

.vs-tile-sub {
    font-size: 0.68rem;
    color: #868e96;
    margin-top: 0.2rem;
}

.vs-tile-icon {
    position: absolute;
    top: 0.35rem;
    right: 0.4rem;
    font-size: 0.65rem;
    color: #868e96;
}

.btn-vs-export {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #495057;
    font-size: 0.75rem;
    transition: background 0.15s, border-color 0.15s;
}

/* CSV export buttons: joined btn-group on desktop, separate wrapping buttons on phones */
@media (max-width: 767px) {
    .vs-export-group {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .vs-export-group > .btn-vs-export {
        flex: 1 1 auto;
        white-space: nowrap;
        margin-left: 0 !important;
        border-radius: 0.25rem !important;
    }
}

/* Questions table (votation page): full width, reply buttons wrap */
.refresh-quest {
    width: 100%;
    table-layout: fixed;
}
.refresh-quest td.vx-q-text,
.refresh-quest td.vx-q-flags {
    vertical-align: top;
}
.vx-q-replies [id$="_maj"] {
    text-align: right;
}

/* start/stop button + all result buttons on a single line, sharing the full width */
.vx-q-replies > .btn-group,
.vx-q-replies [role="group"] > .btn-group {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
}
/* desktop: each button sized to its content, everything forced on one line */
.vx-q-replies > .btn-group > [role="group"] {
    flex: 1 1 auto;
    min-width: 0;
}
.vx-q-replies .btn-group > .btn,
.vx-q-replies .btn-group > .btn-group-vertical {
    flex: 0 0 auto;
    white-space: nowrap;
}
/* more than 3 replies: stacked one under the other, filling the remaining width */
.vx-q-replies .btn-group > .btn-group-vertical {
    flex: 1 1 auto;
    min-width: 0;
}
.vx-q-replies .btn-group > .btn-group-vertical > .btn {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}
/* 3 replies or less: score above the reply, content stuck to the top (a <button> centers it vertically by default) */
.vx-q-replies .btn-group > .btn[id^="res_"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.vx-q-replies > .btn-group > .btn-question {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* desktop: joined btn-group across the nested wrappers, round only the outer ends */
@media (min-width: 768px) {
    /* reply buttons share the remaining width equally, wrapping their text rather than overflowing */
    .vx-q-replies .btn-group > .btn[id^="res_"] {
        flex: 1 1 0;
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .vx-q-replies .btn-group > .btn,
    .vx-q-replies .btn-group > .btn-group-vertical,
    .vx-q-replies .btn-group > .btn-group-vertical > .btn {
        border-radius: 0 !important;
    }
    .vx-q-replies [role="group"] > .btn-group > :first-child {
        border-top-left-radius: 0.25rem !important;
        border-bottom-left-radius: 0.25rem !important;
    }
    .vx-q-replies [role="group"] > .btn-group > :last-child,
    .vx-q-replies [role="group"] > .btn-group > .btn-group-vertical:last-child > .btn:first-child {
        border-top-right-radius: 0.25rem !important;
    }
    .vx-q-replies [role="group"] > .btn-group > :last-child,
    .vx-q-replies [role="group"] > .btn-group > .btn-group-vertical:last-child > .btn:last-child {
        border-bottom-right-radius: 0.25rem !important;
    }
    .vx-q-replies > .btn-group > .btn-question {
        border-radius: 0.25rem 0 0 0.25rem !important;
    }
    /* majority line taken out of the flow so the start/stop button only spans the buttons row,
       and placed under the start/stop button */
    .vx-q-replies > .btn-group {
        position: relative;
    }
    .vx-q-replies > .btn-group > [role="group"] > [id$="_maj"] {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
    }
    .vx-q-replies > .btn-group:has(> [role="group"] > [id$="_maj"]:not(:empty)) {
        margin-bottom: 1.5em;
    }
    .vx-q-replies > .btn-group > .btn-question + [role="group"] > .btn-group > :first-child {
        margin-left: -1px;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }
}

@media (max-width: 767px) {
    /* stack question text / replies / flags vertically on phones */
    .refresh-quest,
    .refresh-quest tbody,
    .refresh-quest tr,
    .refresh-quest td {
        display: block;
        width: 100% !important;
    }
    .refresh-quest td.vx-q-replies {
        padding: 10px 0 !important;
    }

    .refresh-quest td.vx-q-text,
    .refresh-quest td.vx-q-flags {
        padding: 6px 8px !important;
    }

    /* phones: two joined btn-groups, one per row:
       row 1 = features (start, prevote, list, result), row 2 = replies, then the majority line */
    .vx-q-replies > .btn-group,
    .vx-q-replies [role="group"] > .btn-group {
        flex-wrap: wrap;
        row-gap: 0.25rem;
    }
    .vx-q-replies > .btn-group > [role="group"],
    .vx-q-replies > .btn-group > [role="group"] > .btn-group {
        display: contents;
    }
    .vx-q-replies > .btn-group > [role="group"] > [id$="_maj"] {
        flex-basis: 100%;
    }
    .vx-q-replies .btn-group > .btn,
    .vx-q-replies > .btn-group > .btn-question {
        flex: 1 1 auto;
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
        margin-left: -1px !important;
        border-radius: 0 !important;
    }
    .vx-q-replies .btn-group > .btn-group-vertical {
        flex-basis: 100%;
        margin-left: 0 !important;
    }
    /* row starts: start button (or first feature when there is none) and first reply */
    .vx-q-replies > .btn-group > .btn-question,
    .vx-q-replies > [role="group"] > .btn-group > .btn:first-child,
    .vx-q-replies .btn-group > .btn:not([id^="res_"]) + .btn[id^="res_"] {
        margin-left: 0 !important;
        border-top-left-radius: 0.25rem !important;
        border-bottom-left-radius: 0.25rem !important;
    }
    /* row ends: result button (last feature) and last reply */
    .vx-q-replies .btn-group > .btn[onclick^="showGraph"],
    .vx-q-replies .btn-group > .btn[id^="res_"]:last-child {
        border-top-right-radius: 0.25rem !important;
        border-bottom-right-radius: 0.25rem !important;
    }

    /* forced line break between the features and the replies */
    .vx-q-replies > .btn-group::after,
    .vx-q-replies > [role="group"] > .btn-group::after {
        content: "";
        flex-basis: 100%;
        order: 1;
    }
    .vx-q-replies .btn-group > .btn[id^="res_"],
    .vx-q-replies .btn-group > .btn-group-vertical {
        order: 2;
    }
    .vx-q-replies [role="group"] > [id$="_maj"] {
        order: 3;
    }
}

.btn-vs-export:hover,
.btn-vs-export:focus {
    background: #e9ecef;
    border-color: #ced4da;
    color: #212529;
    text-decoration: none;
}

.vs-row1 {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.vs-col {
    flex: 1;
    min-width: 0;
}

.vs-col--shrink {
    flex: 0 0 auto;
}

.vs-quorum-line {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.82rem;
    color: #6c757d;
}

.btn-vs-stat {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #495057;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
}

.btn-vs-stat:hover,
.btn-vs-stat:focus {
    background: #e9ecef;
    border-color: #ced4da;
    color: #212529;
    text-decoration: none;
}

.vs-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
    overflow: hidden;
}

.vs-card-header {
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid #f1f3f5;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #868e96;
}

.vs-card-body {
    padding: 1.25rem;
}

.vs-db-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.vs-db-section {
    padding-top: 0.75rem;
    border-top: 1px solid #f1f3f5;
    margin-top: 0.25rem;
}

.vs-success-banner {
    text-align: center;
}

.vs-success-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 0.6rem;
}

.vs-success-body {
    text-align: left;
}

.vs-success-body strong {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #868e96;
}

.vs-success-body .links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.vs-success-body .links a {
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
