/* Utilisation des variables injectées par PHP */
:root {
    --collab-primary: #973B3E; /*#93070C*/
    --collab-accent: #FCEAB7;
    --collab-text: #FFFFFF;
}

@font-face {
    font-family: 'Playfair';
    src: url('/assets/fonts/Playfair-VariableFont_opsz,wdth,wght.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; 
}

@font-face {
    font-family: 'Montserrat';
    src: url('/assets/fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body.page-collab {
    /* Assure que le header Nancyte ne cache pas le contenu */
    padding-top: 80px; 
}

/* Section Héro */
.header-hero {
    margin-top: 1rem;
    background-color: var(--collab-primary);
    color: var(--collab-text);
    padding: 3rem 1rem;
    text-align: center;
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.header-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/animations/camilleShape2.png');
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8;
    z-index: -1; 
}
.header-hero .hero-content {
    position: relative;
    z-index: 2;
}
.header-hero h1 {
    font-family: 'Playfair', serif;
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-hero .accent {
    color: var(--collab-accent);
    font-style: italic;
}
.hero-sub {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero-cta {
    font-family: 'Montserrat', serif;
    display: inline-block;
    background-color: var(--collab-accent);
    color: var(--collab-primary) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0.5rem;
}
.hero-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
@media (max-width: 835px) {
    .hero-cta {
        display: block;
        width: fit-content;
        margin: 1rem auto;
    }
    .filters-container {
        position: sticky;
        top: 80px;
        z-index: 20;
        background: var(--color-background2, #fff);
        backdrop-filter: blur(6px);
        border: 1px solid rgba(0,0,0,0.05);
    }
}
@keyframes floatY {
    0%, 100% {
        transform: translateY(0px) rotate(-5deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* Conteneur principal */
.collab-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

/* Filtres */
/* .filters-container-content {
    padding: 0.5rem; 
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
} */
/* .filters-container {
    padding: 1rem;
    background: var(--color-background2);
    border-radius: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
} */
.filters-container {
    padding: 1rem;
    background: var(--color-background2);
    border-radius: 1.2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.filters-row-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-row-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.search-bar {
    flex: 1 1 auto;
}
#collab-search {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 999px;
    border: 1px solid #ccc;
}
 .filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

.filter-options select {
    flex: 1 1 160px; /*160*/
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
    max-width: 48.5%;
}
.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem; 
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Cacher la checkbox native */
.filter-toggle input[type="checkbox"] {
    display: none;
}

/* 1. Le "rail" (fond gris/vert) */
.filter-toggle .switch-visual {
    display: inline-block;
    position: relative; /* Contexte pour le cercle */
    width: 40px;
    height: 22px;
    background-color: #ccc;
    border-radius: 9999px;
    transition: background-color 0.2s ease-in-out;
    border: 1px solid rgba(0,0,0,0.1);
    vertical-align: middle; /* Aligner le switch avec le texte */
}

/* 2. Le "cercle" (blanc, positionné à l'intérieur) */
.filter-toggle .switch-visual::after {
    content: '';
    position: absolute;
    top: 1px;  /* (22px rail - 18px cercle) / 2 = 2px */
    left: 1px; /* Marge initiale de 2px */
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 3. État "coché" */
.filter-toggle input[type="checkbox"]:checked + .switch-visual {
    background-color: var(--collab-primary); /* Vert de la charte */
}

.filter-toggle input[type="checkbox"]:checked + .switch-visual::after {
    /* Mouvement = 40px (largeur rail) - 18px (cercle) - 2px (marge G) - 2px (marge D) = 18px */
    transform: translateX(18px); 
}

/* 4. Accessibilité (focus visible) */
.filter-toggle input[type="checkbox"]:focus-visible + .switch-visual {
    outline: 2px solid var(--collab-accent);
    outline-offset: 2px;
}

/* Grille et Cartes */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.collab-card {
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.collab-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* Media 2:1 */
.card-media {
    position: relative;
    width: 100%;
    padding-top: 50%; /* Ratio 2:1 */
    overflow: hidden;
    background-color: #eee;
}
.card-media .thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.collab-card:hover .thumb {
    transform: scale(1.05);
}
/* Badge "Camille_P_lt" */
.badge-camilleplt {
    position: absolute;
    bottom: 0rem;
    left: 0rem;
    width: 100%;
    background: var(--collab-primary);
    color: var(--collab-text);
    padding: 0.25rem 0.6rem;
    border-radius: 1rem 0 0 0;
    font-family: 'Playfair', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.card-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Permet aux actions de se pousser en bas */
}
.card-info h3 {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}
.card-info .address {
    font-size: 0.9rem;
    color: var(--color-gray);
    /* Clamp 2 lignes */
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    height: 2.8em; /* 1.4 * 2 */
    margin-bottom: 0.5rem;
}
.business-name,
.business-name-link,
.address-link {
    color: inherit;
    text-decoration: none;
}
.card-actions {
    padding-top: 0.75rem;
    margin-top: auto; /* Pousse en bas */
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.card-action-btn {
    font-size: 0.85rem;
    color: var(--color-accent) !important;
    text-decoration: none;
    font-weight: 600;
}
.card-action-btn:hover {
    text-decoration: underline;
}

/* Loader & Squelette */
.sentinel { height: 50px; }
#loader { 
    text-align: center; 
    padding: 1rem; 
    font-weight: 600;
    color: var(--color-gray);
    transition: opacity 0.3s;
}
#loader.loader-hidden { 
    display: none;
    opacity: 0;
}

@keyframes pulse {
  0% { background-color: #eee; }
  50% { background-color: #f5f5f5; }
  100% { background-color: #eee; }
}
.collab-card-skeleton {
    border-radius: 16px;
    overflow: hidden;
    background: var(--color-white);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.card-media-skeleton {
    width: 100%;
    padding-top: 50%; /* 2:1 */
    animation: pulse 1.5s infinite ease-in-out;
}
.card-info-skeleton {
    padding: 1rem;
}
.skeleton-line {
    border-radius: 4px;
    animation: pulse 1.5s infinite ease-in-out;
}
.skeleton-line-title {
    height: 1.2rem;
    width: 70%;
    margin-bottom: 0.5rem;
}
.skeleton-line-sub {
    height: 1.8rem;
    width: 90%;
}

/* AJOUTER CECI pour cibler l'image dans la structure template */
.card-image-column .image-link .thumb {
    position: absolute; /* Important pour remplir le conteneur */
    inset: 0;           /* Raccourci pour top/right/bottom/left = 0 */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadre l'image pour remplir sans déformer */
    transition: transform 0.3s ease;
}

/* Modifier légèrement le conteneur image pour qu'il agisse comme .card-media */
.card-image-column .image-link {
    display: block; /* Nécessaire pour que position:absolute fonctionne dedans */
    position: relative; /* Référence pour les éléments absolus internes */
    width: 100%;
    height: 100%;
    overflow: hidden; /* Cache les dépassements de l'image (zoom au survol) */
    background-color: #eee; /* Fond gris pendant le chargement */
}

/* === STYLES CARTE (copiés de style.css) === */
#view-map-mode,
#view-mixte-mode,
#salons-grid {
    display: none; /* Caché par défaut */
}

#salons-grid.active,
#view-map-mode.active,
#view-mixte-mode.active {
    display: flex; /* 'flex' pour mixte, 'block' pour map, 'grid' pour grid */
}
#view-map-mode.active { display: block; }
#salons-grid.active { display: grid; }

#map-mixte {
    flex: 1;
    height: 80vh;
    position: sticky;
    top: 10vh; /* Ajustez si votre header est différent */
    border-radius: 1rem;
    background-color: #eee; /* Fond en attendant le chargement */
}

#map-only {
    width: 100%;
    height: 70vh;
    border-radius: 1rem;
    background-color: #eee;
}

#salons-grid-mix {
    flex: 2; /* Colonne de résultats */
}

/* Assurer que la grille interne s'affiche correctement */
#salons-grid-mix.salons-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Cache le bouton Vue sur mobile quand le tiroir est ouvert */
#btnToggleView.is-hidden { display: none !important; }

/* S’assure que le tiroir passe au-dessus de la barre mobile */
#place-drawer { z-index: 1200; }
#place-drawer .drawer-backdrop { z-index: 1200; }
#place-drawer .drawer-panel { z-index: 1201; }