/**
 * gdm-profile.css — Profile view styles
 * v2.3.0 — tokenisé : variables Kadence via gdm-base.css
 */

 * GenevaDance Members — Profile Styles
 * v2.3.0 — Refonte layout grid 160px|1fr, design system Hub v3c
 */

/* ===== 1. Wrap & Kadence overrides ===== */

.gdm-profile-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
    color: var(--gdm-text);
    line-height: 1.6;
}

.gdm-profile-wrap *,
.gdm-profile-wrap *::before,
.gdm-profile-wrap *::after {
    box-sizing: border-box;
}

/* Force Open Sans via Kadence var (override global.min.css monospace injection) */
.gdm-profile-wrap p,
.gdm-profile-wrap span,
.gdm-profile-wrap div,
.gdm-profile-wrap a,
.gdm-profile-wrap button {
    font-family: var(--global-body-font-family) !important;
}

/* ===== 2. Page background (sans card — fond géré par Kadence) ===== */
/* .gdm-page supprimé — le profil flotte directement sur le fond de page */

/* ===== 3. Divider ===== */

.gdm-divider {
    border: none;
    /*border-top: 0.5px solid #eee;*/
    margin: 0 !important;
}

/* ===== 4. Header zone — grid 160px | 1fr ===== */

.gdm-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 3rem;
    /*padding: 0 2rem;*/
}

.gdm-header {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    align-items: start;
}

.gdm-sidebar-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== 5. Avatar 160px + SVG completion ring ===== */

.gdm-profile-photo-wrap {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.gdm-profile-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gdm-primary-hover), var(--gdm-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    font-weight: 600;
    color: var(--gdm-white);
}

.gdm-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* SVG ring (own profile, completeness < 100%) */
.gdm-profile-ring {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 190px;
    height: 190px;
    pointer-events: none;
    transform: rotate(-90deg);
}

.gdm-profile-wrap .gdm-ring-bg {
    fill: none;
    stroke: var(--gdm-border);
    stroke-width: 6;
}

.gdm-profile-wrap .gdm-ring-fg {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease;
}

.gdm-profile-wrap .gdm-ring--low  .gdm-ring-fg { stroke: var(--gdm-warning); }
.gdm-profile-wrap .gdm-ring--mid  .gdm-ring-fg { stroke: var(--gdm-warning-alt, var(--global-palette15)); }
.gdm-profile-wrap .gdm-ring--high .gdm-ring-fg { stroke: var(--gdm-success); }

/* Completeness % pill (own profile) */
.gdm-profile-pill {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gdm-white);
    border: 1.5px solid var(--gdm-text-title);
    border-radius: 20px;
    padding: 0px 18px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gdm-text-title);
    white-space: nowrap;
    text-decoration: none;
    z-index: 2;
}

.gdm-profile-pill:hover {
    border-color: var(--gdm-text-title);
    background: var(--gdm-text-title);
    color: var(--gdm-white);
}

/* ===== 6. Profile identity (name, tags, bio) ===== */

.gdm-main {
    padding-top: 0.25rem;
    min-width: 0;
}

.gdm-profile-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--gdm-text-title);
    margin: 0 0 8px;
    line-height: 1.2;
}

/* ── Subtitle : type + stats inline ───────────────────────────────────── */
.gdm-profile-subtitle {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 10px;
    margin: 0px 0 2rem;
    line-height: 1;
}

.gdm-profile-type {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gdm-text);
}

.gdm-stats-inline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 6px;
    font-size: 0.85rem;
    color: var(--gdm-text-muted, #888);
}

.gdm-stats-inline .gdm-stat-val {
    font-weight: 400;
    color: var(--gdm-text-muted, #888);
}

.gdm-stats-inline .gdm-stat-sep {
    color: var(--gdm-primary);
    font-weight: 600;
    padding: 0 2px;
}

.gdm-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 1rem;
}

.gdm-bio {
    font-size: 1.2rem;
    color: var(--gdm-text);
    line-height: 1.62;
    margin: 0 0 1.25rem;
}

