/* ==========================================================================
   Habillage du plugin « Atlas by Dity » (wp-gmaps-leads)
   Chargé après assets/css/main.css et après le style.css du plugin.
   Les !important ne servent qu'à neutraliser ceux déjà posés par le plugin.
   ========================================================================== */

/* ---------- Chargement du solde ---------- */
.wpgl-balance-loading::before {
	content: ""; display: inline-block; vertical-align: -2px;
	width: 12px; height: 12px; border-radius: 50%;
	border: 2px solid currentColor; border-top-color: transparent; opacity: .7;
	animation: wpgl-spin .7s linear infinite;
}
.wpgl-balance-loading { opacity: 1; }
@keyframes wpgl-spin { to { transform: rotate(360deg); } }

/* ---------- Formulaire de recherche ---------- */
#wpgl-search { --pc-gap: 16px; }
#wpgl-search .wpgl-search-form {
	position: sticky; top: calc(var(--atlas-header-h) + 12px); z-index: 20;
	margin: 0 0 24px; padding: 18px;
	background: var(--atlas-surface); border: 1px solid var(--atlas-line); border-radius: var(--atlas-r-lg);
	box-shadow: var(--atlas-shadow);
}
.admin-bar #wpgl-search .wpgl-search-form { top: calc(var(--atlas-header-h) + 44px); }
#wpgl-search .wpgl-search-form-container {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px 12px; align-items: end; margin: 0;
}
/* 2e ligne : rayon à gauche (sur toute la largeur si besoin), bouton à droite */
#wpgl-search .wpgl-radius-field { grid-row: 2; grid-column: 1 / -1; justify-self: start; max-width: 100%; }
#wpgl-search .wpgl-search-btn-container { grid-row: 2; grid-column: 2; justify-self: end; display: flex; }
#wpgl-search .wpgl-search-form-container > div { min-width: 0; }
.wpgl-search-form label,
.contacts-filters-grid label {
	display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--atlas-text-2); letter-spacing: 0;
}
#wpgl-search .wpgl-search-form input:not([type="button"]):not([type="submit"]):not([type="radio"]) {
	width: 100%; height: 46px; padding: 0 14px 0 40px;
	border: 1px solid var(--atlas-line-strong); border-radius: 10px !important;
	background: var(--atlas-surface) no-repeat 13px center / 18px;
	color: var(--atlas-text) !important; font-size: 15px !important;
	transition: border-color .15s, box-shadow .15s;
}
#wpgl-search #wpgl-query { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b86a2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8.5 7V5.5A1.5 1.5 0 0 1 10 4h4a1.5 1.5 0 0 1 1.5 1.5V7M3 12.5h18'/%3E%3C/svg%3E"); }
#wpgl-search #wpgl-location { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b86a2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.1-7-11.5A7 7 0 0 1 19 9.5C19 14.9 12 21 12 21Z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }
#wpgl-search .wpgl-search-form input:focus { outline: none; border-color: var(--atlas-brand); box-shadow: var(--atlas-ring); }
#wpgl-search .wpgl-search-form input::placeholder { color: var(--atlas-text-3); }

/* Rayon : contrôle segmenté, champ en mètres seulement pour « Autre » */
#wpgl-search .wpgl-radius-group {
	display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-width: 0; height: 46px; padding: 3px;
	border-radius: 12px; background: var(--atlas-surface-2); border: 1px solid var(--atlas-line);
}
#wpgl-search .wpgl-radius-option { position: relative; flex: 1 1 auto; margin: 0; padding: 0; border: 0; background: none; font-size: 13.5px; color: var(--atlas-text-2); cursor: pointer; }
#wpgl-search .wpgl-radius-option input[type="radio"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
#wpgl-search .wpgl-radius-option input[type="radio"] + span {
	display: block; padding: 0 12px; line-height: 38px; border-radius: 9px; font-weight: 560; text-align: center; white-space: nowrap;
	transition: background .15s, color .15s, box-shadow .15s;
}
#wpgl-search .wpgl-radius-option:hover input[type="radio"]:not(:checked) + span { color: var(--atlas-text); background: rgba(255,255,255,.55); }
#wpgl-search .wpgl-radius-option input[type="radio"]:checked + span {
	background: var(--atlas-surface); color: var(--atlas-text); box-shadow: var(--atlas-shadow-sm), 0 0 0 1px var(--atlas-line);
}
#wpgl-search .wpgl-radius-option input[type="radio"]:focus-visible + span { box-shadow: var(--atlas-ring); }
#wpgl-search .wpgl-radius-custom { display: none; align-items: center; flex: 0 0 auto; margin-left: 4px; position: relative; }
#wpgl-search .wpgl-radius-group.is-custom .wpgl-radius-custom { display: flex; }
#wpgl-search .wpgl-search-form .wpgl-radius-custom input#wpgl-radius {
	width: 104px; height: 38px; margin: 0; padding: 0 26px 0 10px !important; border-radius: 9px !important;
	background-image: none; font-family: var(--atlas-mono); font-size: 13.5px !important; text-align: right; -moz-appearance: textfield;
}
#wpgl-search .wpgl-radius-custom input#wpgl-radius::-webkit-outer-spin-button,
#wpgl-search .wpgl-radius-custom input#wpgl-radius::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#wpgl-search .wpgl-radius-custom__unit { position: absolute; right: 10px; font-size: 13px; color: var(--atlas-text-3); pointer-events: none; }

