/* =========================================================
   LARSHI — Responsive Stylesheet
   Appliqué à toutes les pages du site
   ========================================================= */

/* --- VARIABLES --- */
:root {
    --primary: #0a0a0a;
    --accent: #9b2c2c;
    --gold: #b89149;
    --bg: #ffffff;
    --paper: #f9f8f4;
}

/* --- RESET DE BASE --- */
* { box-sizing: border-box; }
body { overflow-x: hidden; }

/* =========================================================
   NAVIGATION COMMUNE
   ========================================================= */
.nav-wrapper {
    position: fixed; top: 0; width: 100%; z-index: 2000;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
.nav-container {
    max-width: 1400px; margin: 0 auto; height: 80px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 30px;
}

/* Bouton Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    z-index: 2100;
}
.hamburger span {
    display: block;
    width: 25px; height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Menu mobile overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: white;
    z-index: 1999;
    padding: 100px 30px 40px;
    overflow-y: auto;
    flex-direction: column;
}
.mobile-nav-overlay.open { display: flex; }
.mobile-nav-overlay a, .mobile-nav-overlay span {
    display: block;
    padding: 16px 0;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
    border-bottom: 1px solid #eee;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.mobile-nav-overlay a:hover { color: var(--gold); }
.mobile-nav-divider {
    font-size: 0.65rem !important;
    color: var(--gold) !important;
    letter-spacing: 3px !important;
    padding-top: 24px !important;
    border-bottom: none !important;
    font-weight: 600 !important;
}
.mobile-nav-overlay .mobile-sub a {
    padding: 10px 0 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
    border-bottom: 1px solid #f5f5f5;
    letter-spacing: 0.5px;
}

/* =========================================================
   FOOTER RESPONSIVE
   ========================================================= */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    max-width: 1300px;
    margin: 0 auto;
}

/* =========================================================
   MEDIA QUERIES
   ========================================================= */

/* Tablette */
@media (max-width: 1024px) {
    .nav-container { padding: 0 20px; }
    .teachers-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .detail-layout { grid-template-columns: 1fr !important; }
    .inter-container { grid-template-columns: 1fr !important; }
    .compact-grid { grid-template-columns: 1fr 1fr !important; }
    .journal-grid { grid-template-columns: 1fr !important; }
    .journal-main-card { height: 380px !important; }
    .hero-section { grid-template-columns: 1fr !important; padding: 40px 20px !important; margin: 10px !important; }
    .dual-section { grid-template-columns: 1fr !important; }
    .modal-content { grid-template-columns: 1fr !important; }
    .modal-info { display: none; }
    .books-grid { grid-template-columns: 1fr !important; }
    .journal-section { grid-template-columns: 1fr !important; }
    .axes-grid { grid-template-columns: 1fr 1fr !important; }
}

/* Mobile */
@media (max-width: 768px) {
    /* Navigation */
    .nav-links, .nav-menu { display: none !important; }
    .btn-contact-premium { display: none !important; }
    .hamburger { display: flex !important; }

    /* Header de page */
    .page-header { height: 220px !important; margin-top: 80px !important; }
    .header-text h1 { font-size: 1.8rem !important; }

    /* Sections */
    .section { padding: 30px 15px !important; }

    /* Grilles */
    .teachers-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }
    .footer-grid { grid-template-columns: 1fr !important; gap: 25px !important; }
    .card-container { grid-template-columns: 1fr !important; }
    .axes-grid { grid-template-columns: 1fr !important; }
    .compact-grid { grid-template-columns: 1fr !important; }
    .publi-grid { padding: 20px 0 !important; }
    .inter-container { grid-template-columns: 1fr !important; gap: 30px !important; }

    /* Journal */
    .journal-grid { grid-template-columns: 1fr !important; }
    .journal-main-card { height: 280px !important; }
    .journal-main-content h3 { font-size: 1.3rem !important; }
    .side-post { grid-template-columns: 80px 1fr !important; gap: 12px !important; }
    .side-post img { width: 80px !important; height: 80px !important; }

    /* News slider */
    .news-card { min-width: calc(80% - 10px) !important; }

    /* Accueil hero */
    .hero-section { grid-template-columns: 1fr !important; gap: 25px !important; margin: 5px !important; }

    /* Footer */
    .ultra-footer { padding: 50px 20px 30px !important; }
    .footer-bottom { flex-direction: column !important; gap: 10px !important; text-align: center; }

    /* Modal */
    .modal-content { grid-template-columns: 1fr !important; max-width: 95% !important; }
    .modal-info { display: none !important; }
    .journal-modal-bubble { width: 95% !important; }
    .modal-banner { height: 180px !important; }

    /* Publications */
    .book-card { grid-template-columns: 1fr !important; text-align: center; }
    .publi-nav { flex-wrap: wrap; gap: 10px 20px !important; }

    /* Textes */
    .inter-title { font-size: 1.9rem !important; }
    .section-header h1 { font-size: 2rem !important; }

    /* Detail layout (publications) */
    .detail-layout { grid-template-columns: 1fr !important; }
    .detail-info h1 { font-size: 1.8rem !important; }

    /* Séminaires */
    .split-height { height: auto !important; }

    /* Général */
    body { font-size: 15px; }
    img { max-width: 100%; }
}

