/* === ATM FEES WORLDWIDE - Mobile First, Travel Style === */

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --accent: #ff6f3c;
    --accent-dark: #e55a2b;
    --accent-light: #fff3e0;
    --success: #27ae60;
    --success-light: #e8f8f0;
    --warning: #f39c12;
    --danger: #e74c3c;
    --bg: #f5f7fa;
    --bg-warm: #fff9f5;
    --card-bg: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --text-muted: #b2bec3;
    --border: #dfe6e9;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* === HEADER === */
.header {
    background: #eef3f8;
    color: var(--text);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-bottom: 1px solid #d4e0ed;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-icon { font-size: 1.5rem; }
.logo-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    color: #4a6785;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(0,0,0,0.06);
    color: var(--primary);
}

/* === LANGUAGE DROPDOWN === */
.lang-dropdown {
    position: relative;
    margin-left: 0.5rem;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.12);
    color: #4a6785;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.lang-dropdown-btn:hover {
    background: rgba(0,0,0,0.06);
}

.lang-dropdown-btn .fi {
    font-size: 1rem;
    border-radius: 2px;
}

.lang-chevron {
    transition: transform 0.2s;
    opacity: 0.7;
}

.lang-dropdown.open .lang-chevron {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    min-width: 160px;
    z-index: 200;
    overflow: hidden;
    border: 1px solid var(--border);
}

.lang-dropdown.open .lang-dropdown-menu {
    display: block;
    animation: langDropIn 0.15s ease-out;
}

@keyframes langDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    transition: background 0.15s;
}

.lang-dropdown-item:hover {
    background: var(--bg);
}

.lang-dropdown-item.active {
    background: var(--bg);
    font-weight: 600;
    color: var(--primary);
}

.lang-dropdown-item .fi {
    font-size: 1.1rem;
    border-radius: 2px;
}

/* === HERO === */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #6c5ce7 50%, var(--accent) 100%);
    color: white;
    padding: 2.5rem 1rem;
    text-align: center;
}

.hero h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* === SEARCH === */
.search-section {
    max-width: 600px;
    margin: -1.5rem auto 1.5rem;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}

.search-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.5rem;
    background: transparent;
    color: var(--text);
}

.search-box input::placeholder { color: var(--text-muted); }

.search-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.search-results-count {
    display: none;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    padding: 0.4rem 0 0;
}

/* === CONTENEUR === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* === SECTIONS === */
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.region-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 1.5rem 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* === GRILLE DE PAYS === */
.countries-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.country-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1rem;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 4px solid transparent;
}

@media (hover: hover) {
    .country-card {
        transition: all 0.2s;
    }
    .country-card:hover {
        box-shadow: var(--shadow-hover);
        border-left-color: var(--accent);
        transform: translateY(-2px);
    }
}

.country-flag {
    font-size: 2rem;
    line-height: 1;
}

.country-info { flex: 1; }

.country-name {
    font-weight: 600;
    font-size: 1rem;
}

.country-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.country-badge {
    background: var(--bg);
    color: var(--text-light);
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* === TABLEAU DES FRAIS === */
.fees-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--card-bg);
}

.fees-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.fees-table thead {
    background: var(--text);
    color: white;
}

.fees-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.fees-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.fees-table tbody tr:hover {
    background: var(--bg-warm);
}

.fees-table tbody tr:last-child td {
    border-bottom: none;
}

.fee-free {
    color: var(--success);
    font-weight: 700;
    background: var(--success-light);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.fee-amount {
    font-weight: 600;
    color: var(--danger);
}

.eur-equivalent {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.15rem;
}

.bank-name-cell {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.partnership-badge {
    background: #e8f4fd;
    color: var(--primary);
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

/* === BANK TAGS === */
.bank-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.25rem;
}

.bank-tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: default;
    position: relative;
}

.tag-checkbox {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, opacity 0.15s;
}

.tag-checkbox:hover {
    opacity: 0.8;
}

.bank-note-icon {
    display: inline-block;
    font-size: 0.85rem;
    margin-left: 0.25rem;
    cursor: help;
    position: relative;
    line-height: 1;
    vertical-align: middle;
    user-select: none;
}

.bank-note-icon:hover::after,
.bank-note-icon:focus::after,
.bank-note-icon.is-open::after {
    content: attr(data-tooltip);
    /* position:fixed → relative au viewport : l'infobulle n'est PAS rognée par
       l'overflow des conteneurs (.fees-table-wrapper, .bank-card…). Les coords
       --tt-top / --tt-left sont posées en JS au survol/focus/tap (avec clamp). */
    position: fixed;
    top: var(--tt-top, 100%);
    left: var(--tt-left, 50%);
    /* --tt-shift = -100% quand le JS bascule l'infobulle au-dessus de l'icône (place manquante en bas) */
    transform: translateX(-50%) translateY(var(--tt-shift, 0));
    background: white;
    color: var(--text);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 400;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
    line-height: 1.5;
    text-align: left;
}

.bank-tag[data-tooltip] {
    cursor: help;
}

.bank-tag[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%);
    background: white;
    color: var(--text);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 400;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
    line-height: 1.5;
}

