/* ================================================================
   GRAND CENTRE POLYVALENT - FEUILLE DE STYLE GLOBALE
   Design 2026 - Inspiré de Gmail (propre, moderne, réactif)
   ================================================================ */

/* --- Variables CSS --- */
:root {
    --primary: #0A6E5C;
    --primary-light: #0D8B73;
    --primary-dark: #064D3F;
    --accent: #E8A838;
    --accent-light: #F2C06B;
    --accent-dark: #C48A1E;
    --bg: #F4F6F9;
    --bg-card: #FFFFFF;
    --text: #1A1A2E;
    --text-muted: #6B7280;
    --border: #E2E6EC;
    --danger: #DC3545;
    --danger-light: #FDE8EA;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --sidebar-w: 280px;
    --topbar-h: 56px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'DM Sans', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ================================================================
   SIDEBAR MOBILE (style Gmail)
   ================================================================ */
.menu-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 998; opacity: 0; visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}
.menu-overlay.show { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w); background: var(--bg-card);
    z-index: 999; transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    min-height: var(--topbar-h);
}
.sidebar-logo-wrap { display: flex; align-items: center; gap: 10px; }
.sidebar-logo {
    width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--primary);
}
.sidebar-close {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--text-muted); transition: background var(--transition);
}
.sidebar-close:hover { background: var(--bg); }

.sidebar-nav { flex: 1; padding: 8px; overflow-y: auto; }
.sidebar-item {
    display: flex; align-items: center; gap: 14px;
    padding: 10px 16px; border-radius: var(--radius-sm);
    color: var(--text); font-weight: 500; font-size: 14px;
    transition: background var(--transition), color var(--transition);
}
.sidebar-item:hover { background: var(--bg); }
.sidebar-item.active {
    background: rgba(10, 110, 92, 0.08); color: var(--primary); font-weight: 600;
}
.sidebar-item i { width: 22px; text-align: center; font-size: 16px; }
.sidebar-item-logo {
    width: 28px; height: 28px; border-radius: 6px; object-fit: cover;
    border: 1.5px solid var(--border);
}

/* ================================================================
   TOPBAR
   ================================================================ */
.topbar {
    position: sticky; top: 0; z-index: 100;
    height: var(--topbar-h); background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 8px;
    box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 8px; }
.hamburger {
    width: 40px; height: 40px; display: none; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--text-muted); font-size: 18px;
    transition: background var(--transition);
}
.hamburger:hover { background: var(--bg); }

.topbar-logo-wrap { display: flex; align-items: center; gap: 10px; }
.topbar-logo {
    width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--primary);
}
.topbar-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--text); }

.topbar-nav { display: flex; align-items: center; gap: 4px; margin-left: 32px; }
.topbar-link {
    padding: 8px 16px; border-radius: var(--radius-sm);
    color: var(--text-muted); font-weight: 500; font-size: 14px;
    transition: all var(--transition); white-space: nowrap;
}
.topbar-link:hover { background: var(--bg); color: var(--text); }
.topbar-link.active { background: rgba(10,110,92,0.08); color: var(--primary); font-weight: 600; }

.topbar-right { margin-left: auto; display: flex; align-items: center; }
.topbar-icon-link {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--text-muted); font-size: 14px;
    transition: all var(--transition);
}
.topbar-icon-link:hover { background: var(--bg); color: var(--primary); }

/* ================================================================
   CONTENU PRINCIPAL
   ================================================================ */
.main-content { min-height: calc(100vh - var(--topbar-h) - 60px); }

/* ================================================================
   FOOTER
   ================================================================ */
.public-footer {
    height: 52px; background: var(--bg-card); border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
}
.footer-content { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-copy { font-size: 12px; color: var(--text-muted); }
.footer-lang { display: flex; align-items: center; gap: 6px; }
.footer-lang-label { font-size: 12px; color: var(--text-muted); }
.lang-btn {
    padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 700;
    color: var(--text-muted); transition: all var(--transition);
}
.lang-btn:hover { background: var(--bg); }
.lang-btn.active { background: var(--primary); color: #fff; }

/* ================================================================
   SLIDER / HERO (Animations immersives sans images)
   ================================================================ */
.hero {
    position: relative;
    overflow: hidden;
    padding: 80px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 480px;
}

/* --- Fond animé qui se déplace --- */
.hero::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(255,255,255,0.06) 10%, transparent 20%);
    animation: heroRotateBg 20s linear infinite;
    z-index: 0;
}
@keyframes heroRotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Deuxième couche de lumière qui pulse --- */
.hero::after {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232,168,56,0.15) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: heroPulseLight 4s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}
@keyframes heroPulseLight {
    0% { width: 400px; height: 400px; opacity: 0.3; }
    100% { width: 800px; height: 800px; opacity: 0.6; }
}