/* =========================================================
   PAGE AGENDA — Correctifs spécifiques
   ========================================================= */
@media (max-width: 768px) {
    /* Header agenda */
    header { padding: 0 15px !important; height: 70px !important; }
    header nav { display: none; }
    .hero-banner { height: 200px !important; }
    .hero-banner h1 { font-size: 2rem !important; }
    .events-grid { grid-template-columns: 1fr !important; }
    .container { margin-top: -20px !important; }

    /* Agenda calendrier */
    .agenda-grid, .agenda-layout { grid-template-columns: 1fr !important; }
    .timeline { padding-left: 20px !important; }
}

/* =========================================================
   PAGE SEMINAIRES (Tailwind) — Correctifs spécifiques
   ========================================================= */
@media (max-width: 1024px) {
    .split-height { height: auto !important; }
    .flex.flex-col.lg\\:flex-row { flex-direction: column !important; }
    .w-full.lg\\:w-3\\/5, .w-full.lg\\:w-2\\/5 { width: 100% !important; }
    .aside, #focus-panel { min-height: 300px; }
}

/* =========================================================
   PAGE PUBLICATIONS — Correctifs spécifiques
   ========================================================= */
@media (max-width: 768px) {
    .books-grid { grid-template-columns: 1fr !important; }
    .book-card { grid-template-columns: 1fr !important; }
    .book-cover { width: 100% !important; height: 200px !important; margin: 0 auto !important; }
    .journal-section { grid-template-columns: 1fr !important; }
    .publi-nav { flex-wrap: wrap !important; gap: 8px !important; }
    .publi-nav button { font-size: 0.7rem; }
    .detail-layout { grid-template-columns: 1fr !important; }
    #single-page .detail-layout { gap: 30px !important; }
}

/* =========================================================
   PAGE PARTENAIRES / INTER / AINTER
   ========================================================= */
@media (max-width: 768px) {
    .partner-logos { flex-wrap: wrap !important; justify-content: center !important; gap: 15px !important; }
    .partner-logos img { height: 35px !important; }
    .intl-grid { grid-template-columns: 1fr !important; }
    #mapid { height: 250px !important; }
    .badge-grid { gap: 5px !important; }
    .countries-box { padding: 15px !important; }
}

/* =========================================================
   PAGE COLLOQUE / THESE / DETAIL
   ========================================================= */
@media (max-width: 768px) {
    .colloque-grid { grid-template-columns: 1fr !important; }
    .two-col { grid-template-columns: 1fr !important; }
    table { font-size: 0.8rem; }
    th, td { padding: 8px 5px !important; }
}

/* Très petit mobile */
@media (max-width: 480px) {
    .teachers-grid { grid-template-columns: 1fr !important; }
    .mini-stats { flex-direction: column !important; gap: 15px !important; }
    .page-header { height: 180px !important; }
    .header-text h1 { font-size: 1.4rem !important; }
    .nav-container { height: 70px; }
    .nav-logo-img { height: 45px !important; }
}