/* ===== 7. Tags — city / zone / dance / seek ===== */

.gdm-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 400;
    padding: 4px 13px;
    border-radius: 20px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1.5;
    text-decoration: none;
    border: 1.5px solid transparent;
}

/* City tag: grey filled */
.gdm-tag--city,
.gdm-tag-city {
    background: var(--gdm-bg-subtle);
    color: var(--gdm-text-title);
    border-color: var(--gdm-bg-subtle);
}

/* Zone/region tag: outline */
.gdm-tag--zone,
.gdm-tag-zone {
    background: transparent;
    color: var(--gdm-text-muted);
    border-color: var(--gdm-text-muted);
}

/* Dance tag: colored from TagManager (CSS vars --tag-bg, --tag-text) */
.gdm-tag--dance {
    background: var(--tag-bg, #ebebeb);
    color: var(--gdm-text-mid);
    border-color: transparent;
}

.gdm-tag--dance.gdm-tag--colored {
    background: var(--tag-bg);
    color: var(--tag-text, rgba(0,0,0,0.55));
}

/* Seek tag: outline like zone */
.gdm-tag--search,
.gdm-tag-seek {
    background: var(--gdm-bg-subtle);
    color: var(--gdm-text-title);
    border-color: var(--gdm-bg-subtle);
}

/* Texte libre de l'annonce de recherche */
.gdm-profile-search-ad {
    font-size: 1.2rem;
    color: var(--gdm-text);
    line-height: 1.62;
    margin: 0.5rem 0 0;
    white-space: pre-line;
}

/* Universal hover */
.gdm-tag:hover {
    background: var(--gdm-text-title) !important;
    color: var(--gdm-white) !important;
    border-color: var(--gdm-text-title) !important;
}

/* ===== 8. Action buttons (pictos) — circle → outlined pill au survol ===== */
/*
 * Comportement :
 *   • Repos  : cercle 52px, bordure colorée, icône seule, label caché
 *   • Survol : s'étend en pill outlined, label apparaît — PAS de fond coloré
 * Les couleurs varient selon l'état du contact (vert / noir / gris / rose).
 */

.gdm-profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* ── Picto profil — override taille (base.css : 60px → ici 52px) ── */
.gdm-profile-wrap .gdm-picto {
    height: 60px !important;
    min-width: 60px !important;
    padding: 0 14px !important;
}

.gdm-profile-wrap .gdm-picto:hover {
    padding: 0 20px !important;
}

.gdm-profile-wrap .gdm-picto-icon,
.gdm-profile-wrap .gdm-picto-icon svg {
    width: 26px !important;
    height: 26px !important;
}

/* More dropdown */
.gdm-action-more {
    position: relative;
}

.gdm-action-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--gdm-white);
    border: 0.5px solid var(--gdm-border);
    border-radius: 10px;
    box-shadow: var(--gdm-shadow-dropdown);
    min-width: 160px;
    z-index: 100;
    overflow: hidden;
}

.gdm-action-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 400;
    color: var(--gdm-text);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background .12s;
}

.gdm-action-dropdown-item:hover {
    background: #f5f5f5;
}

.gdm-action-dropdown-item--danger {
    color: #dc2626;
}

.gdm-action-dropdown-item svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

[x-cloak] { display: none !important; }

/* Toast */
.gdm-toast {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    background: var(--gdm-text-title);
    color: var(--gdm-white);
    border-radius: 20px;
    font-size: 13px;
}

