/* ================================================
   MABRIK v2.0 - Profil & Badges
   A AJOUTER à la fin de style.css
   ================================================ */

/* ---- BADGES METIERS ---- */
.metier-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.metier-badge--sm {
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
}

.metier-badge--blue     { background: #DBEAFE; color: #1E40AF; }
.metier-badge--yellow   { background: #FEF9C3; color: #A16207; }
.metier-badge--red      { background: #FEE2E2; color: #B91C1C; }
.metier-badge--green    { background: #DCFCE7; color: #15803D; }
.metier-badge--purple   { background: #F3E8FF; color: #7C3AED; }
.metier-badge--cyan     { background: #CFFAFE; color: #0E7490; }
.metier-badge--rose     { background: #FCE7F3; color: #BE185D; }
.metier-badge--indigo   { background: #E0E7FF; color: #4338CA; }
.metier-badge--amber    { background: #FEF3C7; color: #B45309; }
.metier-badge--teal     { background: #CCFBF1; color: #0F766E; }
.metier-badge--slate    { background: #F1F5F9; color: #475569; }
.metier-badge--orange   { background: var(--orange-100); color: var(--orange-700, #C2410C); }
.metier-badge--lime     { background: #ECFCCB; color: #4D7C0F; }
.metier-badge--fuchsia  { background: #FAE8FF; color: #A21CAF; }

/* ---- PROFIL HERO ---- */
.profil-hero {
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    padding: 2rem 0 2.5rem;
}

.profil-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    transition: color 0.15s;
}

.profil-hero__back:hover {
    color: var(--primary);
}

.profil-hero__card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.profil-hero__left {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* Avatar */
.profil-avatar {
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--orange-200);
}

.profil-avatar--lg {
    width: 100px;
    height: 100px;
}

.profil-avatar--sm {
    width: 36px;
    height: 36px;
    border-width: 2px;
}

.profil-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profil-avatar__initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--orange-100);
    color: var(--orange-600);
    font-family: var(--font-heading);
    font-weight: 700;
}

.profil-avatar--lg .profil-avatar__initials {
    font-size: 1.5rem;
}

.profil-avatar--sm .profil-avatar__initials {
    font-size: 0.75rem;
}

/* Info */
.profil-hero__info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.profil-hero__top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profil-hero__name {
    font-size: 1.5rem;
    font-weight: 800;
}

.profil-badge--disponible {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: 99px;
    background: #DCFCE7;
    color: #15803D;
    font-size: 0.75rem;
    font-weight: 600;
}

.profil-badge--indisponible {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 99px;
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 600;
}

.profil-hero__badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profil-badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22C55E;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.profil-hero__entreprise {
    font-size: 0.9rem;
    color: var(--text-light);
}

.profil-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.25rem;
}

.profil-hero__meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Right side */
.profil-hero__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.profil-hero__stars {
    display: flex;
    gap: 2px;
}

.profil-hero__rating-text {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.15rem;
}

.profil-hero__tarif {
    text-align: right;
}

.profil-hero__tarif-amount {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.profil-hero__tarif-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ---- PROFIL CONTENT ---- */
.profil-content {
    padding: 2.5rem 0;
}

.profil-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

.profil-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Sections */
.profil-section {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.profil-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.profil-section__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom:20px;
}

.profil-section__count {
    font-size: 0.8rem;
    color: var(--text-light);
}

.profil-section__text {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.7;
    white-space: pre-line;
}

.profil-section__empty {
    color: var(--text-lighter);
    font-size: 0.9rem;
    padding: 1rem 0;
}

.profil-section__more {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* ---- GALERIE PHOTOS ---- */
.profil-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.profil-gallery--full {
    grid-template-columns: repeat(3, 1fr);
}

.profil-gallery__item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.profil-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profil-gallery__item:hover img {
    transform: scale(1.05);
}

.profil-gallery__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.4rem 0.6rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 0.75rem;
}

/* ---- ALBUMS ---- */
.profil-albums {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.profil-album-card {
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    text-decoration: none;
}

.profil-album-card:hover {
    border-color: var(--orange-200);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.profil-album-card__cover {
    height: 140px;
    overflow: hidden;
    background: var(--gray-50);
}

.profil-album-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profil-album-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profil-album-card__info {
    padding: 0.75rem;
}

.profil-album-card__info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
}

.profil-album-card__info span {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ---- AVIS ---- */
.profil-avis-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profil-avis {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--gray-50);
}

.profil-avis__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.profil-avis__author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.profil-avis__name {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
}

.profil-avis__date {
    font-size: 0.75rem;
    color: var(--text-lighter);
}

.profil-avis__stars {
    display: flex;
    gap: 1px;
}

.profil-avis__text {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ---- SIDEBAR ---- */
.profil-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 100px;
}

.profil-sidebar__card {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.profil-sidebar__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.profil-sidebar__info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.profil-sidebar__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.profil-sidebar__row a {
    color: var(--primary);
}

.profil-sidebar__details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profil-sidebar__detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profil-sidebar__detail-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.profil-sidebar__detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* ---- LIGHTBOX (reprise du dashboard) ---- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

/* ================================================
   RESPONSIVE PROFIL
   ================================================ */
@media (max-width: 1024px) {
    .profil-grid {
        grid-template-columns: 1fr;
    }
    
    .profil-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .profil-hero__card {
        flex-direction: column;
    }

    .profil-hero__left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profil-hero__info {
        align-items: center;
    }

    .profil-hero__meta {
        justify-content: center;
    }

    .profil-hero__badges {
        justify-content: center;
    }

    .profil-hero__right {
        align-items: center;
        width: 100%;
    }

    .profil-hero__right .btn {
        width: 100%;
    }

    .profil-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .profil-gallery--full {
        grid-template-columns: repeat(2, 1fr);
    }

    .profil-albums {
        grid-template-columns: 1fr;
    }
}