/* ============================================
   Widget « Menu au self » (page d'accueil)
   Icône assiette + couverts, en bas à gauche
   juste au-dessus du pied de page. Panneau au
   survol, épinglable au clic, onglets des jours.
   ============================================ */

/* Barre alignée sur la largeur du site, collée au-dessus du footer */
.self-widget-bar {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 16px;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
}

.self-widget {
    position: relative;
    z-index: 300;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* Bouton flottant (assiette + couverts) */
.self-widget-fab {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: var(--color-1, #1a4d8f);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
    transition: transform .15s, background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.self-widget-fab:hover { transform: translateY(-2px) scale(1.04); background: var(--color-3, #2d6bb5); }
.self-widget.pinned .self-widget-fab { background: var(--color-3, #2d6bb5); box-shadow: 0 6px 20px rgba(0,0,0,.4); }

/* Panneau : s'ouvre vers le haut depuis l'icône, aligné à gauche */
.self-widget-panel {
    display: none;
    position: absolute;
    left: 0;
    right: auto;
    bottom: calc(100% + 10px);
    width: min(360px, calc(100vw - 32px));
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    /* Aucune barre de défilement visible (le contenu reste défilable si besoin) */
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* Edge / IE */
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 46px rgba(0, 0, 0, .32);
    border: 1px solid #eee;
}
.self-widget-panel::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Affichage au survol et quand épinglé */
.self-widget:hover .self-widget-panel,
.self-widget.pinned .self-widget-panel { display: block; }

.self-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    background: var(--color-1, #1a4d8f);
    color: #fff;
    border-radius: 14px 14px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}
.self-widget-title { font-size: 14px; font-weight: 700; }
.self-widget-close {
    border: none;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}
.self-widget-close:hover { background: rgba(255, 255, 255, .32); }

.self-widget-week { padding: 10px 14px 0; font-size: 13px; font-weight: 700; color: var(--color-1, #1a4d8f); }
.self-widget-range { padding: 0 14px; font-size: 11px; color: #999; }

.self-widget-days { display: flex; gap: 4px; flex-wrap: wrap; padding: 10px 14px 4px; }
.self-widget-daytab {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 7px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-4, #333);
    cursor: pointer;
    font-family: inherit;
}
.self-widget-daytab:hover { background: #f0f4fa; }
.self-widget-daytab.active { background: var(--color-1, #1a4d8f); color: #fff; border-color: var(--color-1, #1a4d8f); }
.self-widget-daytab.today::after { content: ' •'; color: #f0b43c; }
.self-widget-daytab.active.today::after { color: #ffe08a; }

.self-widget-body { padding: 6px 14px 4px; }
.self-widget-day { display: none; }
.self-widget-day.active { display: block; }
.self-widget-sec { margin-top: 10px; }
.self-widget-sec h4 {
    margin: 0 0 3px;
    font-size: 11px;
    letter-spacing: .4px;
    color: var(--color-1, #1a4d8f);
    text-transform: uppercase;
}
.self-widget-sec.equilibre { background: #f3fbf5; border-radius: 8px; padding: 8px 10px; }
.self-widget-sec.equilibre h4 { color: #15803d; }
.self-widget-sec .txt { font-size: 13px; line-height: 1.45; color: var(--color-4, #333); white-space: pre-line; }
.self-widget-empty { color: #999; font-size: 12px; font-style: italic; padding: 6px 0; }

.self-widget-foot {
    padding: 10px 14px 14px;
    border-top: 1px solid #eee;
    margin-top: 8px;
}
.self-widget-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-1, #1a4d8f);
    text-decoration: none;
}
.self-widget-link:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .self-widget-bar { padding: 0 12px 14px; }
    .self-widget-fab { width: 52px; height: 52px; font-size: 25px; }
}