/* Card pictos row (also used in listing, override in profile context) */
.gdm-profile-wrap .gdm-card-pictos {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ===== 9. Content zone — grid 160px | 1fr ===== */

.gdm-content-row {
    display: block;
    /*padding: 0 2rem;*/
}

.gdm-sidebar-stats {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: center;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.gdm-stat {
    text-align: center;
}

.gdm-stat-num {
    font-size: 18px;
    font-weight: 600;
    color: var(--gdm-text-title);
    line-height: 1;
}

.gdm-stat-label {
    font-size: 12px;
    color: var(--gdm-text);
    margin-top: 3px;
}

/* Right column: sections */
.gdm-sections {
    min-width: 0;
}

/* ===== 10. Sections ===== */

.gdm-section {
    margin: 1.8rem 0;
    Border-top: var(--gdm-dotted-border);
}

.gdm-section-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--gdm-text-title);
    padding-top: 12px;
    margin-bottom: 0.6rem;
}

/* Sub-label (je danse / envie d'apprendre / ce que je cherche) */
.gdm-section-sublabel {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gdm-text-title);
    margin: 0.5rem 0 0.4rem;
    padding-top: 12px;
}

.gdm-section-sublabel:first-child {
    margin-top: 0;
}

/* ===== 11. Event cards ===== */

.gdm-event-card {
    border-radius: 12px;
    margin-bottom: 0.6rem;
    box-shadow: var(--gdm-shadow-card);
    overflow: visible;
}

/* Lien interne (titre + date) — reprend le comportement de l'ancien <a> */
.gdm-event-card-inner-link {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    border-radius: 12px 12px 0 0;
    transition: background .12s;
    flex: 1;
    min-width: 0;
}

.gdm-event-card-inner-link:hover {
    background: var(--gdm-bg-subtle);
}

/* Card hub : layout ligne unique — inner-link + actions côte à côte */
.gdm-event-card {
    display: flex;
    align-items: center;
    overflow: visible;
}

/* Actions à droite dans la card hub */
.gdm-event-card .gdm-event-actions {
    padding: 0 1rem;
    flex-shrink: 0;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

/* Avatars dans la card hub : sous le titre dans la col info */
.gdm-event-card .gdm-event-avatars-row {
    margin-top: 4px;
    cursor: pointer;
}

/* Boutons hub : ligne horizontale compacte */
.gdm-event-card .gdm-event-actions-btns {
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

/* Cœur bare hub : horizontal (icône + compteur côte à côte) */
.gdm-event-card .gdm-event-action-heart {
    flex-direction: row;
    align-items: center;
    gap: 3px;
}

.gdm-event-card .gdm-event-heart-count {
    font-size: 0.78rem;
}

/* Avatars inline dans gdm-event-info (hub) */
.gdm-event-hub-avatars {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
}

.gdm-event-hub-avatars-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gdm-text-mid);
}

/* Masquer la rangée avatars du partial dans le contexte hub
   (déjà affichée dans gdm-event-info) */
.gdm-event-card .gdm-event-avatars-row { display: none; }

.gdm-event-date {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--gdm-bg-subtle);
}

.gdm-event-day {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    color: var(--gdm-text-title);
}

.gdm-event-month {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gdm-text);
    margin-top: 1px;
}

.gdm-event-info {
    flex: 1;
    min-width: 0;
}

.gdm-event-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gdm-text-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gdm-event-venue {
    font-size: 13px;
    color: var(--gdm-text);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 12. Private info — locked / green box ===== */

.gdm-private-locked {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gdm-primary);
}

.gdm-private-locked svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.gdm-private-visible {
    background: var(--gdm-success-bg);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 14px;
    color: var(--gdm-success);
}

.gdm-private-line {
    display: block;
    padding: 4px 0;
    color: var(--gdm-text);
    line-height: 1.5;
}

.gdm-private-line:first-child {
    padding-top: 0;
}

.gdm-private-line:last-child {
    padding-bottom: 0;
}

.gdm-private-label {
    font-weight: 600;
    color: var(--gdm-text-title);
}

/* ===== 13. Social icons ===== */

.gdm-social {
    display: flex;
    gap: 10px;
    margin-top: 0.85rem;
    flex-wrap: wrap;
}

.gdm-social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gdm-bg-subtle);
    /*border: 1px solid var(--gdm-border);*/
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    text-decoration: none;
}

.gdm-social-btn:hover {
    background: var(--gdm-text-title);
    /*border-color: var(--gdm-text-title);*/
}