/* --- Conteneur des éléments animés --- */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

/* --- Particules lumineuses flottantes --- */
.hero-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    filter: blur(0.5px);
    animation: floatParticle var(--dur, 12s) linear infinite;
    animation-delay: var(--delay, 0s);
}
@keyframes floatParticle {
    0% { transform: translateY(100vh) translateX(0) scale(0); opacity: 0; }
    10% { opacity: var(--op, 0.25); transform: translateY(80vh) translateX(10px) scale(1); }
    50% { transform: translateY(40vh) translateX(-15px) scale(1.1); }
    90% { opacity: var(--op, 0.25); }
    100% { transform: translateY(-10vh) translateX(20px) scale(0); opacity: 0; }
}

/* --- Formes géométriques flottantes --- */
.hero-shape {
    position: absolute;
    opacity: 0;
    animation: shapeFloat var(--dur, 15s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
.hero-shape.circle {
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
}
.hero-shape.ring {
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    background: transparent;
    animation: shapeFloat var(--dur, 15s) ease-in-out infinite, ringPulse 3s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
@keyframes ringPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.4; }
    50% { transform: scale(1.15) rotate(180deg); opacity: 0.7; }
}
.hero-shape.square {
    border: 2px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    transform: rotate(45deg);
}
.hero-shape.triangle {
    width: 0 !important; height: 0 !important;
    border-left: var(--size, 20px) solid transparent;
    border-right: var(--size, 20px) solid transparent;
    border-bottom: calc(var(--size, 20px) * 1.732) solid rgba(255,255,255,0.06);
    background: transparent !important;
    border-radius: 0 !important;
}
@keyframes shapeFloat {
    0% { opacity: 0; transform: translateY(40px) rotate(0deg); }
    15% { opacity: 1; }
    50% { transform: translateY(-40px) rotate(180deg); }
    85% { opacity: 1; }
    100% { opacity: 0; transform: translateY(40px) rotate(360deg); }
}

/* --- Icônes flottantes --- */
.hero-icon {
    position: absolute;
    color: rgba(255,255,255,0.08);
    font-size: var(--icon-size, 28px);
    animation: iconFloat var(--dur, 18s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.05));
}
@keyframes iconFloat {
    0% { transform: translateY(30px) rotate(0deg) scale(0.8); opacity: 0; }
    20% { opacity: 1; transform: translateY(-20px) rotate(45deg) scale(1); }
    50% { transform: translateY(-50px) rotate(180deg) scale(1.1); }
    80% { opacity: 1; }
    100% { transform: translateY(30px) rotate(360deg) scale(0.8); opacity: 0; }
}

/* --- Lignes animées style tech --- */
.hero-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
    animation: lineSlide var(--dur, 8s) linear infinite;
    animation-delay: var(--delay, 0s);
    opacity: 0;
}
@keyframes lineSlide {
    0% { transform: translateX(-100%); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateX(100vw); opacity: 0; }
}

/* --- Cercles concentriques qui s'agrandissent --- */
.hero-ripple {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    animation: rippleExpand var(--dur, 6s) ease-out infinite;
    animation-delay: var(--delay, 0s);
    opacity: 0;
}
@keyframes rippleExpand {
    0% { width: 0; height: 0; opacity: 0.6; }
    100% { width: 300px; height: 300px; opacity: 0; }
}

