/* ============================================================
   STYLE.CSS — Feuille de styles principale PISD
   Complément à Tailwind CSS
   ============================================================ */

/* --- Variables CSS globales --- */
:root {
    --pisd-blue:       #1a5fb4;
    --pisd-blue-light: #3584e4;
    --pisd-blue-dark:  #0d2e6b;
    --pisd-green:      #2e7d32;
    --pisd-red:        #c62828;
    --pisd-yellow:     #f9a825;
    --pisd-gray:       #f8fafc;
    --transition:      all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* --- Focus visible (accessibilité clavier) --- */
:focus-visible {
    outline: 3px solid var(--pisd-yellow);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Typographie --- */
.font-display { font-family: 'Playfair Display', Georgia, serif; }
.font-body    { font-family: 'Source Sans 3', 'Helvetica Neue', sans-serif; }

/* --- Navigation active --- */
.nav-active {
    background-color: var(--pisd-blue);
    color: white;
}

/* ============================================================
   CARROUSEL / SLIDER — Page d'accueil
   ============================================================ */
.slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 580px;
    background: var(--pisd-blue-dark);
}

@media (max-width: 768px) {
    .slider-container { height: 420px; }
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active { opacity: 1; }

/* IMAGE DE FOND RÉELLE */
.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    transition: transform 8s ease-out;
    z-index: 0;
}
.slide.active .slide-bg { transform: scale(1); }

/* Overlays dégradés */
.slide-overlay-expert {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom,
        rgba(13,46,107,0.5) 0%,
        rgba(13,46,107,0.2) 40%,
        rgba(0,0,0,0.7) 100%);
    z-index: 1;
}
.slide-overlay-green {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom,
        rgba(5,80,60,0.5) 0%,
        rgba(5,80,60,0.2) 40%,
        rgba(0,0,0,0.7) 100%);
    z-index: 1;
}
.slide-overlay-dark {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom,
        rgba(10,10,30,0.55) 0%,
        rgba(10,10,30,0.25) 40%,
        rgba(0,0,0,0.72) 100%);
    z-index: 1;
}

/* Ancien overlay conservé pour compatibilité */
.slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg,
        rgba(13,46,107,0.75) 0%,
        rgba(26,95,180,0.45) 60%,
        rgba(249,168,37,0.15) 100%);
    z-index: 1;
}

/* Bandeau date/lieu — coin bas gauche */
.slide-badge-corner {
    position: absolute;
    bottom: 60px; left: 24px;
    z-index: 10;
    display: inline-flex;
    align-items: center; gap: 6px;
    background: rgba(249,168,37,0.92);
    color: #0d2e6b;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
@media (max-width: 768px) {
    .slide-badge-corner { bottom: 48px; left: 12px; font-size: 0.62rem; padding: 4px 8px; }
}

/* Eyebrow pill au-dessus du titre */
.slide-eyebrow {
    display: inline-flex;
    align-items: center; gap: 8px;
    background: rgba(249,168,37,0.18);
    border: 1px solid rgba(249,168,37,0.55);
    color: #f9a825;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 820px;
    color: white;
}

.slide-content h1,
.slide-content h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.slide-content p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Contrôles du carrousel */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    border: 2px solid rgba(255,255,255,0.45);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: var(--pisd-yellow);
    color: var(--pisd-blue-dark);
    border-color: var(--pisd-yellow);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn-prev { left: 16px; }
.slider-btn-next { right: 16px; }

/* Indicateurs de position */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
    align-items: center;
}

.slider-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.slider-dot.active {
    background: var(--pisd-yellow);
    width: 26px;
    border-radius: 4px;
}

/* ============================================================
   CARDS — Articles, événements
   ============================================================ */
.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    transition: var(--transition);
    border: 1px solid #e8f0fe;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(26, 95, 180, 0.15);
    border-color: var(--pisd-blue-light);
}

