/* ============================================================
   JHMA THEME — global.css
   Design system complet : header, footer, nav, layout, utilitaires
   ============================================================ */

/* ============================================================
   TOP BAR
   ============================================================ */

.topbar {
    background: var(--neutral);
    color: rgba(255,255,255,0.7);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 38px;
}

.topbar__dot {
    color: var(--primary);
    margin: 0 0.5rem;
}

.topbar__email {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color var(--ease);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.75rem;
}

.topbar__email:hover {
    color: var(--primary);
}

/* ============================================================
   SITE HEADER / NAV STICKY
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--ease);
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border-bottom-color: var(--primary);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

/* Logo */
.header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.header__logo svg,
.header__logo-img {
    /* Desktop >768px : 36px à 900px → 48px à 1200px */
    height: clamp(36px, 4vw, 48px);
    width: auto;
    max-width: clamp(130px, 15vw, 180px);
    object-fit: contain;
    display: block;
}

.header__logo-text {
    font-family: var(--condensed);
    font-weight: 800;
    /* Desktop >768px : 1.4rem à 820px → 1.9rem à 1350px */
    font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    color: var(--neutral);
    letter-spacing: -0.03em;
    line-height: 1;
}

.header__logo-text em {
    color: var(--primary);
    font-style: normal;
}

/* Navigation desktop */
.header__nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0 1rem;
    height: 68px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--neutral);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color var(--ease), border-color var(--ease);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link--active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-link--cta {
    background: var(--neutral);
    color: var(--primary) !important;
    margin-left: 0.75rem;
    padding: 0 1.2rem;
    height: 38px;
    border-bottom: none !important;
    font-size: 0.78rem;
}

.nav-link--cta:hover {
    background: var(--primary);
    color: var(--neutral) !important;
}

.nav-caret {
    transition: transform var(--ease);
}

.nav-item--has-dropdown:hover .nav-caret {
    transform: rotate(180deg);
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    box-shadow: var(--shadow-lg);
    min-width: 210px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity var(--ease), visibility var(--ease), transform var(--ease);
    list-style: none;
    z-index: 100;
}

.nav-item--has-dropdown:hover .nav-dropdown,
.nav-item--has-dropdown:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown__link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: background var(--ease), color var(--ease);
}

.nav-dropdown__link:hover {
    background: var(--off);
    color: var(--primary);
}

.nav-dropdown__icon {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 0;
    transition: border-color var(--ease);
}

.hamburger:hover {
    border-color: var(--primary);
}

.hamburger__line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--neutral);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.is-open .hamburger__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open .hamburger__line:nth-child(2) {
    opacity: 0;
}
.hamburger.is-open .hamburger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   PANNEAU MOBILE
   ============================================================ */

.mobile-panel {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
}

.mobile-panel.is-open {
    pointer-events: all;
}

.mobile-panel__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.mobile-panel.is-open .mobile-panel__overlay {
    opacity: 1;
}

.mobile-panel__nav {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 88vw);
    background: var(--neutral);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-panel.is-open .mobile-panel__nav {
    transform: translateX(0);
}

.mobile-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mobile-panel__logo {
    font-family: var(--condensed);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.mobile-panel__logo span {
    color: var(--primary);
}

.mobile-panel__close {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--ease), color var(--ease);
}

.mobile-panel__close:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-nav {
    padding: 1rem 0;
    flex: 1;
    list-style: none;
}

.mobile-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 0.85rem 1.5rem;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color var(--ease), background var(--ease);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mobile-nav__link:hover {
    color: var(--primary);
    background: rgba(255,255,255,0.04);
}

.mobile-nav__link--cta {
    color: var(--primary);
    margin-top: 0.5rem;
}

