/* ========================================
   ENGIM - HEADER & FOOTER
   Composants globaux du site
   À placer dans /components/header-footer.css
   ======================================== */

/* ========================================
   TOP BAR
   ======================================== */
.top-bar {
    background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 100%);
    color: var(--white);
    font-size: 13px;
    padding: 8px 0;
}

.top-bar__container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar__item {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
    transition: opacity var(--transition);
}

.top-bar__item:hover { opacity: 1; }

.top-bar__separator { opacity: 0.3; }

.top-bar__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar__social {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    transition: all var(--transition);
}

.top-bar__social:hover {
    background: var(--gold-500);
    color: var(--blue-900);
}

.top-bar__cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--green-600);
    border-radius: 6px;
    font-weight: 500;
    transition: all var(--transition);
}

.top-bar__cta:hover {
    background: var(--green-500);
    transform: translateY(-1px);
}

/* ========================================
   HEADER
   ======================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow);
    height: var(--header-height);
}

.header__container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* Logo */
.header__logo-img {
    height: 60px;
    width: auto;
}

/* Navigation */
.header__nav { flex: 1; }

.header__nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.header__nav-item { position: relative; }

.header__nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    border-radius: 8px;
    transition: all var(--transition);
}

.header__nav-link:hover {
    color: var(--blue-600);
    background: var(--blue-light);
}

.header__nav-link--active {
    color: var(--blue-600);
}

.header__nav-icon {
    transition: transform var(--transition);
}

.header__nav-item--dropdown:hover .header__nav-icon {
    transform: rotate(180deg);
}

/* Dropdown */
.header__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
}

.header__nav-item--dropdown:hover .header__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__dropdown li a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 8px;
    transition: all var(--transition);
}

.header__dropdown li a:hover,
.header__dropdown li a.active {
    background: var(--blue-light);
    color: var(--blue-600);
}

/* Actions header */
.header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header__favorites {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--gray-600);
    transition: all var(--transition);
}

.header__favorites:hover {
    background: var(--gray-100);
    color: var(--blue-600);
}

.header__favorites-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-500);
    color: var(--blue-900);
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
}

/* Tooltip favoris */
.header__favorites-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 16px;
    background: #0f2744;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header__favorites-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: #0f2744;
}

.header__favorites:hover .header__favorites-tooltip {
    opacity: 1;
    visibility: visible;
}

/* CTA Button */
.header__cta-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-400) 100%);
    color: var(--blue-900);
    font-weight: 600;
    border-radius: 10px;
    transition: all var(--transition);
    box-shadow: 0 4px 14px rgba(245, 184, 0, 0.4);
}

.header__cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 184, 0, 0.5);
}

/* Burger */
.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    padding: 4px 0;
    background: none;
    border: none;
    cursor: pointer;
}

.header__burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #0f2744;
    border-radius: 2px;
    transition: all var(--transition);
}

/* Burger visible sur fond sombre (header transparent) */
.header--transparent .header__burger span {
    background: #ffffff;
}

/* Header du menu mobile (logo + croix) - masqué par défaut */
.header__nav-header {
    display: none;
}

/* Footer du menu mobile (boutons contact) - masqué par défaut */
.header__nav-footer {
    display: none;
}

/* ========================================
   FOOTER
   ======================================== */
.footer__main {
    background: var(--blue-900);
    color: var(--white);
    padding: 60px 0 40px;
}

.footer__container {
    max-width: none;
    margin: 0;
    padding: 0 80px;
}

/* Grille 5 colonnes */
.footer__grid-5cols {
    display: grid;
    grid-template-columns: 300px 1fr 1fr 1fr 1fr;
    gap: 24px;
}

/* Colonne brand */
.footer__col--brand {
    padding-right: 48px;
    margin-right: 32px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.footer__col:not(.footer__col--brand) {
    padding-left: 16px;
}

.footer__col-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gold-400);
    margin: 0 0 20px 0;
}

.footer__col-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__col-links li {
    margin-bottom: 12px;
}

.footer__col-links a {
    font-size: 14px;
    color: var(--white);
    opacity: 0.75;
    text-decoration: none;
    transition: opacity var(--transition);
    line-height: 1.5;
}

.footer__col-links a:hover {
    opacity: 1;
}

/* Logo footer */
.footer__col--brand .footer__logo-link {
    display: inline-block;
    margin-bottom: 16px;
}

.footer__col--brand .footer__logo {
    height: 52px;
    width: auto;
}

.footer__col--brand .footer__tagline {
    margin: 0 0 20px 0;
}