/* --- Points lumineux qui clignotent --- */
.hero-dot {
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    animation: dotBlink var(--dur, 3s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    box-shadow: 0 0 6px 2px rgba(255,255,255,0.2);
}
@keyframes dotBlink {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* --- Contenu du hero --- */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 700px;
    animation: heroFadeIn 1s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes heroFadeIn {
    0% { opacity: 0; transform: translateY(40px) scale(0.95); filter: blur(8px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.hero-icon-main {
    font-size: 52px;
    color: #fff;
    margin-bottom: 20px;
    display: inline-block;
    animation: iconMainBounce 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
}
@keyframes iconMainBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-12px) scale(1.05); }
    50% { transform: translateY(0) scale(1); }
    75% { transform: translateY(-6px) scale(1.02); }
}
.hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.15;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.hero p {
    font-size: 16px;
    opacity: 0.92;
    line-height: 1.7;
    margin-bottom: 32px;
    text-shadow: 0 1px 10px rgba(0,0,0,0.15);
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Animation spéciale : grille de points en arrière-plan --- */
.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.04;
    background-image: radial-gradient(rgba(255,255,255,0.8) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridShift 30s linear infinite;
}
@keyframes gridShift {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

/* --- Animation des cartes du portail au survol --- */
.portal-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.35s ease;
    transform-origin: left;
}
.portal-card:hover::after { transform: scaleX(1); }
.portal-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* Responsive hero */
@media (max-width: 767px) {
    .hero { padding: 60px 20px; min-height: 400px; }
    .hero-cta { flex-direction: column; align-items: center; }
}

/* ================================================================
   BOUTONS
   ================================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px; transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,168,56,0.35); }
.btn-secondary { background: rgba(255,255,255,0.15); color: #fff; border: 1.5px solid rgba(255,255,255,0.3); }
.btn-secondary:hover { background: rgba(255,255,255,0.25); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c82333; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ================================================================
   CARTES
   ================================================================ */
.section { padding: 40px 24px; max-width: 1200px; margin: 0 auto; }
.section-title {
    font-family: var(--font-display); font-weight: 800; font-size: 28px;
    margin-bottom: 8px; color: var(--text);
}
.section-subtitle { color: var(--text-muted); margin-bottom: 32px; font-size: 15px; }

.card-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.card {
    background: var(--bg-card); border-radius: var(--radius);
    border: 1px solid var(--border); overflow: hidden;
    transition: all var(--transition); position: relative;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-icon {
    width: 52px; height: 52px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 14px;
    background: rgba(10,110,92,0.08); color: var(--primary);
}
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.card-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-price { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--accent-dark); }

/* Carte avec image placeholder */
.card-img {
    height: 180px; background: linear-gradient(135deg, var(--bg) 0%, var(--border) 100%);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 40px; position: relative; overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .card-badge {
    position: absolute; top: 12px; right: 12px;
    padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
}

/* ================================================================
   BADGES
   ================================================================ */
.badge {
    display: inline-flex; align-items: center; padding: 3px 10px;
    border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge-pending { background: var(--warning-light); color: var(--warning); }
.badge-progress { background: var(--info-light); color: var(--info); }
.badge-done { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }

/* ================================================================
   PORTAIL ACCUEIL (4 cartes)
   ================================================================ */
.portal-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px; padding: 0 24px 60px; max-width: 1200px; margin: 0 auto;
}
.portal-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 40px 28px;
    text-align: center; border: 1px solid var(--border);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
}
.portal-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--primary); transform: scaleX(0); transition: transform 0.35s ease;
    transform-origin: left;
}
.portal-card:hover::before { transform: scaleX(1); }
.portal-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.portal-card-icon {
    width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; transition: all 0.35s ease;
}
.portal-card:nth-child(1) .portal-card-icon { background: rgba(10,110,92,0.1); color: var(--primary); }
.portal-card:nth-child(2) .portal-card-icon { background: rgba(232,168,56,0.1); color: var(--accent-dark); }
.portal-card:nth-child(3) .portal-card-icon { background: rgba(220,53,69,0.1); color: var(--danger); }
.portal-card:nth-child(4) .portal-card-icon { background: rgba(59,130,246,0.1); color: var(--info); }
.portal-card:hover .portal-card-icon { transform: scale(1.1); }
.portal-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin-bottom: 10px; }
.portal-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.7; }

/* ================================================================
   FORMULAIRES
   ================================================================ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text); }
.form-control {
    width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--bg-card); color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,110,92,0.12); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

/* ================================================================
   RECHERCHE & PAGINATION
   ================================================================ */
.search-bar {
    position: relative; max-width: 400px; margin-bottom: 24px;
}
.search-bar i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 14px;
}
.search-input {
    width: 100%; padding: 10px 14px 10px 40px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-size: 14px; background: var(--bg-card);
    transition: all var(--transition);
}
.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,110,92,0.12); }

