/* === Vide-Grenier Bénévoles — CSS public === */

.vgb-formulaire {
    max-width: 960px;
    margin: 0 auto;
    font-family: inherit;
}

/* Sections */
.vgb-section-titre {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid #0ea5e9;
    color: #0f172a;
}
.vgb-section-titre:first-child { margin-top: 0; }

.vgb-intro {
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Grille infos personnelles */
.vgb-infos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
}
.vgb-champ-full { grid-column: 1 / -1; }
.vgb-champ-groupe-tel {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.vgb-champ-commentaire { margin-top: 1.5rem; }
.vgb-champ-commentaire textarea { max-width: 100%; }

/* Bouton valider */
.vgb-btn-valider {
    display: inline-block;
    margin-top: 1.5rem;
    padding: .7rem 1.8rem;
    background: #0ea5e9;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.vgb-btn-valider:hover { background: #0284c7; }

/* Tableau planning */
.vgb-planning-scroll {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
}

.vgb-planning-public {
    border-collapse: collapse;
    width: 100%;
    min-width: 700px;
    font-size: .88rem;
}

.vgb-planning-public thead {
    position: relative;
    z-index: 3;
}
.vgb-planning-public th {
    background: #0f172a;
    color: #fff;
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}
.vgb-planning-public th.vgb-col-mission {
    text-align: left;
    min-width: 140px;
    position: sticky;
    left: 0;
    z-index: 4;
}

.vgb-row-indifferent td { background: #f0fdf4; }
.vgb-row-indifferent:hover td { background: #dcfce7; }
.vgb-row-indifferent .vgb-mission-label { background: #f0fdf4; }
.vgb-row-indifferent:hover .vgb-mission-label { background: #dcfce7; }

.vgb-label-indifferent {
    font-style: italic;
    color: #15803d;
    font-size: .85rem;
}
.vgb-badge-indiff {
    display: inline-block;
    background: #15803d;
    color: #fff;
    border-radius: 50%;
    width: 18px; height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: .75rem;
    font-weight: 700;
    margin-right: 4px;
}
.vgb-hint {
    display: block;
    font-size: .78rem;
    color: #6b7280;
    font-style: normal;
}

.vgb-mission-label {
    padding: 8px 10px;
    font-weight: 600;
    vertical-align: top;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 2px 0 4px rgba(0,0,0,.06);
}

/* Cellules */
.vgb-cell {
    padding: 4px;
    border: 1px solid #e5e7eb;
    text-align: center;
    vertical-align: middle;
    min-width: 80px;
    transition: background .1s;
}

.vgb-cell-inactive {
    background: #f3f4f6;
    color: #d1d5db;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.vgb-cell-dispo:hover {
    background: #e0f2fe;
}

.vgb-cell-pleine {
    background: #fef2f2;
    color: #ef4444;
    text-align: center;
    border: 1px solid #fecaca;
}
.vgb-cell-pleine-label { font-size: .8rem; color: #ef4444; font-weight: 600; }

/* Cellule sélectionnée */
.vgb-cell-selected {
    background: #dbeafe !important;
    border-color: #3b82f6 !important;
}

/* Cellule en mode "préférence" (plusieurs cochées sur le même créneau) */
.vgb-cell-preference {
    background: #fef9c3 !important;
    border-color: #eab308 !important;
}

.vgb-cell-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    padding: 6px 4px;
}
.vgb-cell-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0ea5e9;
}
.vgb-places-restantes {
    font-size: .75rem;
    color: #6b7280;
}

/* Cellule indifférent */
.vgb-cell-indiff {
    padding: 4px;
    border: 1px solid #e5e7eb;
    text-align: center;
    vertical-align: middle;
}
.vgb-cell-indiff .vgb-cell-label { padding: 6px; }
.vgb-cell-indiff input[type="checkbox"] { accent-color: #15803d; }

/* Message résultat */
.vgb-message {
    margin-top: 2rem;
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
}
.vgb-message-hidden { display: none; }
.vgb-message-success { background: #dcfce7; color: #15803d; border: 1.5px solid #86efac; }
.vgb-message-error   { background: #fef2f2; color: #b91c1c; border: 1.5px solid #fca5a5; }

.vgb-ferme, .vgb-notice {
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
}

/* Tooltip description mission */
#vgb-tooltip {
    position: fixed;
    z-index: 9999;
    background: #1e293b;
    color: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: .82rem;
    max-width: 260px;
    line-height: 1.5;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
    display: none;
}
.vgb-cell[data-desc]:not(.vgb-cell-pleine) {
    cursor: default;
}
.vgb-btn-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #94a3b8;
    color: #fff;
    border: none;
    font-size: .72rem;
    font-style: italic;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    font-family: Georgia, serif;
}
.vgb-btn-info:hover,
.vgb-btn-info.active { background: #0ea5e9; }

/* Responsive */
@media (max-width: 600px) {
    .vgb-champ input[type="text"],
    .vgb-champ input[type="email"],
    .vgb-champ input[type="tel"],
    .vgb-champ textarea { max-width: 100%; }
}

/* === Correctifs thème Salient === */

/* Largeur et centrage */
.vgb-formulaire {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Grille infos : empêcher la colonne droite de s'écraser */
.vgb-infos-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 2rem !important;
    width: 100% !important;
}

/* Champs texte pleine largeur dans leur colonne */
.vgb-champ input[type="text"],
.vgb-champ input[type="email"],
.vgb-champ input[type="tel"],
.vgb-champ textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    font-size: 1rem !important;
}

/* Listes à puces : neutraliser le retrait du thème */
.vgb-formulaire ul,
.vgb-formulaire ol {
    padding-left: 1.2em !important;
    margin-left: 0 !important;
}
.vgb-formulaire li {
    margin-bottom: 0.3em !important;
}

/* Paragraphes : espacements cohérents */
.vgb-formulaire p {
    margin-bottom: 0.8em !important;
    line-height: 1.6 !important;
}

/* Tableau : forcer la largeur */
.vgb-planning-scroll {
    width: 100% !important;
    overflow-x: auto !important;
}
.vgb-planning-public {
    width: 100% !important;
    min-width: 700px !important;
}


/* === Isolation complète du thème Salient === */
.vgb-wrapper {
    float: none !important;
    width: 100% !important;
    clear: both !important;
    display: block !important;
}

/* Neutraliser les styles de liste du thème */
.vgb-formulaire ul,
.vgb-formulaire ol {
    list-style: disc !important;
    padding-left: 1.5em !important;
    margin: 0 0 1em 0 !important;
    overflow: visible !important;
}
.vgb-formulaire li {
    float: none !important;
    display: list-item !important;
    margin: 0 0 0.3em 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

/* Neutraliser les floats de la grille Salient sur nos éléments */
.vgb-formulaire *,
.vgb-formulaire *::before,
.vgb-formulaire *::after {
    box-sizing: border-box !important;
}
.vgb-infos-grid {
    display: grid !important;
    float: none !important;
    width: 100% !important;
    grid-template-columns: 1fr 1fr !important;
}
.vgb-infos-grid .vgb-champ {
    float: none !important;
    width: auto !important;
    margin-right: 0 !important;
}

/* Inputs pleine largeur */
.vgb-formulaire input[type="text"],
.vgb-formulaire input[type="email"],
.vgb-formulaire input[type="tel"],
.vgb-formulaire textarea {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    display: block !important;
    box-sizing: border-box !important;
}