.bank-tag[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(100% + 4px);
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: white;
    z-index: 101;
    filter: drop-shadow(-2px 0 2px rgba(0,0,0,0.06));
}

/* Lien "Signaler un changement" inline par banque. SVG Lucide pencil-line +
   libellé discret à droite. Opacity 0.55 par défaut, pleine au hover/focus.
   Deep-link direct vers /suggest?bank=... */
.report-change-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
    opacity: 0.55;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
    vertical-align: middle;
}
.report-change-icon svg {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
}
.report-change-label {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
/* Sur très petit écran, masquer le label : le crayon seul reste cliquable, et le
   tooltip natif (attribut `title` sur le <a> parent) prend le relais sur tap long. */
@media (max-width: 480px) {
    .report-change-label { display: none; }
}
.report-change-icon:hover,
.report-change-icon:focus {
    opacity: 1;
    text-decoration: underline;
    outline: none;
}

/* Taille harmonisée des SVG dans les boutons (Lucide viewBox 24x24). */
.btn svg {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
}

.contribute-block {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    text-align: center;
}
.contribute-title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    color: var(--text);
}
.contribute-text {
    margin: 0 0 1rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}
.contribute-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.contribute-actions .btn {
    min-width: 200px;
}

/* === PAGE PAYS === */
.country-header {
    background: var(--card-bg);
    color: var(--text);
    padding: 2rem 1rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.country-header-flag {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

.country-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.country-header .currency-info {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

.country-stats {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.country-stat {
    text-align: center;
    padding: 0.6rem 1.2rem;
    flex: 1;
    cursor: default;
    border-right: 1px solid var(--border);
}

.country-stat:last-child {
    border-right: none;
}

.country-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.country-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.country-stat.free .country-stat-value { color: var(--success); }
.country-stat.paid .country-stat-value { color: var(--accent); }

/* Pastille « session admin active », visible du seul admin connecté. Verte : c'est
   un état favorable, pas un avertissement. Discrète — elle ne doit pas concurrencer
   le formulaire qu'elle annote. */
.comment-admin-notice {
    display: inline-block;
    background: var(--success-light);
    color: #1c7a44;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 0 0 0.75rem;
    padding: 0.25rem 0.75rem;
}

/* Même pastille, état « session expirée » : ambre, parce qu'il y a quelque chose à
   faire avant d'écrire. Pas rouge — rien n'est cassé. */
.comment-admin-notice-stale {
    background: #fdf6e7;
    color: #854f0b;
}

.comment-admin-notice-stale a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* Infos propres à un pays — carte ambre, distincte du bleu des infos communes.
   L'ambre reste dans la famille de --accent (#ff6f3c) : distinct sans être etranger
   à la charte, et surtout pas rouge (ce n'est pas une alerte). Bordure complète et
   coins arrondis, contrairement au liseré gauche de .info-box : c'est un objet a
   part, pas une variante de ton. */
.country-tips {
    background: var(--card-bg);
    border: 1px solid #f0dcb4;
    border-radius: var(--radius);
    margin: 1rem 0;
    overflow: hidden;
}

.country-tips-head {
    background: #fdf6e7;
    border-bottom: 1px solid #f0dcb4;
    color: #854f0b;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    padding: 0.6rem 1rem;
}

.country-tips-head svg {
    width: 1.05em;
    height: 1.05em;
    vertical-align: -0.2em;
    margin-right: 0.2em;
}

/* Filet entre deux infos seulement : le premier item touche déjà l'en-tête. */
.country-tips-item {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
    padding: 0.75rem 1rem;
}

.country-tips-item + .country-tips-item { border-top: 1px solid #f6ecd8; }

.info-box {
    background: #e8f4fd;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text);
}

.info-box strong { color: var(--primary); }
.info-box strong svg {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.2em;
    margin-right: 0.15em;
}

/* Carrousel des conseils "Bon à savoir" */
.tip-slides {
    position: relative;
}
.tip-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.tip-slide.is-active {
    display: block;
    opacity: 1;
}
.tip-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
}
.tip-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.tip-dot:hover { background: rgba(0, 0, 0, 0.35); }
.tip-dot.is-active {
    background: var(--primary);
    transform: scale(1.2);
}

/* === CARDS MOBILE - Affichage alternatif au tableau === */
.bank-cards {
    display: none;
}

.bank-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--border);
}

.bank-card.is-free { border-left-color: var(--success); }
.bank-card.has-fee { border-left-color: var(--accent); }

.bank-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.bank-card-name {
    font-weight: 700;
    font-size: 1rem;
}

.bank-card-fee {
    font-weight: 700;
    font-size: 1.1rem;
}

.bank-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.bank-card-detail label {
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.bank-card-notes {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary);
    font-style: italic;
}

/* === FORMULAIRE DE SUGGESTION === */
.suggest-form {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.input-locked {
    background: var(--bg) !important;
    color: var(--text-light) !important;
    cursor: not-allowed;
    opacity: 0.8;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: var(--text);
}

.form-group label .required { color: var(--danger); }

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    padding: 0;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.suggest-form .form-group input[type="text"],
.suggest-form .form-group input[type="email"],
.suggest-form .form-group input[type="number"],
.suggest-form .form-group select {
    max-width: 400px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

.fee-fields-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.75rem;
    align-items: start;
}

.fee-group-pct {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0.6rem;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
}

.fee-disabled {
    opacity: 0.4;
    cursor: help;
}

.fee-disabled input {
    background: #f0f0f0 !important;
    cursor: help;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* === BOUTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover { background: var(--accent-dark); }

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover { background: #219a52; }

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover { background: #c0392b; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #e67e22; }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Log action badges */
.log-action {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.log-action-create { background: #d4edda; color: #155724; }
.log-action-update { background: #cce5ff; color: #004085; }
.log-action-delete { background: #f8d7da; color: #721c24; }
.log-action-approve { background: #d4edda; color: #155724; }
.log-action-reject { background: #fff3cd; color: #856404; }

/* === MESSAGES === */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success {
    background: var(--success-light);
    color: #1e8449;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fde8e8;
    color: #c0392b;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: #e8f4fd;
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

/* === COMMENTS === */
.comments-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.comments-header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.comments-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}
.comments-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}
.comments-count-badge {
    background: var(--bg);
    color: var(--text-light);
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    margin-left: auto;
}
.comments-empty {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
}
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.comment-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}
.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    text-transform: uppercase;
    overflow: hidden;
}
.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.comment-content {
    flex: 1;
    min-width: 0;
}
.comment-bubble {
    background: var(--bg);
    border-radius: 0 12px 12px 12px;
    padding: 0.85rem 1rem;
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}
.comment-nickname {
    font-weight: 700;
    font-size: 0.9rem;
}
.comment-admin-badge {
    font-size: 0.65rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.comment-body {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text);
    margin: 0;
}
.comment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.4rem;
    padding-left: 0.2rem;
}
.comment-reply-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    transition: color 0.2s;
}
.comment-reply-btn:hover { color: var(--primary); }
.comment-hidden { display: none; }
.comment-admin-delete {
    display: inline;
    margin-left: auto;
}
.comment-admin-delete button {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
    border-radius: 3px;
    transition: color 0.2s, background 0.2s;
}
.comment-admin-delete button:hover {
    color: #e53e3e;
    background: #fee;
}
.comment-replies {
    margin-top: 1rem;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.comment-replies .comment-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
}
.comment-replies .comment-bubble {
    background: #eef3ff;
}
.comment-mention {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    margin-right: 0.2rem;
}
.comment-mention:hover { opacity: 0.75; }
.comment-highlight .comment-bubble {
    animation: commentFlash 2s ease;
}
@keyframes commentFlash {
    0%, 100% { background: var(--bg); }
    15% { background: #fff3cd; }
    50% { background: #fff3cd; }
}
.comment-form-wrapper {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}
.comment-form-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}
.comment-reply-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #e8f4f8;
    border-left: 3px solid var(--primary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
}
.comment-reply-cancel {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0 0.3rem;
    line-height: 1;
}
.comment-reply-cancel:hover { color: var(--danger, #dc3545); }
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.comment-form-row-inline {
    display: flex;
    gap: 0.75rem;
}
.comment-form-row-inline input {
    flex: 1;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
    outline: none;
}
.comment-form textarea {
    resize: vertical;
    min-height: 80px;
}
.comment-form .btn-submit {
    align-self: flex-end;
}

/* === FOOTER === */
.footer {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: 3rem;
    font-size: 0.85rem;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover { text-decoration: underline; }
.footer-version {
    opacity: 0.4;
    font-size: 0.75rem;
}

/* === BACK-OFFICE ADMIN === */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: var(--text);
    color: white;
    padding: 1rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-header {
    padding: 0.5rem 1rem 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0.5rem;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-nav a .badge {
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    margin-left: auto;
}

.admin-nav-section {
    padding: 1rem 1rem 0.3rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.4);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 1.5rem;
}

.inline-add-form,
.inline-edit-form {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
/* Exception : le formulaire d'édition des banques porte la colonne historique à sa
   droite (banks.php?edit=). Le cap 720px doit alors s'appliquer à la colonne formulaire
   seule (.edit-form-col), pas au bloc entier — sinon les deux colonnes se tassent dans
   720px centrés. Scopé par une classe modificatrice pour NE PAS toucher les formulaires
   d'édition mono-colonne des autres pages admin (tips, tags, popups, countries). */
.inline-edit-form--history {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}

.admin-table th {
    background: var(--bg);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tbody tr:hover { background: var(--bg-warm); }

.admin-table .actions {
    white-space: nowrap;
}

/* Admin card stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.stat-card.accent .stat-card-value { color: var(--accent); }
.stat-card.success .stat-card-value { color: var(--success); }
.stat-card.warning .stat-card-value { color: var(--warning); }

/* Currency dropdown */
.currency-dropdown {
    position: relative;
    margin-left: 0.3rem;
}
.currency-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
    transition: background 0.15s;
}
.currency-dropdown-btn:hover { background: rgba(0,0,0,0.06); }
.currency-dropdown.open .lang-chevron { transform: rotate(180deg); }
.currency-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 130px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    padding: 0.3rem;
}
.currency-dropdown.open .currency-dropdown-menu {
    display: block;
    animation: langDropIn 0.15s ease-out;
}
.currency-dropdown-menu a {
    display: block;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 4px;
    white-space: nowrap;
}
.currency-dropdown-menu a:hover { background: var(--bg); }
.currency-dropdown-menu a.active {
    background: var(--bg);
    font-weight: 600;
    color: var(--primary);
}
.conv-amount {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.15rem;
}
span.conv-amount { display: inline; margin-left: 0.3rem; }
.currency-dropdown-label { font-weight: 600; }

/* Card-type fees */
.card-fees-row td {
    padding: 0.3rem 0.75rem 0.75rem !important;
    border-top: none !important;
    background: var(--bg);
}
.card-fees-inline {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.card-fees-inline .card-fee-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: center;
    gap: 0.4rem;
}
.card-fees-inline .card-type-icon {
    justify-self: center;
}
.card-fee-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}
.card-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    width: 40px;
    height: 26px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.card-type-icon .card-icon {
    display: block;
    width: 100%;
    height: 100%;
}

/* Card fees admin form */
.card-fee-admin-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--bg);
    border-radius: 6px;
    border: 1px solid var(--border);
    overflow: visible;
    min-width: 0;
}
.card-fee-admin-row label,
.card-fee-admin-row button {
    flex-shrink: 0;
}
.card-fee-admin-row select {
    padding: 0.3rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
    width: 120px;
    flex-shrink: 0;
}
.card-fee-admin-row input[type="number"] {
    padding: 0.3rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Maintenance banner */
.maintenance-banner {
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
}
.maintenance-off {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.maintenance-on {
    background: #fef3c7;
    border: 1px solid #fde68a;
}
.maintenance-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}
.maintenance-off .maintenance-dot { background: var(--success); }
.maintenance-on .maintenance-dot { background: var(--warning); }
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Period filters */
.period-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Overview cards (style gharkhoji) */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.overview-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}
.overview-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}
.overview-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}
@media (max-width: 900px) {
    .overview-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .overview-grid { grid-template-columns: 1fr; }
}

/* Chart card (style gharkhoji) */
.chart-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
/* Quand un .chart-card est ciblé via fragment d'URL (#searches/#sessions/#cross),
   un petit scroll-margin évite que le bloc soit collé en haut du viewport. */
.chart-card[id] { scroll-margin-top: 1rem; }
.chart-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.75rem 0;
}

/* KPI cards (admin stats) */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.kpi-card {
    background: var(--bg);
    padding: 0.75rem 1rem;
    border-radius: 6px;
}
.kpi-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Device breakdown */
.device-chart {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
}
.device-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.device-label {
    font-size: 0.9rem;
    font-weight: 500;
    width: 7rem;
}
.device-bar-bg {
    flex: 1;
    height: 14px;
    background: var(--border);
    border-radius: 7px;
    overflow: hidden;
}
.device-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 7px;
    transition: width 0.3s ease;
}
.device-value {
    font-size: 0.8rem;
    color: var(--text-light);
    min-width: 5rem;
    text-align: right;
}

/* Suggestion card admin */
.suggestion-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--warning);
}

.suggestion-card .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.suggestion-card .content {
    margin: 0.5rem 0;
}

.suggestion-card .actions-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #6c5ce7 100%);
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-hover);
    text-align: center;
}

.login-card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.login-card .subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* === BREADCRUMB === */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.75rem 0;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb .sep { margin: 0 0.2rem; }

/* === RESPONSIVE === */

/* Tablettes */
@media (min-width: 600px) {
    .countries-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }
}