.pagination {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 32px; flex-wrap: wrap;
}
.page-link {
    padding: 8px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
    border: 1px solid var(--border); color: var(--text-muted); background: var(--bg-card);
    transition: all var(--transition);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-dots { padding: 8px 6px; color: var(--text-muted); }

/* ================================================================
   DÉTAIL (layout 2 colonnes desktop)
   ================================================================ */
.detail-layout {
    display: grid; grid-template-columns: 1fr; gap: 32px;
    max-width: 1100px; margin: 0 auto; padding: 32px 24px;
}
@media (min-width: 768px) {
    .detail-layout { grid-template-columns: 1fr 1fr; }
}

/* Carousel d'images */
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.carousel-main {
    width: 100%; aspect-ratio: 4/3; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.carousel-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s ease; }
.carousel-main .carousel-placeholder {
    font-size: 64px; color: var(--text-muted); opacity: 0.3;
}
.carousel-thumbs {
    display: flex; gap: 6px; padding: 8px; overflow-x: auto;
    background: var(--bg-card); border-top: 1px solid var(--border);
}
.carousel-thumb {
    width: 60px; height: 60px; border-radius: 6px; overflow: hidden;
    cursor: pointer; border: 2px solid transparent; flex-shrink: 0;
    transition: border-color var(--transition);
}
.carousel-thumb.active, .carousel-thumb:hover { border-color: var(--primary); }
.carousel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.9);
    color: var(--text); display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow); transition: all var(--transition); z-index: 2;
}
.carousel-btn:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

/* Vidéo */
.video-container {
    position: relative; padding-bottom: 56.25%; height: 0;
    border-radius: var(--radius); overflow: hidden; margin-top: 16px;
}
.video-container iframe, .video-container video {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

/* Info détail */
.detail-info { display: flex; flex-direction: column; gap: 20px; }
.detail-info h1 { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.3; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 12px; }
.detail-meta-item {
    display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted);
    padding: 4px 12px; background: var(--bg); border-radius: 20px;
}
.detail-meta-item i { color: var(--primary); }
.detail-desc { font-size: 15px; line-height: 1.8; color: var(--text); }
.detail-section { padding-top: 16px; border-top: 1px solid var(--border); }
.detail-section-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-bottom: 10px; }

/* Enseignant */
.enseignant-card {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 16px; background: var(--bg); border-radius: var(--radius-sm);
}
.enseignant-photo {
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
    background: var(--border); display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: var(--text-muted); flex-shrink: 0; overflow: hidden;
}
.enseignant-photo img { width: 100%; height: 100%; object-fit: cover; }
.enseignant-nom { font-weight: 700; font-size: 15px; }
.enseignant-desc { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Variantes */
.variant-list { display: flex; flex-direction: column; gap: 8px; }
.variant-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: var(--bg); border-radius: var(--radius-sm);
    font-size: 14px;
}
.variant-price { font-weight: 700; color: var(--accent-dark); }

/* Sélecteur quantité + ajout panier */
.add-to-cart-bar {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding-top: 16px; border-top: 1px solid var(--border); margin-top: auto;
}
.qty-control {
    display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    overflow: hidden;
}
.qty-btn {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--text-muted); transition: all var(--transition);
}
.qty-btn:hover { background: var(--bg); color: var(--primary); }
.qty-input {
    width: 44px; height: 36px; text-align: center; border: none; border-left: 1px solid var(--border);
    border-right: 1px solid var(--border); font-weight: 700; font-size: 14px;
}
.qty-input:focus { outline: none; }

/* ================================================================
   PANIER FLOTTANT
   ================================================================ */