.mobile-nav__sub {
    list-style: none;
    background: rgba(0,0,0,0.3);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.mobile-nav__sub.is-open {
    max-height: 200px;
}

.mobile-nav__sublink {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.65rem 2rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color var(--ease);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.mobile-nav__sublink:hover {
    color: var(--primary);
}

.mobile-panel__socials {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.mobile-panel__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: border-color var(--ease), color var(--ease);
}

.mobile-panel__social-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================================
   SKIP LINK
   ============================================================ */

.skip-link:focus {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 9999;
    background: var(--primary);
    color: var(--neutral);
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    width: auto;
    height: auto;
    clip: auto;
    white-space: nowrap;
    overflow: visible;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: var(--neutral);
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
}

.footer__main {
    padding: 4rem 0 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 3rem;
}

/* Col 1 — Brand */
.footer__logo {
    display: inline-block;
    margin-bottom: 1rem;
    text-decoration: none;
}

.footer__logo-text {
    font-family: var(--condensed);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--white);
    letter-spacing: -0.03em;
    line-height: 1;
}

.footer__tagline {
    line-height: 1.6;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    max-width: 260px;
}

.footer__socials {
    display: flex;
    gap: 0.6rem;
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: border-color var(--ease), color var(--ease), background var(--ease);
}

.footer__social-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--cyan-rgb),0.08);
}

/* Col titles */
.footer-col__title {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 1.25rem;
}

/* Links */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
}

.footer-link {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.87rem;
    transition: color var(--ease);
}

.footer-link:hover {
    color: var(--primary);
}

/* Events */
.footer-events {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    list-style: none;
}

.footer-event__link {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-decoration: none;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color var(--ease);
}

.footer-event__link:hover .footer-event__title {
    color: var(--primary);
}

.footer-event__date {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
}

.footer-event__title {
    font-size: 0.87rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    transition: color var(--ease);
}

.footer-event__lieu {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
}

.footer__empty {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.3);
    font-style: italic;
}

/* Contact */
.footer-address {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    line-height: 1.5;
}

.footer-contact-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary);
}

/* Footer bar */
.footer__bar {
    padding: 1.25rem 0;
}

.footer__bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer__copyright {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
}

.footer__credit {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
}

.footer__credit-link {
    color: var(--primary);
    text-decoration: none;
    transition: opacity var(--ease);
}

.footer__credit-link:hover {
    opacity: 0.75;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Tablette large : footer 2 colonnes ---- */
@media (max-width: 1024px) {
    .wrap {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Footer — 3 colonnes → 2 colonnes sur tablette */
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer-col--brand {
        grid-column: 1 / -1;
    }
    .footer__tagline {
        max-width: 100%;
    }

    /* Nav desktop → hamburger dès 1024px */
    .header__nav { display: none; }
    .hamburger   { display: flex; }
}

/* ---- Tablette / Mobile : topbar simplifiée ---- */
@media (max-width: 768px) {
    .topbar__left  { display: none; }   /* Cache "Est. 2017 · Concordia..." */
    .topbar__inner { justify-content: flex-end; }

    /* Header plus compact sur tablette/mobile */
    .header__inner { height: 58px; }
    .nav-link      { height: 58px; }

    /* Logo ≤768px : 30px à 600px → 36px à 768px (graduation) */
    .header__logo svg,
    .header__logo-img {
        height: clamp(30px, 5vw, 36px);
        max-width: clamp(110px, 18vw, 140px);
    }
    .header__logo-text { font-size: clamp(1.25rem, 3.5vw, 1.5rem); }
}

/* ---- Mobile portrait ---- */
@media (max-width: 640px) {
    .wrap {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Footer 1 colonne */
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-col--brand {
        grid-column: auto;
    }
    .footer__bar-inner {
        flex-direction: column;
        text-align: center;
    }

    /* Section labels cachés sur très petit écran */
    .section-label { font-size: 0.78rem; }

    /* Logo ≤640px (iPhone) : le plus petit — 26px à 370px → 30px à 640px */
    .header__logo svg,
    .header__logo-img {
        height: clamp(26px, 7vw, 30px);
        max-width: clamp(95px, 22vw, 115px);
    }
    .header__logo-text { font-size: clamp(1.1rem, 5.5vw, 1.3rem); }
}

