/* =============================================================================
   Message temporaire — Le Banc des Sardines
   ============================================================================= */

.bds-popup {
    position: fixed;
    inset: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bds-popup[hidden] {
    display: none;
}

.bds-popup__fond {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(14, 40, 74, 0.72);
    animation: bds-popup-apparition 0.25s ease;
}

.bds-popup__boite {
    position: relative;
    background: #ffffff;
    color: #33393b;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 38px 40px 32px;
    border-top: 6px solid #326cb1;
    border-radius: 4px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    text-align: center;
    animation: bds-popup-montee 0.3s ease;
}

@media screen and (max-width: 600px) {
    .bds-popup__boite {
        padding: 30px 22px 24px;
    }
}

.bds-popup__titre {
    font-family: "PT Serif Caption", Georgia, serif;
    font-size: 1.55em;
    line-height: 1.25;
    color: #326cb1;
    margin: 0 0 18px;
}

.bds-popup__corps {
    font-size: 1.05em;
    line-height: 1.65;
    text-align: left;
}

.bds-popup__corps p {
    margin: 0 0 12px;
}

.bds-popup__corps p:last-child {
    margin-bottom: 0;
}

.bds-popup__corps ul,
.bds-popup__corps ol {
    margin: 0 0 12px;
    padding-left: 22px;
}

.bds-popup__corps ul {
    list-style: disc;
}

.bds-popup__corps ol {
    list-style: decimal;
}

.bds-popup__corps a {
    color: #326cb1;
    text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   Le reset de main.css applique « font: inherit » à em, i, b, strong et mark.
   Ce raccourci remet au passage font-style et font-weight à « normal » : le
   texte mis en italique ou en gras dans l'éditeur s'affichait donc sans effet.
   On rétablit ici le sens de ces balises, uniquement à l'intérieur du message.
   -------------------------------------------------------------------------- */
.bds-popup__corps em,
.bds-popup__corps i {
    font-style: italic;
}

.bds-popup__corps strong,
.bds-popup__corps b {
    font-weight: 700;
}

.bds-popup__corps u {
    text-decoration: underline;
}

.bds-popup__corps s {
    text-decoration: line-through;
}

.bds-popup__corps mark {
    background: #ffe9a8;
    color: inherit;
    padding: 0 2px;
}

.bds-popup__fermer {
    position: absolute;
    top: 6px;
    right: 10px;
    background: none;
    border: 0;
    font-size: 30px;
    line-height: 1;
    color: #9aa3a8;
    cursor: pointer;
    padding: 6px 10px;
}

.bds-popup__fermer:hover,
.bds-popup__fermer:focus {
    color: #326cb1;
}

/* =============================================================================
   Compte à rebours, façon horloge à volets
   ============================================================================= */

.bds-rebours {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #e3e8ee;
    text-align: center;
}

.bds-rebours__intro {
    margin: 0 0 16px;
    font-size: 1em;
    font-weight: 700;          /* demandé : la phrase d'introduction en gras */
    color: #33393b;
}

.bds-rebours__horloge {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 14px;
}

.bds-rebours__unite {
    flex: 0 0 auto;
}

/* Le cadre porte les deux petits axes latéraux, comme sur une horloge mécanique. */
.bds-rebours__cadre {
    position: relative;
    display: block;
}

.bds-rebours__cadre::before,
.bds-rebours__cadre::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 9px;
    height: 13px;
    transform: translateY(-50%);
    background: #dcdfe3;
    border-radius: 2px;
}

.bds-rebours__cadre::before { left: -5px; }
.bds-rebours__cadre::after  { right: -5px; }

.bds-rebours__carte {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 86px;
    background: #ffffff;
    border-radius: 9px;
    box-shadow: 0 2px 6px rgba(15, 35, 60, .18);
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
    color: #16191c;
    overflow: hidden;
    backface-visibility: hidden;
}

/* La ligne de séparation entre les deux volets. */
.bds-rebours__carte::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    background: rgba(18, 28, 40, .16);
}

.bds-rebours__libelle {
    display: block;
    margin-top: 9px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: .68em;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #5d666e;
}

/* Basculement du volet au changement de valeur. */
.bds-rebours__carte--bascule {
    animation: bds-rebours-bascule .42s ease;
}

@keyframes bds-rebours-bascule {
    0%   { transform: rotateX(0deg); }
    45%  { transform: rotateX(-88deg); }
    46%  { transform: rotateX(88deg); }
    100% { transform: rotateX(0deg); }
}

.bds-rebours__fin {
    margin: 0;
    font-family: "PT Serif Caption", Georgia, serif;
    font-size: 1.3em;
    color: #326cb1;
    font-weight: 700;
}

/* --- Écrans étroits ------------------------------------------------------- */
@media screen and (max-width: 560px) {
    .bds-rebours__horloge { gap: 9px; }

    .bds-rebours__carte {
        width: 54px;
        height: 64px;
        font-size: 30px;
        border-radius: 7px;
    }

    .bds-rebours__cadre::before,
    .bds-rebours__cadre::after {
        width: 7px;
        height: 10px;
    }

    .bds-rebours__libelle { font-size: .6em; letter-spacing: .05em; }
}

@media screen and (max-width: 380px) {
    .bds-rebours__carte { width: 46px; height: 56px; font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
    .bds-rebours__carte--bascule { animation: none; }
}

@keyframes bds-popup-apparition {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes bds-popup-montee {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* Respect du réglage « réduire les animations » du système. */
@media (prefers-reduced-motion: reduce) {
    .bds-popup__fond,
    .bds-popup__boite {
        animation: none;
    }
}