.cart-float { position: fixed; bottom: 24px; right: 24px; z-index: 200; }
.cart-float-btn {
    width: 56px; height: 56px; border-radius: 50%; background: var(--accent);
    color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(232,168,56,0.4); transition: all var(--transition);
    position: relative;
}
.cart-float-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(232,168,56,0.5); }
.cart-float-badge {
    position: absolute; top: -4px; right: -4px;
    width: 22px; height: 22px; border-radius: 50%; background: var(--danger);
    color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

.cart-float-panel {
    position: absolute; bottom: 68px; right: 0; width: 340px;
    background: var(--bg-card); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); overflow: hidden;
    animation: cartSlideUp 0.25s ease-out;
}
@keyframes cartSlideUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}
.cart-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.cart-panel-header h3 { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.cart-panel-close { color: var(--text-muted); transition: color var(--transition); }
.cart-panel-close:hover { color: var(--text); }
.cart-panel-body { padding: 12px 16px; max-height: 260px; overflow-y: auto; }
.cart-empty { text-align: center; color: var(--text-muted); font-size: 14px; padding: 20px 0; }
.cart-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; font-weight: 600; }
.cart-item-qty { font-size: 12px; color: var(--text-muted); }
.cart-item-price { font-size: 13px; font-weight: 700; color: var(--accent-dark); }
.cart-item-remove {
    color: var(--text-muted); font-size: 12px; padding: 4px; transition: color var(--transition);
}
.cart-item-remove:hover { color: var(--danger); }
.cart-panel-footer {
    padding: 14px 16px; border-top: 1px solid var(--border); background: var(--bg);
}
.cart-total { font-size: 14px; margin-bottom: 10px; }
.cart-total span { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--accent-dark); }

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
    padding: 24px; animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