/* Bouton Rechercher */
#wpgl-search #wpgl-search-btn {
	display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 18px;
	border: 0; border-radius: 10px; background: var(--atlas-brand); color: #fff;
	font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
	box-shadow: 0 6px 18px -6px rgba(61,107,255,.7); transition: background .15s, transform .15s;
}
#wpgl-search #wpgl-search-btn:hover { background: var(--atlas-brand-600); transform: translateY(-1px); }
.wpgl-cost-badge {
	display: inline-flex; align-items: center; margin-left: 2px; padding: 4px 8px; border-radius: 7px;
	background: rgba(255,255,255,.18); color: inherit; font-family: var(--atlas-mono); font-size: 11.5px; font-weight: 600; line-height: 1;
}

/* Barre de sélection */
#wpgl-search .wpgl-batch-toolbar {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px -18px -18px; padding: 12px 18px;
	border-top: 1px solid var(--atlas-line); background: var(--atlas-surface-2); border-radius: 0 0 var(--atlas-r-lg) var(--atlas-r-lg);
}
#wpgl-search .wpgl-batch-toolbar button {
	position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 34px;
	border-radius: 9px !important; font-size: 13.5px; font-weight: 560; cursor: pointer; transition: .15s;
}
#wpgl-select-all, #wpgl-unselect-all {
	background: var(--atlas-surface) !important; color: var(--atlas-text) !important; border: 1px solid var(--atlas-line-strong) !important;
}
#wpgl-select-all:hover:not(:disabled), #wpgl-unselect-all:hover:not(:disabled) { background: var(--atlas-ink-900) !important; color: #fff !important; border-color: var(--atlas-ink-900) !important; }
#wpgl-select-all:focus:not(:hover), #wpgl-unselect-all:focus:not(:hover) { background: var(--atlas-surface) !important; color: var(--atlas-text) !important; }
#wpgl-unlock-selected { margin-left: auto; background: var(--atlas-ink-900) !important; color: #fff; border: 0; }
#wpgl-unlock-selected:hover:not(:disabled), #wpgl-unlock-selected:focus:not(:disabled) { background: var(--atlas-brand) !important; }
#wpgl-search .wpgl-batch-toolbar button:disabled { opacity: .45; cursor: not-allowed; }
#wpgl-select-all:focus:not(:hover)::before { filter: none; }

/* Autocomplétion d'adresse */
.wpgl-location-autocomplete { position: relative; }
.wpgl-location-suggestions {
	top: calc(100% + 6px); border: 1px solid var(--atlas-line); border-radius: 12px; padding: 6px;
	box-shadow: var(--atlas-shadow-lg); max-height: 280px;
}
.wpgl-location-suggestion-item { padding: 10px 12px 10px 36px; border-radius: 8px; font-size: 14px; position: relative; }
.wpgl-location-suggestion-item::before {
	content: ""; position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b86a2' stroke-width='1.8'%3E%3Cpath d='M12 21s-7-6.1-7-11.5A7 7 0 0 1 19 9.5C19 14.9 12 21 12 21Z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.wpgl-location-suggestion-item:hover { background: var(--atlas-brand-50); color: var(--atlas-brand-700); }

/* ---------- Résultats ---------- */
#wpgl-results {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; align-items: stretch;
}
#wpgl-results .wpgl-placeholder {
	grid-column: 1 / -1; flex-direction: column; justify-content: center; gap: 14px; min-height: 280px; padding: 40px 24px;
	background: var(--atlas-surface) radial-gradient(var(--atlas-line) 1px, transparent 1px) 0 0 / 18px 18px;
	border: 1px dashed var(--atlas-line-strong); border-radius: var(--atlas-r-lg); text-align: center; color: var(--atlas-text-2);
}
#wpgl-results .wpgl-placeholder-icon {
	display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--atlas-surface); border: 1px solid var(--atlas-line); box-shadow: var(--atlas-shadow);
}
#wpgl-results .wpgl-placeholder-icon svg { width: 24px; height: 24px; stroke: var(--atlas-brand); }
#wpgl-results .wpgl-placeholder-text { font-size: 15px; max-width: 360px; }

.wpgl-place-card {
	position: relative; display: flex; flex-direction: column;
	margin: 0 !important; padding: 18px 18px 16px;
	background: var(--atlas-surface); border: 1px solid var(--atlas-line); border-radius: var(--atlas-r-lg);
	box-shadow: var(--atlas-shadow-sm); cursor: pointer;
	transition: border-color .15s, box-shadow .2s, transform .2s var(--atlas-ease);
	animation: atlas-card-in .35s var(--atlas-ease) both;
}
@keyframes atlas-card-in { from { opacity: 0; transform: translateY(6px); } }
.wpgl-place-card:hover { transform: translateY(-2px); box-shadow: var(--atlas-shadow); border-color: var(--atlas-line-strong); }
.wpgl-place-card:has(.wpgl-card-select:checked:not(:disabled)) { border-color: var(--atlas-brand); box-shadow: 0 0 0 3px rgba(61,107,255,.14), var(--atlas-shadow-sm); }

