:root {
    --gallimea-primary:   #1e40af;
    --gallimea-secondary: #303030;
}

.gallimea-adresses-wrap {
    overflow-x: auto;
    max-width: 100%;
    margin: 16px 0;
}

/* Toolbar */
.gallimea-adresses-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.gallimea-adresses-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.gallimea-search,
.gallimea-filter {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    color: #1d2327;
    background: #fff;
}

.gallimea-search { min-width: 200px; }

.gallimea-btn {
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid var(--gallimea-primary);
    background: var(--gallimea-primary);
    color: #fff;
    text-decoration: none;
    display: inline-block;
    transition: opacity .15s;
}

.gallimea-btn:hover { opacity: .85; color: #fff; }

.gallimea-btn--reset {
    background: transparent;
    color: var(--gallimea-secondary);
    border-color: var(--gallimea-secondary);
}

.gallimea-btn--reset:hover { opacity: .7; color: var(--gallimea-secondary); }

/* Panneau colonnes */
.gallimea-cols-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--gallimea-primary);
    border-radius: 4px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.gallimea-cols-panel strong {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--gallimea-primary);
}

.gallimea-cols-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-bottom: 12px;
}

.gallimea-cols-list label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    cursor: pointer;
}

/* Tableau */
.gallimea-adresses-table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
    font-size: 14px;
}

.gallimea-adresses-table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--gallimea-primary);
    color: #ffffff !important;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 2px solid var(--gallimea-primary);
}

.gallimea-adresses-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f1;
    color: #1d2327;
    vertical-align: top;
}

.gallimea-adresses-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--gallimea-primary) 6%, white);
}

.gallimea-adresses-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.gallimea-adresses-table tbody tr:hover {
    background: color-mix(in srgb, var(--gallimea-primary) 14%, white);
}

.gallimea-adresses-table tbody tr:last-child td { border-bottom: none; }

/* Cartes */
.gallimea-cartes {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 260px, 1fr ) );
    gap: 16px;
    margin: 16px 0;
}

.gallimea-carte {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid var(--gallimea-primary);
    border-radius: 6px;
    padding: 16px;
    font-size: 14px;
}

.gallimea-carte__row {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f1;
}

.gallimea-carte__row:last-child {
    border-bottom: none;
}

.gallimea-carte__label {
    color: var(--gallimea-secondary);
    font-size: 12px;
    min-width: 100px;
    padding-top: 1px;
}

.gallimea-carte__value {
    color: #1d2327;
    font-weight: 500;
    flex: 1;
}

/* Fiche adresse front : sections en cases sur deux colonnes maximum.
   Le minmax(max(240px, calc(50% - 8px)), 1fr) plafonne chaque case à la
   moitié du conteneur au minimum : une 3e colonne ne peut donc jamais
   tenir, même sur un écran très large. Sous 240px de largeur par case
   (mobile, ou widget/conteneur étroit côté thème), la grille repasse
   elle-même à une seule colonne — plus fiable qu'un point de rupture basé
   sur la largeur de la fenêtre. */
.gallimea-fiche-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(max(240px, calc(50% - 8px)), 1fr));
    gap: 16px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

.gallimea-fiche-box {
    background: var(--gpo-bg, #f8fafc);
    border: 1px solid var(--gpo-border, #e2e8f0);
    border-radius: var(--gpo-radius, 10px);
    padding: 18px 20px;
    box-sizing: border-box;
    min-width: 0;
    overflow-wrap: anywhere;
}

.gallimea-fiche-box__title {
    font-size: 12px;
    font-weight: 700;
    color: var(--gallimea-primary);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gpo-border, #e2e8f0);
}

.gallimea-fiche-box .gpo-info-row { border-bottom-color: rgba(0,0,0,.05); }
.gallimea-fiche-box .gpo-info-label { min-width: 110px; }

/* Case "Informations" de la fiche adresse front : valeurs sans libellé
   (email, téléphone, adresse postale...) — le format se reconnaît de
   lui-même, une ligne par valeur, sans le séparateur des lignes label/valeur. */
.gallimea-fiche-line {
    font-size: 14px;
    color: var(--gpo-text, #1d2327);
    font-weight: 500;
    padding: 5px 0;
}
.gallimea-fiche-line a { color: inherit; }

/* Lignes de l'adresse postale (rue, NPA/localité, pays) : pas d'espacement
   entre elles, pour qu'elles se lisent comme un seul bloc d'adresse. */
.gallimea-fiche-line--tight { padding: 0; line-height: 1.4; }
.gallimea-fiche-line--tight + .gallimea-fiche-line--tight { margin-top: 0; }

/* Indice de défilement horizontal du tableau (page front Adresses), affiché
   uniquement quand l'écran est trop étroit pour montrer toutes les colonnes. */
.gallimea-scroll-hint {
    font-size: 11px;
    color: #94a3b8;
    margin: 6px 0 0;
    text-align: center;
    display: none;
}

@media (max-width: 640px) {
    .gallimea-scroll-hint { display: block; }
}