.gdm-social-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--gdm-text);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .15s, fill .15s;
}

.gdm-social-btn:hover svg {
    stroke: var(--gdm-white);
}

/* Facebook fill style */
.gdm-social-btn--facebook svg {
    fill: var(--gdm-text);
    stroke: none;
}

.gdm-social-btn--facebook:hover svg {
    fill: var(--gdm-white);
    stroke: none;
}

/* ===== 14. Person cards — cercle d'amis (115px override) ===== */
.gdm-people-grid {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

/* ===== 15. Welcome banner ===== */

.gdm-welcome-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    background: #f0faf3;
    /*border: 1px solid #c8ecd4;*/
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.gdm-welcome-banner-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.gdm-welcome-banner-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.gdm-welcome-banner-text {
    font-size: 14px;
    color: var(--gdm-text);
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.gdm-welcome-banner-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--gdm-success);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.gdm-welcome-banner-link:hover {
    color: var(--gdm-text-title);
}

.gdm-welcome-banner-sep {
    color: var(--gdm-text-muted);
}

.gdm-welcome-banner-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gdm-text-muted);
    font-size: 16px;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color .15s;
}

.gdm-welcome-banner-close:hover {
    color: var(--gdm-text-title);
}

/* ===== 17. PRO — cover photo layout ===== */

.gdm-cover-wrap {
    position: relative;
    margin-bottom: 1rem;
}

.gdm-cover-photo {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--gdm-bg-subtle);
}

.gdm-cover-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gdm-cover-bottom {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding: 0 2rem 1rem;
    margin-top: -40px;
    position: relative;
}

.gdm-cover-bottom .gdm-profile-photo {
    width: 80px;
    height: 80px;
    font-size: 28px;
    border: 3px solid var(--gdm-white);
    flex-shrink: 0;
}

.gdm-profile-identity {
    flex: 1;
    padding-bottom: 4px;
}

/* ===== 18. PRO — Course schedule ===== */

.gdm-course-schedule {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gdm-schedule-day-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gdm-text-title);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gdm-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.gdm-schedule-table td {
    padding: 3px 8px 3px 0;
    color: var(--gdm-text);
    vertical-align: top;
}

.gdm-schedule-time {
    white-space: nowrap;
    font-weight: 600;
    color: var(--gdm-text-title);
    min-width: 90px;
}

/* ===== 19. Profile meta (member since) ===== */

.gdm-profile-meta {
    font-size: 12px;
    color: var(--gdm-text);
    padding: 0.5rem 0;
}

.gdm-member-since {
    padding-top: 1.25rem;
    padding-bottom: 0.5rem;
}

/* ===== 20. Info locked badge ===== */

.gdm-profile-info-locked {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--gdm-text-muted);
    padding: 0.5rem 0;
}

.gdm-profile-info-locked svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

/* ===== 21. Mobile responsive ===== */

@media (max-width: 600px) {

    .gdm-profile-wrap {
        padding: 0 8px;
    }

    .gdm-page {
        border-radius: 12px;
    }

    .gdm-row {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }

    .gdm-content-row {
        padding: 0 1rem;
    }

    .gdm-header {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .gdm-profile-photo-wrap,
    .gdm-profile-photo {
        width: 100px;
        height: 100px;
        font-size: 34px;
    }

    .gdm-profile-ring {
        width: 120px;
        height: 120px;
        top: -10px;
        left: -10px;
    }

    .gdm-profile-name {
        font-size: 17px;
    }

    .gdm-bio {
        font-size: 14px;
    }

    .gdm-sidebar-stats {
        padding-top: 1rem;
    }

    .gdm-stat-num {
        font-size: 15px;
    }

    .gdm-people-grid {
        gap: 0.75rem;
    }

    .gdm-profile-wrap .gdm-picto {
        width: 46px;
        height: 46px;
        min-width: 46px;
    }

    .gdm-cover-photo {
        height: 120px;
    }
}
