/* ============================================
   CSS unifié pour les pages Découvrir
   (Région, Département, Ville)
   ============================================ */

/* Reset du main */
main {
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: none !important;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* ============================================
   HERO SECTION avec Fil d'Ariane
   ============================================ */
.hero-decouvrir {
    position: relative;
    background: white;
    border-bottom: 1px solid #e8e8e8;
    overflow: hidden;
}

.hero-decouvrir::before {
    display: none;
}

.hero-decouvrir-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #333;
}

/* Fil d'Ariane */
.breadcrumb-decouvrir {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.breadcrumb-decouvrir a {
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.breadcrumb-decouvrir a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

.breadcrumb-decouvrir .separator {
    color: #bbb;
    font-size: 0.75rem;
}

.breadcrumb-decouvrir .current {
    color: #555;
    font-weight: 600;
}

/* Titre et sous-titre Hero */
.hero-decouvrir-top {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-decouvrir-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
    line-height: 1.2;
}

.hero-decouvrir-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-decouvrir-subtitle a {
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.2s;
}

.hero-decouvrir-subtitle a:hover {
    color: #2c3e50;
    text-decoration: underline;
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.decouvrir-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: #f8f9fa;
}

/* ============================================
   SECTIONS
   ============================================ */
.decouvrir-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    scroll-margin-top: 20px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: #2c3e50;
}

/* Description / Présentation */
.description-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    text-align: justify;
}

/* Stats chiffres clés */
.location-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-card {
    flex: 1 1 110px;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f0ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    text-align: center;
    min-width: 90px;
    text-decoration: none;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

/* Cards cliquables — couleur par catégorie */
.stat-card--manifestation { border-bottom: 3px solid #3498db; }
.stat-card--manifestation .stat-label { color: #3498db; }
.stat-card--manifestation .stat-number { color: #2980b9; }

.stat-card--activite { border-bottom: 3px solid #27ae60; }
.stat-card--activite .stat-label { color: #27ae60; }
.stat-card--activite .stat-number { color: #219a52; }

.stat-card--hebergement { border-bottom: 3px solid #e67e22; }
.stat-card--hebergement .stat-label { color: #e67e22; }
.stat-card--hebergement .stat-number { color: #d35400; }

.stat-card--restaurant { border-bottom: 3px solid #8e44ad; }
.stat-card--restaurant .stat-label { color: #8e44ad; }
.stat-card--restaurant .stat-number { color: #7d3c98; }

.stat-card--itineraire { border-bottom: 3px solid #555; }
.stat-card--itineraire .stat-label { color: #555; }
.stat-card--itineraire .stat-number { color: #333; }

/* Flèche → indiquant que c'est cliquable */
a.stat-card::after {
    content: '→';
    display: block;
    font-size: 0.7rem;
    margin-top: 0.2rem;
    opacity: 0.5;
}

a.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(44,62,80,0.12);
    text-decoration: none;
}

a.stat-card:hover::after { opacity: 1; }

.stat-number {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.72rem;
    color: #777;
    margin-top: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 480px) {
    .stat-card { flex: 1 1 70px; padding: 0.5rem 0.4rem; min-width: 0; }
    .stat-number { font-size: 1rem; }
    .stat-label { font-size: 0.6rem; letter-spacing: 0; white-space: normal; word-break: break-word; }
    .stat-label i { display: none; }

    .hero-decouvrir-content {
        padding: 1.25rem 1rem 1rem;
    }

    .hero-decouvrir-title {
        font-size: 1.4rem;
    }

    .hero-decouvrir-subtitle {
        font-size: 0.88rem;
    }

    .decouvrir-container {
        padding: 1rem 0.75rem;
    }

    .decouvrir-section {
        padding: 1.1rem;
    }

    .section-title {
        font-size: 1.2rem;
    }
}

/* Placeholder message */
.placeholder-message {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.placeholder-message i {
    font-size: 4rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.placeholder-message h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* ============================================
   SECTION ESCAPADES - Override pour grille de cartes
   Utilise les classes de index.css (.article-grid, .article-card)
   ============================================ */
.decouvrir-section .article-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

@media (max-width: 1200px) {
    .decouvrir-section .article-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .decouvrir-section .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .decouvrir-section .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .decouvrir-section .article-grid {
        grid-template-columns: 1fr;
    }
}

/* Boutons de recherche */
.search-buttons-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.search-type-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
}

.search-type-btn:hover {
    border-color: #2c3e50;
    color: #2c3e50;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.2);
}

.search-type-btn i {
    font-size: 1.1rem;
}

.search-type-btn.agenda { --btn-color: #3498db; }
.search-type-btn.activites { --btn-color: #27ae60; }
.search-type-btn.hebergement { --btn-color: #e67e22; }
.search-type-btn.restaurant { --btn-color: #9b59b6; }
.search-type-btn.itineraire { --btn-color: #555; }

.search-type-btn.agenda:hover { border-color: var(--btn-color); color: var(--btn-color); }
.search-type-btn.activites:hover { border-color: var(--btn-color); color: var(--btn-color); }
.search-type-btn.hebergement:hover { border-color: var(--btn-color); color: var(--btn-color); }
.search-type-btn.restaurant:hover { border-color: var(--btn-color); color: var(--btn-color); }
.search-type-btn.itineraire:hover { border-color: var(--btn-color); color: var(--btn-color); }

.search-type-btn.agenda i { color: #3498db; }
.search-type-btn.activites i { color: #27ae60; }
.search-type-btn.hebergement i { color: #e67e22; }
.search-type-btn.restaurant i { color: #9b59b6; }
.search-type-btn.itineraire i { color: #555; }

/* ============================================
   SECTION RECHERCHE (Départements/Villes)
   ============================================ */

/* Grille des départements */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.department-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}

.department-card:hover {
    border-color: #2c3e50;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
    color: #2c3e50;
}

.department-card i {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.department-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

/* Filtre alphabétique */
.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 0.4rem;
    margin-top: 1.5rem;
}

.letter-btn {
    padding: 0.5rem 0.35rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.letter-btn:hover {
    border-color: #2c3e50;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.letter-btn.active {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* Grille des villes */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.city-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
    text-align: center;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.85rem;
}

.city-card:hover {
    border-color: #2c3e50;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.city-card i {
    margin-right: 0.3rem;
    color: #2c3e50;
    font-size: 0.75rem;
}

/* Message vide */
.empty-message {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.empty-message i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

/* ============================================
   BOUTON RETOUR
   ============================================ */
.back-btn-container {
    text-align: center;
    margin-top: 2rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .search-buttons-container {
        gap: 0.75rem;
    }

    .search-type-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .hero-decouvrir {
        height: 200px;
    }

    .hero-decouvrir-title {
        font-size: 1.8rem;
    }

    .breadcrumb-decouvrir {
        font-size: 0.85rem;
    }

    .decouvrir-container {
        padding: 2rem 1rem;
    }

    .decouvrir-section {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .search-buttons-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-type-btn {
        justify-content: center;
    }

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

    .alphabet-grid {
        grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    }

    .cities-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .departments-grid {
        grid-template-columns: 1fr;
    }
}