.wpgl-place-header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding-right: 34px; }
.wpgl-card-select-wrapper { padding-top: 2px; }
.wpgl-card-select {
	position: static; appearance: none; -webkit-appearance: none; display: block; margin: 0;
	width: 20px !important; height: 20px !important; min-width: 20px; min-height: 20px; max-width: 20px; max-height: 20px;
	border: 1.5px solid var(--atlas-line-strong); border-radius: 6px; background: var(--atlas-surface); cursor: pointer; transition: .15s;
}
.wpgl-card-select:checked { background: var(--atlas-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.5 2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--atlas-brand); }
.wpgl-card-select:disabled { cursor: default; }
.wpgl-card-select:checked:disabled { background-color: var(--atlas-signal); border-color: var(--atlas-signal); }

.wpgl-place-header-main { display: block; margin: 0; }
.wpgl-place-card .wpgl-place-name { margin: 0 0 8px; font-size: 16.5px; font-weight: 640; letter-spacing: -.015em; line-height: 1.3; color: var(--atlas-text); }
.wpgl-place-infos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.wpgl-place-rating { display: contents; }
.wpgl-place-card .wpgl-rating,
.wpgl-place-card .wpgl-no-rating,
.wpgl-place-card .wpgl-place-opening-status,
.wpgl-place-card .wpgl-place-distance {
	display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 7px;
	font-size: 12.5px; font-weight: 560; line-height: 1;
}
.wpgl-place-card .wpgl-rating { background: var(--atlas-amber-50); color: #9a5f00; }
.wpgl-place-card .wpgl-rating::before { content: "★"; color: var(--atlas-amber); }
.wpgl-place-card .wpgl-no-rating { background: var(--atlas-surface-2); color: var(--atlas-text-3); }
.wpgl-place-card .status-open { background: var(--atlas-signal-50); color: var(--atlas-signal-600); }
.wpgl-place-card .status-closed { background: var(--atlas-surface-2); color: var(--atlas-text-2); }
.wpgl-place-card .status-closed-perm { background: var(--atlas-danger-50); color: var(--atlas-danger); }
.wpgl-place-distance-row { display: inline-flex; margin: 0; }
.wpgl-place-card .wpgl-place-distance { background: var(--atlas-brand-50); color: var(--atlas-brand-700); font-family: var(--atlas-mono); font-weight: 520; }

.wpgl-place-card .wpgl-fav-toggle {
	position: absolute; top: 14px; right: 14px; width: 32px !important; height: 32px !important; min-width: 32px; min-height: 32px;
	border-radius: 9px; background-size: 18px !important; background-color: transparent !important; transition: background-color .15s, transform .15s;
}
.wpgl-place-card .wpgl-fav-toggle:hover { background-color: var(--atlas-danger-50) !important; }
.wpgl-place-card .wpgl-fav-toggle.is-fav { animation: atlas-pop .3s var(--atlas-ease); }
@keyframes atlas-pop { 50% { transform: scale(1.2); } }
.contact-unlocked .wpgl-fav-toggle:not(.is-fav) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") !important; }

.wpgl-place-card .wpgl-place-address { margin: 12px 0 0; padding-left: 32px; font-size: 14px; color: var(--atlas-text-2); line-height: 1.45; }
.wpgl-place-card .wpgl-place-types { margin: 8px 0 0; padding-left: 32px; }
.wpgl-place-card .wpgl-place-types small { display: flex; flex-wrap: wrap; gap: 4px; }
.wpgl-place-card .badge {
	margin: 0; padding: 2px 7px; border-radius: 6px; background: var(--atlas-surface-2); color: var(--atlas-text-3) !important;
	font-family: var(--atlas-mono); font-size: 11px; font-weight: 450;
}
.wpgl-place-card .wpgl-place-footer { margin-top: auto; padding-top: 14px; }
.wpgl-place-card .wpgl-place-footer > * { margin-left: 32px; }
.wpgl-place-card .wpgl-unlock-btn {
	display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 34px;
	border: 0; border-radius: 9px !important; background: var(--atlas-ink-900) !important; color: #fff;
	font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.wpgl-place-card .wpgl-unlock-btn:hover, .wpgl-place-card .wpgl-unlock-btn:focus { background: var(--atlas-brand) !important; }
.wpgl-unlock-btn::before, #wpgl-unlock-selected::before, #wpgl-select-all::before, #wpgl-unselect-all::before { left: 12px; }

/* Contact débloqué : fond clair, accent vert (le plugin passait la carte en bleu plein) */
.wpgl-place-card.contact-unlocked { background: var(--atlas-surface); color: var(--atlas-text); border-color: rgba(20,199,154,.45); }
.wpgl-place-card.contact-unlocked::after {
	content: "Débloqué"; position: absolute; top: -9px; left: 16px; padding: 2px 8px; border-radius: 6px;
	background: var(--atlas-signal); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.wpgl-place-card.contact-unlocked .wpgl-place-name { color: var(--atlas-text); }
.wpgl-place-card.contact-unlocked .wpgl-place-address { color: var(--atlas-text-2); }
.wpgl-place-card.contact-unlocked span.wpgl-rating { color: #9a5f00; }
.wpgl-place-card.contact-unlocked span.wpgl-no-rating, .wpgl-place-card.contact-unlocked span.status-closed { color: var(--atlas-text-2); }
.wpgl-place-card.contact-unlocked span.status-open { color: var(--atlas-signal-600); }
.wpgl-place-card.contact-unlocked span.status-closed-perm { color: var(--atlas-danger); }
.wpgl-place-card.contact-unlocked .badge { color: var(--atlas-text-3) !important; }
.wpgl-place-card.contact-unlocked span.wpgl-cost-badge { color: inherit; }
.wpgl-place-card .wpgl-contact-unlocked {
	display: grid; gap: 6px; margin-top: 0; padding: 10px 12px; border-radius: 10px; background: var(--atlas-signal-50);
}
.wpgl-place-card .wpgl-contact-phone, .wpgl-place-card .wpgl-contact-website,
.wpgl-place-card.contact-unlocked .wpgl-contact-phone, .wpgl-place-card.contact-unlocked .wpgl-contact-website {
	margin: 0; font-size: 0; color: var(--atlas-text-2); display: flex; align-items: center; gap: 8px; min-width: 0;
}
.wpgl-place-card .wpgl-contact-phone::before, .wpgl-place-card .wpgl-contact-website::before {
	content: ""; flex: none; width: 16px; height: 16px; background: center/contain no-repeat;
}
.wpgl-place-card .wpgl-contact-phone::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e9f7b' stroke-width='1.9' stroke-linejoin='round'%3E%3Cpath d='M5 4h3l2 5-2.5 1.5a11 11 0 0 0 6 6L15 14l5 2v3a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E"); }
.wpgl-place-card .wpgl-contact-website::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e9f7b' stroke-width='1.9'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3Z'/%3E%3C/svg%3E"); }
.wpgl-place-card .wpgl-contact-phone a, .wpgl-place-card .wpgl-contact-website a,
.wpgl-place-card.contact-unlocked .wpgl-contact-phone a, .wpgl-place-card.contact-unlocked .wpgl-contact-website a {
	font-size: 14px; font-weight: 600; color: var(--atlas-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wpgl-place-card .wpgl-contact-phone a { font-family: var(--atlas-mono); }
.wpgl-place-card.contact-unlocked a:hover { color: var(--atlas-brand-600); }

/* Afficher plus */
.wpgl-load-more-container { margin-top: 24px; }
#wpgl-load-more.wpgl-page-btn {
	display: inline-flex; align-items: center; gap: 10px; height: 44px; margin: 0; padding: 0 8px 0 18px;
	border: 1px solid var(--atlas-line-strong); border-radius: 10px !important; background: var(--atlas-surface); color: var(--atlas-text);
	font-size: 14.5px; font-weight: 600; box-shadow: var(--atlas-shadow-sm);
}
#wpgl-load-more[style*="inline-block"] { display: inline-flex !important; }
#wpgl-load-more.wpgl-page-btn:hover { border-color: var(--atlas-brand); color: var(--atlas-brand-700); background: var(--atlas-surface); }
#wpgl-load-more .wpgl-cost-badge { background: var(--atlas-brand-50); color: var(--atlas-brand-700); }

/* ---------- Popins ---------- */
.wpgl-modal { background: rgba(6, 10, 22, .55); backdrop-filter: blur(4px); padding: 16px; }
.wpgl-modal-content {
	border-radius: var(--atlas-r-xl); border: 1px solid var(--atlas-line); box-shadow: var(--atlas-shadow-lg); max-height: 86vh; overflow: auto;
}
#wpgl-favorites-modal .wpgl-modal-content { width: min(1180px, 100%); max-width: 1180px; padding: 28px; }
#wpgl-favorites-modal .wpgl-modal-content h3 { margin: 0 0 20px; font-size: 22px !important; letter-spacing: -.02em; }
.wpgl-modal-close {
	top: 16px !important; right: 16px !important; width: 36px !important; height: 36px !important; border-radius: 10px !important;
	font-size: 26px !important; color: var(--atlas-text-2) !important; background: var(--atlas-surface-2) !important; opacity: 1 !important;
}
.wpgl-modal-close:hover { color: var(--atlas-text) !important; background: var(--atlas-line) !important; }
.wpgl-modal-header { background: var(--atlas-ink-900); padding: 24px; }
.wpgl-modal-rating { background: var(--atlas-amber); }
.wpgl-favorites-list { overflow-x: auto; }
.wpgl-fav-unlock-btn { border-radius: 8px !important; border-color: var(--atlas-line-strong) !important; }
.wpgl-fav-unlocked { display: inline-flex; padding: 3px 8px; border-radius: 6px; background: var(--atlas-signal-50); color: var(--atlas-signal-600); font-size: 12px; font-weight: 600; }

/* SweetAlert2 (toasts du plugin) */
.swal2-container .swal2-toast { border-radius: 12px !important; box-shadow: var(--atlas-shadow-lg) !important; border: 1px solid var(--atlas-line); font-family: var(--atlas-font); }
.swal2-container .swal2-toast .swal2-html-container { font-size: 14px !important; color: var(--atlas-text) !important; }
.swal2-popup:not(.swal2-toast) { border-radius: var(--atlas-r-xl) !important; font-family: var(--atlas-font); }
.swal2-styled.swal2-confirm { background: var(--atlas-brand) !important; border-radius: 10px !important; }
.swal2-timer-progress-bar { background: var(--atlas-brand) !important; }

/* ==========================================================================
   Mon compte  [wpgl_account]
   ========================================================================== */
.atlas-account { padding: 0; background: none; border-radius: 0; box-shadow: none; }
.atlas-account h3 { margin: 0 0 18px; font-size: 19px; font-weight: 640; letter-spacing: -.02em; }
.atlas-tabs {
	display: flex; gap: 4px; margin: 0 0 20px; padding: 4px; border: 0; border-radius: 12px; background: var(--atlas-surface-2);
	width: fit-content; max-width: 100%; overflow-x: auto;
}
.atlas-tab-btn {
	padding: 9px 16px; border-radius: 9px; font-size: 14px; font-weight: 560; white-space: nowrap; color: var(--atlas-text-2) !important; transition: .15s;
}
.atlas-tab-btn:hover { color: var(--atlas-text) !important; }
.atlas-tab-btn.is-active { background: var(--atlas-surface) !important; color: var(--atlas-text) !important; box-shadow: var(--atlas-shadow-sm), 0 0 0 1px var(--atlas-line); }
.atlas-tab-btn.is-active::after { display: none; }
.atlas-tab-panel { padding: 24px; background: var(--atlas-surface); border: 1px solid var(--atlas-line); border-radius: var(--atlas-r-lg); box-shadow: var(--atlas-shadow-sm); }

/* Dans l'application, la barre latérale sert d'onglets : on masque la barre du plugin et les titres en double */
.atlas-app-view .atlas-account .atlas-tabs { display: none; }
.atlas-app-view .atlas-tab-panel > h3:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.atlas-app-view #atlas-tab-favorites, .atlas-app-view #atlas-tab-settings, .atlas-app-view #atlas-tab-contacts, .atlas-app-view #atlas-tab-purchases, .atlas-app-view #atlas-tab-log {
	padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0;
}
.atlas-tab-panel .wpgl-dt-card, .atlas-tab-panel .wpgl-stat { border-radius: var(--atlas-r-lg); }
.atlas-history-table > .atlas-purchases-summary { margin: 0 0 16px; }

.atlas-balance-section { display: block; margin: 0; text-align: left; }
.atlas-account .balance-card {
	display: block; max-width: 460px; padding: 26px 28px; border-radius: var(--atlas-r-lg);
	background: radial-gradient(400px 200px at 100% 0%, rgba(20,199,154,.28), transparent 60%), linear-gradient(135deg, var(--atlas-ink-900), var(--atlas-ink-700));
}
.atlas-account .balance-card::before { display: none; }
.atlas-account .balance-card h3 { margin: 0 0 6px !important; font-size: 13px; font-weight: 560; letter-spacing: .06em; text-transform: uppercase; color: rgba(225,232,255,.6); }
.atlas-account .balance-card #wpgl-balance, .atlas-account .balance-big {
	display: block; margin: 0 0 20px; font-family: var(--atlas-mono); font-size: 44px !important; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; color: #fff !important;
}
.atlas-account .buy-button {
	display: inline-flex; align-items: center; height: 40px; padding: 0 16px; margin: 0; border-radius: 10px;
	background: #fff; color: var(--atlas-ink-900); font-size: 14px; font-weight: 600;
}
.atlas-account .buy-button:hover { background: var(--atlas-brand-50); transform: none; }

.atlas-account .no-result, .no-result {
	display: block; padding: 18px 20px; border-radius: 12px; background: var(--atlas-surface-2); color: var(--atlas-text-2);
	font-size: 14px; font-weight: 500; text-align: left;
}
.wpgl-buy-credits-btn-account, .wpgl-buy-credits-btn-account:hover, .wpgl-buy-credits-btn-account:focus {
	display: inline-flex; align-items: center; height: 40px; padding: 0 16px; margin: 0; border-radius: 10px;
	background: var(--atlas-brand); color: #fff; font-size: 14px;
}

/* Tables */
table.widefat, .atlas-account table:not(.wpgl-dt), .wpgl-favorites-list table {
	width: 100%; border-collapse: separate; border-spacing: 0; table-layout: auto;
	border: 1px solid var(--atlas-line); border-radius: 12px; overflow: hidden; font-size: 13.5px !important; background: var(--atlas-surface);
}
table.widefat thead th {
	background: var(--atlas-surface-2) !important; color: var(--atlas-text-3) !important; font-weight: 600 !important;
	font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; text-align: left; white-space: nowrap;
	border-bottom: 1px solid var(--atlas-line);
}
table.widefat td, table.widefat th { padding: 12px 14px !important; max-width: 260px; vertical-align: middle; text-align: left; }
table.widefat tbody td { border-bottom: 1px solid var(--atlas-line); color: var(--atlas-text-2); }
table.widefat tbody tr:last-child td { border-bottom: 0; }
table.widefat tbody tr:nth-child(even) { background-color: var(--atlas-surface) !important; }
table.widefat tbody tr:hover { background-color: #f7f9ff !important; }
table.widefat td strong { color: var(--atlas-text); font-weight: 600; }
table.widefat a { color: var(--atlas-brand-600) !important; font-weight: 520; }
.atlas-log-table .log-delta { display: inline-flex; padding: 2px 8px; border-radius: 6px; font-family: var(--atlas-mono); font-weight: 600; }
.atlas-log-table .log-positive .log-delta { background: var(--atlas-signal-50); color: var(--atlas-signal-600); }
.atlas-log-table .log-negative .log-delta { background: var(--atlas-surface-2); color: var(--atlas-text-2); }
.atlas-history-table, .contacts-list, .wpgl-favorites-list { overflow-x: auto; }

/* Mes achats regroupés par mois (une facture par mois) */
.wpgl-dt--months tbody.wpgl-month + tbody.wpgl-month .wpgl-month__head td { border-top: 1px solid var(--atlas-line); }
.wpgl-dt--months .wpgl-month__head td { padding: 8px 12px; background: var(--atlas-surface-2); }
.wpgl-dt--months tbody tr.wpgl-month__head:hover { background: var(--atlas-surface-2); }
.wpgl-month__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wpgl-month__toggle {
	display: inline-flex; align-items: center; gap: 10px; min-height: 36px; margin: 0; padding: 0 4px; border: 0; background: transparent;
	color: var(--atlas-text); font-size: 14px; text-align: left; cursor: pointer;
}
.wpgl-month__toggle:hover, .wpgl-month__toggle:focus { background: transparent; color: var(--atlas-brand-700); }
.wpgl-month__toggle:focus-visible { outline: none; box-shadow: var(--atlas-ring); border-radius: 8px; }
.wpgl-month__chev { flex: 0 0 auto; color: var(--atlas-text-3); transition: transform .15s; }
.wpgl-month.is-open .wpgl-month__chev { transform: rotate(90deg); }
.wpgl-month__toggle strong { font-weight: 640; }
.wpgl-month__meta { color: var(--atlas-text-3); font-size: 13px; font-family: var(--atlas-mono); }
.wpgl-month__invoice { display: inline-flex; align-items: center; }
.wpgl-month__invoice .wpgl-dt-muted { font-size: 13px; }
@media (max-width: 760px) {
	.wpgl-dt--months .wpgl-month__head td { padding: 10px 12px; }
	.wpgl-month__meta { flex-basis: 100%; }
	.wpgl-month__toggle { flex-wrap: wrap; row-gap: 2px; }
}

.atlas-purchases-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.atlas-purchases-summary .summary-item { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--atlas-surface-2); }
.atlas-purchases-summary .summary-item .label { font-size: 12.5px; color: var(--atlas-text-3); }
.atlas-purchases-summary .summary-item .value { font-family: var(--atlas-mono); font-size: 17px; font-weight: 600; color: var(--atlas-text); }
.atlas-purchases-summary .summary-total { background: var(--atlas-ink-900); }
.atlas-purchases-summary .summary-total .label { color: rgba(225,232,255,.6); }
.atlas-purchases-summary .summary-total .value { color: #fff; }

/* Filtres contacts */
.contacts-filters { margin-bottom: 18px; padding: 16px; border-radius: 12px; background: var(--atlas-surface-2); }
.contacts-filters-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.contacts-filters-grid input[type="text"], .contacts-filters-grid input[type="date"] {
	height: 40px; padding: 0 12px; border: 1px solid var(--atlas-line-strong); border-radius: 9px; background: var(--atlas-surface); font-size: 14px;
}
.contacts-filters-grid input:focus { border-color: var(--atlas-brand); box-shadow: var(--atlas-ring); }
.contacts-filters-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.contacts-filters-actions .btn-search, .contacts-filters-actions .btn-export {
	display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; margin: 0 !important; border-radius: 9px; font-size: 14px; font-weight: 600;
}
.contacts-filters-actions .btn-search { background: var(--atlas-ink-900); color: #fff; }
.contacts-filters-actions .btn-search:hover { background: var(--atlas-brand); }
.contacts-filters-actions .btn-export { background: var(--atlas-surface); color: var(--atlas-text); border: 1px solid var(--atlas-line-strong); }
.contacts-filters-actions .btn-export::before {
	content: ""; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c1324' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m-4.5-4.5L12 15l4.5-4.5M5 20h14'/%3E%3C/svg%3E") center/contain no-repeat;
}
.contacts-filters-actions .btn-export:hover, .contacts-filters-actions .btn-export:focus { background: var(--atlas-surface); color: var(--atlas-brand-700); border-color: var(--atlas-brand); }
.contacts-pagination { margin-top: 18px; display: flex; justify-content: center; gap: 4px; }
.contacts-pagination .page-numbers { width: 38px; height: 38px; min-width: 38px; min-height: 38px; margin: 0; border-radius: 9px; border-color: var(--atlas-line); background: var(--atlas-surface); color: var(--atlas-text-2); font-family: var(--atlas-mono); }
.contacts-pagination .page-numbers.current { background: var(--atlas-ink-900); border-color: var(--atlas-ink-900); }
button.wpgl-contact-remove-btn, button.wpgl-fav-remove-btn { opacity: .55; cursor: pointer; }
button.wpgl-contact-remove-btn:hover, button.wpgl-fav-remove-btn:hover { opacity: 1; }

/* ==========================================================================
   Boutique de crédits  [wpgl_credits_shop]
   ========================================================================== */
.wpgl-shop { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.wpgl-shop__main {
	padding: 28px; background: var(--atlas-surface); border: 1px solid var(--atlas-line); border-radius: var(--atlas-r-lg); box-shadow: var(--atlas-shadow);
}
.wpgl-shop__title { margin: 0 0 18px; font-size: 22px; letter-spacing: -.02em; }

/* Raccourcis de quantité, un par palier */
.wpgl-shop__packs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.wpgl-shop__pack {
	display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; margin: 0;
	border: 1.5px solid var(--atlas-line); border-radius: 12px; background: var(--atlas-surface); color: var(--atlas-text-2);
	font-size: 12.5px; line-height: 1.35; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.wpgl-shop__pack-qty { font-family: var(--atlas-mono); font-size: 18px; font-weight: 650; color: var(--atlas-text); }
.wpgl-shop__pack-price { margin-top: 4px; font-family: var(--atlas-mono); color: var(--atlas-text-3); }
.wpgl-shop__pack:hover, .wpgl-shop__pack:focus { border-color: var(--atlas-text-3); background: var(--atlas-surface); color: var(--atlas-text-2); }
.wpgl-shop__pack:focus-visible { outline: none; box-shadow: var(--atlas-ring); }
.wpgl-shop__pack[aria-pressed="true"] { border-color: var(--atlas-brand); background: var(--atlas-brand-50); color: var(--atlas-brand-700); }
.wpgl-shop__pack[aria-pressed="true"] .wpgl-shop__pack-qty, .wpgl-shop__pack[aria-pressed="true"] .wpgl-shop__pack-price { color: var(--atlas-brand-700); }

/* Quantité libre */
.wpgl-shop__label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 560; color: var(--atlas-text-2); }
.wpgl-shop__qty { display: flex; align-items: stretch; border: 1px solid var(--atlas-line-strong); border-radius: 12px; overflow: hidden; background: var(--atlas-surface); }
.wpgl-shop__qty:focus-within { border-color: var(--atlas-brand); box-shadow: var(--atlas-ring); }
.wpgl-shop__step {
	flex: 0 0 56px; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0; border: 0; border-radius: 0;
	background: var(--atlas-surface-2); color: var(--atlas-text); font-size: 22px; line-height: 1; cursor: pointer;
}
.wpgl-shop__step:hover, .wpgl-shop__step:focus { background: var(--atlas-line); color: var(--atlas-text); }
.wpgl-shop .wpgl-shop__qty input {
	flex: 1; width: auto; min-width: 0; height: 58px; margin: 0; padding: 0 8px; border: 0; border-radius: 0; box-shadow: none; background: transparent;
	text-align: center; font-family: var(--atlas-mono); font-size: 26px; font-weight: 600; color: var(--atlas-text); -moz-appearance: textfield;
}
.wpgl-shop .wpgl-shop__qty input:focus { outline: none; box-shadow: none; }
.wpgl-shop__qty input::-webkit-inner-spin-button, .wpgl-shop__qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.wpgl-shop__usage { margin: 10px 0 0; font-size: 13.5px; color: var(--atlas-text-3); }
.wpgl-shop__usage strong { font-family: var(--atlas-mono); font-weight: 600; color: var(--atlas-text-2); }
.wpgl-shop__nudge {
	display: inline-flex; margin: 10px 0 0; padding: 6px 10px; border-radius: 10px; background: var(--atlas-signal-50); color: var(--atlas-signal-600);
	font-size: 12.5px; font-weight: 560;
}
.wpgl-shop__nudge[hidden] { display: none; }

/* Récapitulatif */
.wpgl-shop__sum { display: grid; gap: 8px; margin: 22px 0; padding: 16px 18px; border-radius: 12px; background: var(--atlas-surface-2); }
.wpgl-shop__sum > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; color: var(--atlas-text-2); }
.wpgl-shop__sum dt { margin: 0; font-weight: 400; }
.wpgl-shop__sum dd { margin: 0; font-family: var(--atlas-mono); color: var(--atlas-text); }
.wpgl-shop__sum .wpgl-shop__total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--atlas-line-strong); align-items: baseline; font-size: 16px; font-weight: 650; color: var(--atlas-text); }
.wpgl-shop__total dd { font-size: 24px; font-weight: 650; letter-spacing: -.02em; }

.wpgl-shop__cta {
	display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; margin: 0; border: 0; border-radius: 12px;
	background: var(--atlas-brand); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
	box-shadow: 0 8px 22px -8px rgba(61,107,255,.75); transition: background .15s, transform .15s;
}
.wpgl-shop__cta::after { content: "→"; font-family: var(--atlas-mono); }
.wpgl-shop__cta:hover, .wpgl-shop__cta:focus { background: var(--atlas-brand-600); color: #fff; transform: translateY(-1px); }
.wpgl-shop__cta.is-loading { opacity: .7; cursor: progress; transform: none; }
.wpgl-shop__cta.is-loading::after { content: ""; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: wpgl-shop-spin .7s linear infinite; }
@keyframes wpgl-shop-spin { to { transform: rotate(360deg); } }

.wpgl-shop__trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--atlas-text-3); }
.wpgl-shop__trust li { position: relative; padding-left: 18px; }
.wpgl-shop__trust li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 9px; height: 5px; border: solid var(--atlas-signal-600); border-width: 0 0 1.8px 1.8px; transform: rotate(-45deg); }

/* Colonne de droite */
.wpgl-shop__side { display: grid; gap: 20px; }
.wpgl-shop__card { padding: 22px; background: var(--atlas-surface); border: 1px solid var(--atlas-line); border-radius: var(--atlas-r-lg); box-shadow: var(--atlas-shadow-sm); }
.wpgl-shop__card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 640; }
.wpgl-shop__tiers { width: 100%; margin: 0; border: 0; border-collapse: collapse; }
.wpgl-shop__tiers th, .wpgl-shop__tiers td {
	padding: 10px 8px; border: 0; border-bottom: 1px solid var(--atlas-line); background: none; font-size: 14px; font-weight: 400; color: var(--atlas-text-2); text-align: left;
}
.wpgl-shop__tiers tr:last-child th, .wpgl-shop__tiers tr:last-child td { border-bottom: 0; }
.wpgl-shop__tiers td { text-align: right; font-family: var(--atlas-mono); color: var(--atlas-text); font-weight: 560; white-space: nowrap; }
.wpgl-shop__badge { display: none; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--atlas-brand); color: #fff; font-size: 11px; font-weight: 600; vertical-align: 1px; }
.wpgl-shop__tiers tr.is-current th, .wpgl-shop__tiers tr.is-current td { background: var(--atlas-brand-50); color: var(--atlas-brand-700); }
.wpgl-shop__tiers tr.is-current th { border-radius: 8px 0 0 8px; }
.wpgl-shop__tiers tr.is-current td { border-radius: 0 8px 8px 0; }
.wpgl-shop__tiers tr.is-current .wpgl-shop__badge { display: inline-block; }