/* Desktop */
@media (min-width: 900px) {
    .countries-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .hero { padding: 3.5rem 1rem; }
    .hero h1 { font-size: 2.5rem; }

    .search-section { margin-top: -2rem; }

    .country-header { padding: 2.5rem 1rem 2rem; }
    .country-header h1 { font-size: 1.8rem; }
    .country-stat { padding: 0.5rem 0.8rem; }
}

/* Mobile spécifique */
@media (max-width: 768px) {
    .fees-table-wrapper { display: none; }
    .bank-cards { display: block; }

    /* Mobile keyboard open: collapse hero, stick search */
    body.search-focused .hero {
        display: none;
    }

    body.search-focused .search-section {
        position: sticky;
        top: 0;
        z-index: 50;
        margin-top: 0;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        background: var(--bg);
    }

    body.search-focused .container {
        padding-top: 0.5rem;
    }

    /* Header responsive with lang dropdown */
    .header-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    .lang-dropdown {
        margin-left: auto;
    }
    .lang-dropdown-label {
        display: none;
    }

    /* Admin responsive */
    .admin-sidebar {
        position: fixed;
        left: -240px;
        transition: left 0.3s;
        z-index: 200;
    }

    .admin-sidebar.open { left: 0; }

    .admin-main { margin-left: 0; }

    .admin-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 199;
    }

    .admin-overlay.open { display: block; }

    .mobile-menu-btn {
        display: inline-flex;
        background: var(--primary);
        color: white;
        border: none;
        padding: 0.5rem;
        border-radius: var(--radius-sm);
        font-size: 1.2rem;
        cursor: pointer;
    }

    .form-row, .form-row-3, .fee-fields-row {
        grid-template-columns: 1fr;
    }

    .fee-group-pct {
        grid-template-columns: 1fr;
    }

    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 0.5rem; }

    /* Comments responsive */
    .comments-section {
        padding: 1.2rem;
        border-radius: 8px;
    }
    .comments-header-row {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    .comments-title {
        font-size: 1.1rem;
    }
    .comment-avatar {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    .comment-replies .comment-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    .comment-bubble {
        padding: 0.7rem 0.85rem;
    }
    .comment-nickname {
        font-size: 0.85rem;
    }
    .comment-date {
        font-size: 0.7rem;
    }
    .comment-body {
        font-size: 0.85rem;
    }
    .comment-form-row-inline {
        flex-direction: column;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn { display: none; }
    .admin-overlay { display: none !important; }
}

/* === FLAG ICONS === */
.fi {
    font-size: 1.3em;
    line-height: 1;
    vertical-align: middle;
    border-radius: 2px;
}

.flag-big {
    font-size: 3rem;
}

.flag-emoji {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

/* Admin search */
.admin-search-input {
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    width: 180px;
    background: var(--card-bg);
    color: var(--text);
}
.admin-search-input::placeholder { color: var(--text-muted); }
@media (max-width: 768px) { .admin-search-input { width: 120px; } }

.flag-emoji.flag-big {
    font-size: 3rem;
}

.country-flag .fi {
    font-size: 2rem;
}

.country-header-flag .fi {
    font-size: 3rem;
}

/* Admin filter buttons flags */
.btn .fi {
    font-size: 1em;
    vertical-align: middle;
}

/* === SEARCHABLE SELECT (filtre pays) === */
.searchable-select {
    position: relative;
    display: inline-block;
}

.searchable-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    min-height: 36px;
    transition: border-color 0.2s;
}

.searchable-select-trigger:hover {
    border-color: var(--primary);
}

.searchable-select-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.searchable-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: 360px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    overflow: hidden;
}

.searchable-select-dropdown.open {
    display: block;
}

.searchable-select-search {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: none;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
}

.searchable-select-search::placeholder {
    color: #aaa;
}

.searchable-select-options {
    max-height: 260px;
    overflow-y: auto;
}

.searchable-select-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: var(--text);
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s;
}