.modal-box {
    background: var(--bg-card); border-radius: var(--radius); width: 100%; max-width: 500px;
    max-height: 90vh; overflow-y: auto; animation: modalSlideIn 0.25s ease-out;
}
@keyframes modalSlideIn { 0% { transform: translateY(20px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: var(--font-display); font-weight: 700; }
.modal-close { color: var(--text-muted); font-size: 18px; transition: color var(--transition); }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; }
.command-items-list { display: flex; flex-direction: column; gap: 6px; }
.command-item-line {
    display: flex; justify-content: space-between; font-size: 13px; padding: 6px 10px;
    background: var(--bg); border-radius: 6px;
}

/* ================================================================
   FORMULAIRE CONTACT PUBLIC
   ================================================================ */
.contact-section { max-width: 900px; margin: 0 auto; padding: 40px 24px; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-info-list { display: flex; flex-direction: column; gap: 16px; }
.contact-info-item {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 16px; background: var(--bg-card); border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.contact-info-icon {
    width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(10,110,92,0.08); color: var(--primary); font-size: 16px; flex-shrink: 0;
}
.contact-info-label { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.contact-info-value { font-weight: 600; font-size: 14px; }
.contact-form-card {
    background: var(--bg-card); padding: 28px; border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ================================================================
   COMMENTAIRES
   ================================================================ */
.comments-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.comment-form { margin-bottom: 24px; }
.comment-item {
    display: flex; gap: 12px; padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.comment-avatar {
    width: 40px; height: 40px; border-radius: 50%; background: var(--primary);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.comment-content { flex: 1; }
.comment-author { font-weight: 700; font-size: 14px; }
.comment-date { font-size: 12px; color: var(--text-muted); margin-left: 8px; }
.comment-text { font-size: 14px; color: var(--text); margin-top: 6px; line-height: 1.6; }

/* ================================================================
   MATCH NETBALL
   ================================================================ */
.match-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 20px;
    border: 1px solid var(--border); transition: all var(--transition);
}
.match-card:hover { box-shadow: var(--shadow); }
.match-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.match-body { display: flex; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.match-team { flex: 1; }
.match-team-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.match-team-score { font-family: var(--font-display); font-weight: 900; font-size: 32px; color: var(--primary); margin-top: 4px; }
.match-vs {
    width: 44px; height: 44px; border-radius: 50%; background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 12px; color: var(--text-muted);
}
.match-footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.match-comment { font-size: 13px; color: var(--text-muted); margin-top: 8px; font-style: italic; line-height: 1.5; }

/* ================================================================
   FILTRES
   ================================================================ */
.filter-bar {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.filter-btn {
    padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
    border: 1.5px solid var(--border); color: var(--text-muted); background: var(--bg-card);
    transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ================================================================
   TABLEAUX ADMIN
   ================================================================ */
.admin-content { padding: 24px; max-width: 1400px; margin: 0 auto; }
.admin-card {
    background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border);
    overflow: hidden;
}
.admin-card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.admin-card-header h2 { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.admin-card-body { padding: 0; }
.admin-card-body.padded { padding: 20px; }

/* Stats grid */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 20px;
    border: 1px solid var(--border); display: flex; align-items: center; gap: 16px;
    transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-icon {
    width: 48px; height: 48px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.stat-icon.green { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-icon.blue { background: rgba(59,130,246,0.1); color: var(--info); }
.stat-icon.orange { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-icon.red { background: rgba(220,53,69,0.1); color: var(--danger); }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.stat-label { font-size: 13px; color: var(--text-muted); }

/* Table */
.table-wrap { overflow-x: auto; }
.table-wrap table {
    width: 100%; border-collapse: collapse; font-size: 14px;
}
.table-wrap th, .table-wrap td {
    padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table-wrap th {
    font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); background: var(--bg);
}
.table-wrap tr:hover td { background: rgba(10,110,92,0.02); }
.table-wrap .actions-cell { display: flex; gap: 6px; }

/* ================================================================
   PAGE CONNEXION ADMIN
   ================================================================ */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
}
.login-box {
    background: var(--bg-card); border-radius: var(--radius); padding: 40px;
    width: 100%; max-width: 420px; box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo i { font-size: 48px; color: var(--primary); }
.login-logo h2 { font-family: var(--font-display); font-weight: 800; margin-top: 8px; font-size: 22px; }
.login-box .form-group { margin-bottom: 18px; }
.login-error {
    background: var(--danger-light); color: var(--danger); padding: 10px 14px;
    border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px;
    display: none;
}

/* ================================================================
   NOTIFICATION TOAST
   ================================================================ */
.toast-container {
    position: fixed; top: 70px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    padding: 14px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-lg); min-width: 280px; max-width: 400px;
    animation: toastIn 0.3s ease-out; display: flex; align-items: center; gap: 10px;
}
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.info { background: var(--info); color: #fff; }
@keyframes toastIn { 0% { transform: translateX(100%); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }

/* ================================================================
   BREADCRUMB
   ================================================================ */
.breadcrumb {
    display: flex; align-items: center; gap: 8px; padding: 16px 24px;
    font-size: 13px; color: var(--text-muted); flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state {
    text-align: center; padding: 60px 24px; color: var(--text-muted);
}
.empty-state i { font-size: 48px; opacity: 0.3; margin-bottom: 16px; }
.empty-state p { font-size: 15px; }

/* ================================================================
   BOUTON DE TÉLÉCHARGEMENT DE REÇU (après soumission)
   ================================================================ */
.receipt-box {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, var(--success-light), #f0fdf4);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius);
    text-align: center;
    animation: receiptAppear 0.4s ease-out;
}
@keyframes receiptAppear {
    0% { opacity: 0; transform: translateY(10px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.receipt-box .receipt-icon {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--success); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; margin: 0 auto 12px;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}
.receipt-box .receipt-title {
    font-family: var(--font-display); font-weight: 700;
    font-size: 16px; color: var(--text); margin-bottom: 4px;
}
.receipt-box .receipt-sub {
    font-size: 13px; color: var(--text-muted); margin-bottom: 16px;
}
.receipt-box .receipt-download-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 28px; border-radius: var(--radius-sm);
    background: var(--success); color: #fff;
    font-weight: 600; font-size: 14px;
    transition: all var(--transition); text-decoration: none;
    box-shadow: 0 2px 8px rgba(16,185,129,0.25);
}
.receipt-box .receipt-download-btn:hover {
    background: #059669; color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 767px) {
    .hamburger { display: flex; }
    .topbar-nav { display: none; }
    .hero { padding: 60px 20px; min-height: 340px; }
    .hero h1 { font-size: 24px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .portal-grid { padding: 0 16px 40px; }
    .portal-card { padding: 28px 20px; }
    .section { padding: 28px 16px; }
    .section-title { font-size: 22px; }
    .card-grid { grid-template-columns: 1fr; }
    .cart-float-panel { width: calc(100vw - 48px); right: -12px; }
    .contact-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .match-body { flex-direction: column; gap: 8px; }
    .match-vs { width: 32px; height: 32px; font-size: 10px; }
    .admin-content { padding: 16px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .topbar-title { font-size: 15px; }
}

/* ================================================================
   ANIMATIONS D'ENTRÉE
   ================================================================ */
.fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: translateY(0); } }
.fade-in-delay-1 { animation-delay: 0.1s; animation-fill-mode: both; }
.fade-in-delay-2 { animation-delay: 0.2s; animation-fill-mode: both; }
.fade-in-delay-3 { animation-delay: 0.3s; animation-fill-mode: both; }
.fade-in-delay-4 { animation-delay: 0.4s; animation-fill-mode: both; }




/* Préférence mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Révélation progressive des éléments au scroll */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-up.visible {
    opacity: 1;
    transform: translateY(0);
}