/* Lien « Modifier » dans le récapitulatif du paiement */
.wpgl-checkout-edit { margin-left: 8px; font-size: 13px; font-weight: 500; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.wpgl-shop { grid-template-columns: minmax(0, 1fr); }
	.atlas-purchases-summary { grid-template-columns: 1fr 1fr; }
	.contacts-filters-grid { grid-template-columns: 1fr 1fr; }
	.atlas-tab-panel { padding: 16px; }
}
@media (max-width: 700px) {
	#wpgl-search .wpgl-search-form { position: static; padding: 14px; }
	#wpgl-search .wpgl-search-form-container { grid-template-columns: 1fr; }
	#wpgl-search .wpgl-radius-field, #wpgl-search .wpgl-search-btn-container { grid-row: auto; grid-column: auto; justify-self: stretch; }
	/* Mobile : 5 choix sur toute la largeur, le champ « Autre » passe dessous */
	#wpgl-search .wpgl-radius-group { display: flex; flex-wrap: wrap; width: 100%; height: auto; }
	#wpgl-search .wpgl-radius-option { flex: 1 1 0; min-width: 0; }
	#wpgl-search .wpgl-radius-option input[type="radio"] + span { padding: 0 4px; }
	#wpgl-search .wpgl-radius-custom { flex: 1 1 100%; margin: 4px 0 0; }
	#wpgl-search .wpgl-search-form .wpgl-radius-custom input#wpgl-radius { width: 100%; }
	#wpgl-search .wpgl-batch-toolbar button { flex: 1 1 40%; justify-content: center; white-space: nowrap; font-size: 13px; padding: 0 10px 0 30px; }
	.wpgl-shop__main { padding: 20px; }
	.wpgl-shop__packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	#wpgl-search .wpgl-search-btn-container, #wpgl-search #wpgl-search-btn { width: 100%; justify-content: center; }
	#wpgl-search .wpgl-batch-toolbar { margin: 12px -14px -14px; padding: 10px 14px; }
	#wpgl-unlock-selected { margin-left: 0; width: 100%; justify-content: center; }
	.wpgl-place-card .wpgl-place-address, .wpgl-place-card .wpgl-place-types { padding-left: 0; }
	.wpgl-place-card .wpgl-place-footer > * { margin-left: 0; }
	.contacts-filters-grid { grid-template-columns: 1fr; }
	#wpgl-favorites-modal .wpgl-modal-content { padding: 20px 16px; }
}