/* 📌 IMAGE PLACEHOLDER — Remplacer par une vraie image */
.img-placeholder {
    background: linear-gradient(135deg, #e8f0fe 0%, #c8d8f8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--pisd-blue);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
    gap: 0.5rem;
    border-bottom: 3px solid var(--pisd-blue-light);
}

.img-placeholder i {
    font-size: 2rem;
    opacity: 0.5;
}

/* ============================================================
   SECTIONS HERO & TITRES DE PAGES
   ============================================================ */
.page-hero {
    background: linear-gradient(135deg, var(--pisd-blue-dark) 0%, var(--pisd-blue) 100%);
    color: white;
    padding: 4rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(249,168,37,0.1) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

.page-hero-content {
    position: relative;
    z-index: 1;
}

/* Décoration de titre avec barre colorée */
.section-title {
    position: relative;
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    height: 4px;
    margin-top: 8px;
    background: linear-gradient(90deg, var(--pisd-green), var(--pisd-red), var(--pisd-yellow));
    border-radius: 2px;
}

/* ============================================================
   FORMULAIRES
   ============================================================ */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    color: #1e293b;
}

.form-input:focus {
    border-color: var(--pisd-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.1);
}

.form-input.error {
    border-color: var(--pisd-red);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: #374151;
    font-size: 0.9rem;
}

.form-error {
    color: var(--pisd-red);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.form-error.visible {
    display: block;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--pisd-blue);
    color: white;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--pisd-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 95, 180, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--pisd-blue);
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 2px solid var(--pisd-blue);
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--pisd-blue);
    color: white;
}

.btn-yellow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--pisd-yellow);
    color: var(--pisd-blue-dark);
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-yellow:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 168, 37, 0.4);
}

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-blue   { background: #dbeafe; color: var(--pisd-blue); }
.badge-green  { background: #dcfce7; color: var(--pisd-green); }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red    { background: #fee2e2; color: var(--pisd-red); }

/* ============================================================
   ACCORDION (FAQ)
   ============================================================ */
.accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.accordion-item:hover {
    border-color: var(--pisd-blue-light);
}

.accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-align: left;
    color: #1e293b;
    transition: var(--transition);
}

.accordion-trigger:hover,
.accordion-trigger[aria-expanded="true"] {
    background: #f0f6ff;
    color: var(--pisd-blue);
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
    transform: rotate(45deg);
}

.accordion-icon {
    color: var(--pisd-blue);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease;
    padding: 0 1.25rem;
    background: #f8fafc;
    color: #4b5563;
    line-height: 1.7;
}

.accordion-body.open {
    max-height: 500px;
    padding: 1rem 1.25rem;
}

/* ============================================================
   SECTION CHIFFRES CLÉS
   ============================================================ */
.stat-card {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--pisd-blue);
    line-height: 1;
}

/* ============================================================
   DON — Méthodes de paiement
   ============================================================ */
.payment-card {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
    cursor: default;
}

.payment-card:hover {
    border-color: var(--pisd-blue);
    box-shadow: 0 8px 24px rgba(26, 95, 180, 0.12);
}

.payment-orange {
    border-top: 4px solid #ff6600;
}

.payment-mtn {
    border-top: 4px solid #ffcc00;
}

.payment-bank {
    border-top: 4px solid var(--pisd-blue);
}

/* ============================================================
   ADMIN — Zone sécurisée
   ============================================================ */
.admin-sidebar {
    background: var(--pisd-blue-dark);
    color: white;
    min-height: 100vh;
    width: 260px;
    flex-shrink: 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #94a3b8;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    color: white;
    background: rgba(255,255,255,0.08);
    border-left-color: var(--pisd-yellow);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }

/* ============================================================
   RESPONSIVE UTILITAIRES
   ============================================================ */
@media (max-width: 640px) {
    .stat-number { font-size: 2.25rem; }
    .page-hero   { padding: 2.5rem 1rem; }
}

/* ============================================================
   IMPRESSION
   ============================================================ */
@media print {
    header, footer, #back-to-top, .slider-btn, .slider-dots { display: none; }
    body { font-size: 12pt; }
}