.searchable-select-option:hover {
    background: var(--bg-light, #f0f4ff);
}

.searchable-select-option.selected {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.searchable-select-option.selected .fi {
    filter: brightness(1.2);
}

.searchable-select-option .fi {
    font-size: 1.1em;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.country-card, .bank-card, .stat-card {
    animation: fadeIn 0.3s ease-out;
}

/* === UTILITAIRES === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* Views filters */
.views-filters {
    flex-wrap: wrap;
    align-items: center;
}
.date-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.date-nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}
.date-nav-arrow:hover:not(.disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.date-nav-arrow.disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
}
.input-date-picker {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
}

/* No results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.no-results-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.no-results p { font-size: 1rem; }

/* Status badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.status-pending { background: #ffeaa7; color: #846e00; }
.status-approved { background: var(--success-light); color: var(--success); }
.status-rejected { background: #fde8e8; color: var(--danger); }

/* === INLINE EDIT ADMIN === */
.inline-add-form {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.inline-add-form h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.inline-add-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    width: 100%;
    font-family: inherit;
}

.inline-add-toggle:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.inline-edit-row td {
    padding: 0 !important;
    border-bottom: 2px solid var(--primary) !important;
}

.inline-edit-form {
    background: var(--bg);
    padding: 1.25rem;
    border-top: 2px solid var(--primary);
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 800px; }
}

.inline-edit-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.inline-edit-form .form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

.inline-edit-form .form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.admin-table tbody tr.editing-row {
    background: #e8f4fd;
}

.admin-table tbody tr.editing-row td {
    border-bottom-color: var(--primary);
}

/* Toggle switch */
.toggle-view {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.toggle-view button {
    padding: 0.4rem 0.8rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.toggle-view button.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* === POP-UP MODALE (homepage / country) === */
.atm-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: atm-popup-fade 0.2s ease-out;
}

.atm-popup-overlay[hidden] { display: none; }

@keyframes atm-popup-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes atm-popup-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.atm-popup {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    animation: atm-popup-pop 0.25s ease-out;
    display: flex;
    flex-direction: column;
}

.atm-popup-header {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.1rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    flex-shrink: 0;
}

.atm-popup-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.atm-popup-body {
    padding: 1.25rem 1.75rem 1.5rem;
    overflow-y: auto;
    min-height: 0;
}

.atm-popup-close {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}

.atm-popup-close:hover {
    background: rgba(0, 0, 0, 0.18);
    color: #fff;
}

.atm-popup-title {
    margin: 0;
    font-size: 1.2rem;
    color: white;
    text-align: center;
}

.atm-popup-message {
    color: var(--text);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    font-size: 0.98rem;
}

.atm-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

body.atm-popup-open { overflow: hidden; }

@media (max-width: 480px) {
    .atm-popup-header {
        padding: 0.95rem 3rem;
    }
    .atm-popup-body {
        padding: 1.1rem 1.25rem 1.25rem;
    }
    .atm-popup-title {
        font-size: 1.1rem;
    }
    .atm-popup-icon {
        font-size: 1.4rem;
    }
    .atm-popup-actions .btn { flex: 1; }
}

/* === Historique des modifications (panneau latéral éd. banque) === */
.edit-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    /* Le formulaire garde sa largeur « sans historique » (720px) et l'historique s'ajoute
       à sa droite ; on centre l'ensemble dans l'espace disponible plutôt que de l'étirer. */
    justify-content: center;
}
.edit-form-col {
    flex: 0 1 720px;
    max-width: 720px;
    min-width: 0;
}
/* Le formulaire de suggestion (inline-add-form) vit DANS la colonne : il la remplit,
   le cap 720px + centrage ne valant que pour le formulaire d'ajout autonome. */
.edit-form-col .inline-add-form {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}
.edit-history-col {
    flex: 0 0 340px;
    min-width: 0;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.history-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}
.history-header-icon { font-size: 1.1rem; }
.history-count {
    margin-left: auto;
    background: var(--primary);
    color: #fff;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
}
.history-empty {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1.25rem 0.5rem;
    font-size: 0.88rem;
}
.history-day-group { margin-top: 1rem; }
.history-day-group:first-of-type { margin-top: 0.25rem; }
.history-day-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px dashed var(--border);
}
.history-card {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.history-card:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.history-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
    gap: 0.5rem;
}
.history-card-title {
    font-weight: 500;
    color: var(--text, #2d3436);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.history-card-icon { font-size: 1rem; }
.history-card-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.history-card-diff {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.history-pill {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.3;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.history-pill-old {
    background: #fde8e6;
    color: #c0392b;
    text-decoration: line-through;
}
.history-pill-new {
    background: var(--success-light);
    color: var(--success);
    font-weight: 600;
}
.history-pill-empty {
    background: transparent;
    color: var(--text-muted);
    font-style: italic;
    border: 1px dashed var(--border);
}
.history-arrow {
    color: var(--text-muted);
    font-weight: bold;
}
.history-card-foot {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}
/* Scrollbar discrète sur le panneau */
.edit-history-col::-webkit-scrollbar { width: 6px; }
.edit-history-col::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.edit-history-col::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Responsive : sous 1100px le panneau passe sous le formulaire */
@media (max-width: 1100px) {
    .edit-layout { flex-direction: column; }
    .edit-form-col {
        flex-basis: auto;
        max-width: none;
        width: 100%;
    }
    .edit-history-col {
        flex-basis: auto;
        width: 100%;
        position: static;
        max-height: 400px;
    }
}

/* === BLOG === */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1rem;
}
@media (min-width: 640px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
    .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

.blog-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid var(--border);
}
.blog-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.blog-card-thumb {
    aspect-ratio: 16 / 9;
    background: var(--bg);
    overflow: hidden;
}
.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-card-body {
    padding: 1.1rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}
.blog-card-cat {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}
.blog-card-title {
    font-size: 1.12rem;
    line-height: 1.35;
    margin: 0;
    color: var(--text);
}
.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}
.blog-card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-light);
    padding-top: 0.4rem;
}
.blog-card-readmore { color: var(--primary); font-weight: 600; }

