/* ============================================================
   RECETTES EHTYMAG — components.css
   Styles header · footer · composants globaux
   ============================================================ */

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: var(--color-cacao);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    height: 56px;
    display: flex;
    align-items: center;
    gap: 0;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 32px;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-toque {
    width: 30px;
    height: 30px;
    background: var(--color-saffron);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.site-logo:hover .logo-toque {
    background: var(--color-paprika);
}

.logo-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-cream);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.site-logo:hover .logo-name {
    color: var(--color-cream);
    opacity: 0.9;
}

/* Nav desktop */
.primary-nav {
    flex: 1;
}

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

.nav-menu li a {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 13px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a,
.nav-menu li.current-cat a,
.nav-menu li.current-page-ancestor a {
    color: var(--color-turmeric);
    border-bottom-color: var(--color-saffron);
}

/* Bouton boutique header */
.header-shop-btn {
    margin-left: 16px;
    flex-shrink: 0;
    font-size: 11px;
    padding: 7px 16px;
}

/* Burger mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: 12px;
    flex-shrink: 0;
}

.burger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-cream);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-toggle[aria-expanded="true"] .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menu mobile */
.mobile-nav {
    display: none;
    background: var(--color-cacao);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px var(--container-pad) 20px;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu li a {
    display: block;
    padding: 12px 0;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-menu li a:hover,
.mobile-menu li.current-menu-item a {
    color: var(--color-turmeric);
}

.mobile-shop-btn {
    display: inline-flex;
    margin-top: 16px;
    font-size: 12px;
    padding: 9px 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--color-dark-footer);
    margin-top: 48px;
}

/* Ligne 1 */
.footer-top {
    padding: 44px 0 36px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.footer-top-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
}

.footer-col-title {
    font-family: var(--font-body);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-turmeric);
    font-weight: 500;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

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

.footer-links li {
    margin-bottom: 8px;
}

.footer-links li a {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
    transition: color 0.2s;
}

.footer-links li a:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* Ligne 2 : Partenaire */
.footer-partner {
    padding: 28px 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.footer-partner-label {
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-turmeric);
    font-weight: 500;
    margin-bottom: 12px;
}

.footer-partner-inner {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.footer-partner-brand {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 100px;
}

.footer-partner-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--color-cream);
    display: block;
}

.footer-partner-badge {
    display: inline-block;
    font-size: 9px;
    background: var(--color-saffron);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    letter-spacing: 0.06em;
}

.footer-partner-divider {
    width: 0.5px;
    background: rgba(255, 255, 255, 0.1);
    align-self: stretch;
    flex-shrink: 0;
    margin: 0 4px;
}

.footer-partner-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.75;
    font-weight: 300;
    margin: 0;
}

.footer-partner-text a {
    color: var(--color-turmeric);
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-partner-text a:hover {
    opacity: 0.75;
    color: var(--color-turmeric);
}

/* Bas de footer */
.footer-bottom {
    padding: 16px 0;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.04em;
}

.footer-legal-nav {
    display: flex;
    gap: 20px;
}

.footer-legal-nav a {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.footer-legal-nav a:hover {
    color: rgba(255, 255, 255, 0.6);
}

.footer-copy {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================================
   TOP STORIES SIDEBAR — styles globaux (homepage + single)
   ============================================================ */
.top-stories-sidebar {
    position: sticky;
    top: 72px;
}

.ts-block {
    background: #fff;
    border: 0.5px solid rgba(0, 0, 0, 0.09);
    border-radius: 14px;
    overflow: hidden;
}

.ts-header {
    background: var(--color-cacao);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-header-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-saffron);
    flex-shrink: 0;
}

.ts-header-title {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-cream);
    font-weight: 500;
}

.ts-header-sub {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: auto;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

.ts-item {
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}

.ts-item:last-child {
    border-bottom: none;
}

.ts-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    transition: background 0.15s;
}

.ts-link:hover {
    background: #fafaf8;
    color: inherit;
}

.ts-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-saffron);
    flex-shrink: 0;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

.ts-content {
    flex: 1;
    min-width: 0;
}

.ts-title {
    display: block;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-cacao);
    line-height: 1.35;
    margin-bottom: 4px;
}

.ts-link:hover .ts-title {
    color: var(--color-saffron);
}

.ts-meta {
    display: block;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Footer sidebar catégorie */
.ts-footer {
    padding: 12px 16px;
    border-top: 0.5px solid rgba(0, 0, 0, 0.06);
    background: #fafaf8;
}

.ts-footer-link {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ts-footer-link:hover { opacity: 0.7; }

/* Responsive sidebar globale */
@media (max-width: 1024px) {
    .top-stories-sidebar {
        position: static;
    }

    .ts-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .ts-item:nth-child(odd) {
        border-right: 0.5px solid rgba(0, 0, 0, 0.06);
    }
}

@media (max-width: 480px) {
    .ts-list {
        grid-template-columns: 1fr;
    }

    .ts-item:nth-child(odd) {
        border-right: none;
    }
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--color-turmeric);
}

.breadcrumb-sep {
    color: rgba(255, 255, 255, 0.3);
}

/* Breadcrumb sur fond clair (pages statiques) */
.breadcrumb--light {
    color: rgba(59, 32, 16, 0.5);
}

.breadcrumb--light a {
    color: var(--color-terracotta);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 40px 0;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-cacao);
    background: #fff;
    border: var(--border-light);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.pagination .page-numbers:hover {
    background: var(--color-sand);
    color: var(--color-cacao);
}

.pagination .page-numbers.current {
    background: var(--color-saffron);
    color: #fff;
    border-color: var(--color-saffron);
}

.pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
}

/* ============================================================
   RESPONSIVE HEADER
   ============================================================ */
@media (max-width: 1024px) {
    .primary-nav { display: none; }
    .header-shop-btn { display: none; }
    .menu-toggle { display: flex; margin-left: auto; }
    .logo-name { font-size: 12px; }
}

@media (max-width: 480px) {
    .header-inner { height: 50px; }
    .logo-name { font-size: 11px; }
    .logo-toque { width: 26px; height: 26px; }
}

/* ============================================================
   RESPONSIVE FOOTER
   ============================================================ */
@media (max-width: 768px) {
    .footer-top-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .footer-partner-inner {
        flex-direction: column;
        gap: 14px;
    }

    .footer-partner-divider { display: none; }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .footer-top {
        padding: 32px 0 24px;
    }

    .footer-top-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-legal-nav {
        flex-wrap: wrap;
        gap: 12px;
    }
}