.footer__col--brand .footer__tagline a {
    font-size: 14px;
    color: var(--white);
    opacity: 0.7;
    line-height: 1.7;
    text-decoration: none;
    transition: opacity var(--transition);
}

.footer__col--brand .footer__tagline a:hover {
    opacity: 1;
}

/* Social */
.footer__social {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.footer__social a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--white);
    transition: all var(--transition);
}

.footer__social a:hover {
    background: var(--gold-500);
    color: var(--blue-900);
}

/* Footer bottom */
.footer__bottom {
    background: var(--blue-900);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    color: var(--white);
}

.footer__bottom .footer__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__legal {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer__legal a {
    font-size: 13px;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.footer__legal a:hover {
    opacity: 1;
}

.footer__copyright {
    font-size: 13px;
    opacity: 0.6;
}

.footer__copyright a {
    margin-left: 16px;
    opacity: 1;
}

/* ========================================
   SEO FOOTER
   ======================================== */
.seo-footer {
    background: #f8fafc;
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.seo-footer__container {
    max-width: 900px;
    margin: 0 auto;
}

.seo-footer__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.seo-footer__text {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.seo-footer__text strong {
    color: #475569;
}

.seo-footer__links {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.seo-footer__links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.seo-footer__links a:hover {
    color: #d4a84b;
}

.seo-footer__cta {
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

.seo-footer__cta a {
    color: #d4a84b;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.seo-footer__cta a:hover {
    color: #b8942f;
}

/* ========================================
   RESPONSIVE - 1165px (Petit Desktop / Grande Tablette)
   ======================================== */
@media (max-width: 1165px) {
    
    /* Réduire les gaps et paddings du header */
    .header__container {
        gap: 20px;
        padding: 0 16px;
    }
    
    /* Logo un peu plus petit */
    .header__logo-img {
        height: 50px;
    }
    
    /* Réduire l'espacement des liens de navigation */
    .header__nav-link {
        padding: 10px 10px;
        font-size: 13px;
    }
    
    /* Réduire le bouton CTA */
    .header__cta-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Réduire le bouton favoris */
    .header__favorites {
        width: 40px;
        height: 40px;
    }
    
    .header__actions {
        gap: 10px;
    }
}

/* ========================================
   RESPONSIVE - 950px (Tablette paysage)
   ======================================== */
@media (max-width: 950px) {
    
    /* Masquer le texte du CTA, garder juste l'essentiel */
    .header__cta-btn {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    /* Navigation encore plus compacte */
    .header__nav-link {
        padding: 8px 8px;
        font-size: 12px;
    }
    
    .header__logo-img {
        height: 45px;
    }
}

/* ========================================
   RESPONSIVE - 770px (Tablette)
   ======================================== */
@media (max-width: 770px) {
    
    /* Top bar masquée */
    .top-bar { display: none; }
    
    /* Header mobile */
    .header__nav { display: none; }
    .header__burger { display: flex; }
    
    /* CTA adapté pour mobile - visible mais compact */
    .header__cta-btn {
        padding: 8px 12px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    /* Menu fullscreen quand ouvert */
    .header__nav.is-open {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        z-index: 9998;
        flex-direction: column;
        padding: 0;
        overflow-y: auto;
    }
    
    /* Header du menu mobile */
    .header__nav.is-open .header__nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid var(--gray-100);
        flex-shrink: 0;
    }
    
    .header__nav-logo img {
        height: 40px;
        width: auto;
    }
    
    .header__nav-close {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--gray-100);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        color: var(--blue-800);
        transition: all var(--transition);
    }
    
    .header__nav-close:hover {
        background: var(--gray-200);
    }
    
    .header__nav.is-open .header__nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        padding: 8px 20px 20px;
    }
    
    .header__nav.is-open .header__nav-item {
        border-bottom: 1px solid var(--gray-100);
    }
    
    .header__nav.is-open .header__nav-link {
        display: flex;
        padding: 16px 0;
        font-size: 17px;
        font-weight: 500;
        justify-content: space-between;
        border-radius: 0;
        background: transparent;
    }
    
    .header__nav.is-open .header__nav-link:hover {
        background: transparent;
        color: var(--blue-600);
    }
    
    /* Dropdown mobile */
    .header__nav.is-open .header__dropdown {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 0 16px;
        background: var(--gray-50);
        border-radius: 0;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .header__nav.is-open .header__dropdown.is-open {
        display: block;
    }
    
    /* Burger animé quand actif */
    .header__burger.is-active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .header__burger.is-active span:nth-child(2) {
        opacity: 0;
    }
    
    .header__burger.is-active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* Footer 5 colonnes -> 2 colonnes */
    .footer__grid-5cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 20px;
    }
    
    .footer__col--brand {
        grid-column: span 2;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-right: 0;
        margin-right: 0;
        border-right: none;
        padding-bottom: 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .footer__col--brand .footer__tagline {
        text-align: center;
    }
    
    .footer__col--brand .footer__social {
        justify-content: center;
    }
    
    .footer__col--brand .footer__col-links {
        justify-content: center;
    }
    
    .footer__col:not(.footer__col--brand) {
        padding-left: 0;
    }
    
    .footer__bottom .footer__container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .footer__legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    
    /* SEO Footer */
    .seo-footer {
        padding: 2rem 1rem;
    }
    
    .seo-footer__title {
        font-size: 1rem;
    }
    
    .seo-footer__links {
        line-height: 1.8;
    }
}

/* ========================================
   RESPONSIVE - 480px (Smartphone)
   ======================================== */
@media (max-width: 480px) {
    
    /* Header compact */
    .header {
        height: 56px;
    }
    
    .header__container {
        padding: 0 12px;
        gap: 8px;
    }
    
    .header__logo-img {
        height: 44px;
    }
    
    /* Cacher les favoris sur la page d'accueil mobile */
    .header__favorites {
        display: none;
    }
    
    /* CTA encore plus compact sur mobile */
    .header__cta-btn {
        padding: 7px 10px;
        font-size: 10px;
    }
    
    .header__burger {
        width: 44px;
        height: 44px;
        padding: 10px;
        border-radius: 8px;
    }
    
    .header__burger:active {
        background: var(--gray-100);
    }
    
    .header__favorites-tooltip {
        display: none;
    }
    
    /* Menu mobile ajusté */
    .header__nav.is-open .header__nav-header {
        padding: 12px 16px;
    }
    
    .header__nav-logo img {
        height: 36px;
    }
    
    .header__nav-close {
        width: 40px;
        height: 40px;
    }
    
    .header__nav.is-open .header__nav-list {
        padding: 16px;
    }
    
    .header__nav.is-open .header__nav-link {
        font-size: 16px;
        padding: 14px 0;
    }
    
    /* Burger animé */
    .header__burger.is-active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .header__burger.is-active span:nth-child(2) {
        opacity: 0;
    }
    
    .header__burger.is-active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Footer 1 colonne */
    .footer__container {
        padding: 0 16px;
    }
    
    .footer__main {
        padding: 40px 0 30px;
    }
    
    .footer__grid-5cols {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .footer__col--brand {
        grid-column: span 1;
    }
    
    .footer__col--brand .footer__logo {
        height: 38px;
    }
    
    .footer__col--brand .footer__tagline,
    .footer__col--brand .footer__tagline a {
        font-size: 13px;
    }
    
    .footer__social a {
        width: 38px;
        height: 38px;
    }
    
    .footer__col {
        text-align: center;
    }
    
    .footer__col-title {
        font-size: 14px;
        margin-bottom: 14px;
        text-align: center;
    }
    
    .footer__col-links a {
        font-size: 13px;
    }
    
    .footer__col-links li {
        margin-bottom: 10px;
        text-align: center;
    }
    
    /* Masquer la 5ème colonne */
    .footer__grid-5cols > .footer__col:nth-child(5) {
        display: none;
    }
    
    .footer__col-title--hidden {
        display: none;
    }
    
    /* Footer bottom */
    .footer__bottom {
        padding: 16px 0;
    }
    
    .footer__legal {
        gap: 10px 16px;
    }
    
    .footer__legal a {
        font-size: 12px;
    }
    
    .footer__copyright {
        font-size: 11px;
    }
}

/* ========================================
   RESPONSIVE - 374px (Petit smartphone)
   ======================================== */
@media (max-width: 374px) {
    
    .header__logo-img {
        height: 40px;
    }
    
    /* CTA très compact sur très petit écran */
    .header__cta-btn {
        padding: 6px 8px;
        font-size: 9px;
    }
    
    .header__burger {
        padding: 8px;
    }
    
    .footer__col--brand .footer__logo {
        height: 34px;
    }
    
    .footer__col-links a {
        font-size: 12px;
    }
    
    .footer__legal a {
        font-size: 11px;
    }
}

/* ========================================
   ACCESSIBILITÉ
   ======================================== */
.header__burger:focus-visible,
.header__favorites:focus-visible,
.footer__social a:focus-visible {
    outline: 3px solid var(--gold-400);
    outline-offset: 2px;
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