/* Article */
.article { margin-top: 1rem; }
.article-head { margin-bottom: 1.5rem; }
.article-title {
    font-size: 1.85rem;
    line-height: 1.25;
    margin: 0.6rem 0 0.5rem;
}
.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.article-meta-sep { opacity: 0.5; }
.article-hero-img {
    margin: 0 0 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
}
.article-hero-img img { width: 100%; height: auto; display: block; }

.article-body {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text);
    max-width: 720px;
}
.article-body h2 {
    font-size: 1.4rem;
    margin: 2rem 0 0.75rem;
    line-height: 1.3;
}
.article-body h3 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.5rem;
}
.article-body p { margin: 0 0 1.1rem; }
.article-body ul,
.article-body ol { margin: 0 0 1.1rem 1.25rem; padding-left: 0.75rem; }
.article-body li { margin-bottom: 0.45rem; }
.article-body a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.article-body a:hover { color: var(--primary-dark); }
.article-body blockquote {
    margin: 1.25rem 0;
    padding: 0.75rem 1.1rem;
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    color: var(--text);
}
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 0.5rem 0;
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.95rem;
}
.article-body th,
.article-body td {
    border: 1px solid var(--border);
    padding: 0.55rem 0.7rem;
    text-align: left;
}
.article-body th { background: var(--bg); font-weight: 600; }

.article-related {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}
.article-related-title { font-size: 1.25rem; margin: 0 0 0.35rem; }
.article-related-intro { color: var(--text-light); margin: 0 0 1rem; font-size: 0.95rem; }
