/* Togo Event Trip — main.css (surcharges fines au-delà de Tailwind) */

/* Helpers non fournis par Tailwind CDN (aliases) */
.btn-primary {
    background-color: #1B5E3F;
    color: #FBF8F4;
}
.btn-primary:hover {
    background-color: rgba(27, 94, 63, 0.9);
}

.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Carte Leaflet — hauteur fixe et corrections visuelles */
#map-leaflet {
    z-index: 1;
    border-radius: 0.5rem;
}
.leaflet-container {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
}
.leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.tet-popup {
    padding: 4px;
    min-width: 180px;
}
.tet-popup strong {
    color: #1B5E3F;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}
.tet-popup em {
    color: #F4C542;
    font-style: italic;
    font-size: 11px;
}
.tet-popup a {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
}

/* Marqueur cluster custom : couleur Togo */
.marker-cluster-small {
    background-color: rgba(27, 94, 63, 0.4);
}
.marker-cluster-small div {
    background-color: rgba(27, 94, 63, 0.7);
    color: #FBF8F4;
}
.marker-cluster-medium {
    background-color: rgba(244, 197, 66, 0.5);
}
.marker-cluster-medium div {
    background-color: rgba(244, 197, 66, 0.8);
    color: #0F2417;
}
.marker-cluster-large {
    background-color: rgba(199, 56, 58, 0.4);
}
.marker-cluster-large div {
    background-color: rgba(199, 56, 58, 0.7);
    color: #FBF8F4;
}

/* Marqueur par défaut si AwesomeMarkers absent */
.tet-default-marker {
    background-color: #1B5E3F;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
}

/* Skip link a11y */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animation fade-in pour les cartes événement */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.card {
    animation: fadeIn 0.3s ease-out;
}

/* Programme timeline (event_detail) */
.prose {
    line-height: 1.6;
}
.whitespace-pre-line {
    white-space: pre-line;
}

/* =================================================================== */
/* Hero slider                                                          */
/* =================================================================== */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 360px;
}
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}
.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}
.hero-slide.active > div {
    animation: fadeIn 0.6s ease-out;
}

/* Dots indicateurs */
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(251, 248, 244, 0.4);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    padding: 0;
}
.hero-dot.active {
    background-color: #F4C542;
    transform: scale(1.3);
}
.hero-dot:hover {
    background-color: rgba(244, 197, 66, 0.7);
}

/* Navigation prev/next */
.hero-nav {
    backdrop-filter: blur(4px);
}
.hero-nav:hover {
    transform: translateY(-50%) scale(1.1);
    transition: transform 0.2s;
}

/* =================================================================== */
/* Stat cards (chiffres clés)                                          */
/* =================================================================== */
.stat-card {
    transition: transform 0.2s, background-color 0.2s;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #F4C542, transparent);
    opacity: 0.5;
}
.stat-card:hover {
    transform: translateY(-4px);
}
.stat-value {
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* =================================================================== */
/* Partenaires marquee (effet balise <marquee>)                        */
/* =================================================================== */
.partners-marquee {
    mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
}
.partners-marquee-track {
    width: max-content;
    animation: tet-marquee-scroll 30s linear infinite;
}
.partners-marquee:hover .partners-marquee-track {
    animation-play-state: paused;
}
@keyframes tet-marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =================================================================== */
/* Partner cards (statique et marquee)                                 */
/* =================================================================== */
.partner-card {
    min-height: 200px;
}
.partner-logo {
    transition: transform 0.2s;
}
.partner-card:hover .partner-logo {
    transform: scale(1.1);
}

/* =================================================================== */
/* Testimonial cards                                                   */
/* =================================================================== */
.testimonial-card {
    min-height: 280px;
}

/* =================================================================== */
/* Article cards                                                       */
/* =================================================================== */
.article-category {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =================================================================== */
/* Line-clamp utility                                                  */
/* =================================================================== */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =================================================================== */
/* Bouton Connexion header                                             */
/* =================================================================== */
.btn-login {
    white-space: nowrap;
}

/* =================================================================== */
/* Pages légales                                                       */
/* =================================================================== */
.prose h2 {
    color: #1B5E3F;
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #F4C542;
    padding-bottom: 0.5rem;
}
.prose h2:first-child {
    margin-top: 0;
}
.prose p, .prose ul {
    margin-bottom: 1rem;
    line-height: 1.6;
}
.prose ul {
    list-style: disc;
    padding-left: 1.5rem;
}
.prose a {
    color: #1B5E3F;
    text-decoration: underline;
}
.prose a:hover {
    color: #2E8059;
}
.prose table {
    margin: 1rem 0;
}

/* =================================================================== */
/* prefers-reduced-motion                                              */
/* =================================================================== */
@media (prefers-reduced-motion: reduce) {
    .card,
    .stat-card,
    .hero-slide,
    .hero-nav,
    .hero-dot,
    .partners-marquee-track,
    .testimonial-card,
    .partner-card,
    .partner-logo {
        animation: none !important;
        transition: none !important;
    }
    .hero-slide {
        opacity: 0;
    }
    .hero-slide.active {
        opacity: 1;
    }
    .partners-marquee-track {
        animation: none !important;
    }
    * {
        scroll-behavior: auto !important;
    }
}

/* =================================================================== */
/* Mobile : ajustements                                                */
/* =================================================================== */
@media (max-width: 640px) {
    #map-leaflet {
        height: 300px !important;
    }
    .hero-slider {
        min-height: 280px;
    }
    .hero-slide > div {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}
