/* =============================================
   ATOM CRAFT BEER — CSS Principal
   Thème WordPress custom par Arthur Fournaise
   ============================================= */

/* =============================================
   VARIABLES
   ============================================= */
:root {
    /* Couleurs extraites de la maquette Figma */
    --primary:          #e6b900;   /* Jaune doré — CTA, liens actifs */
    --primary-dark:     #c9a200;   /* Jaune doré foncé — hover CTA */
    --black:            #0a0a0a;   /* Noir principal — titres */
    --dark:             #171717;   /* Sombre — footer, blocs dark */
    --gray-dark:        #404040;   /* Gris foncé — liens nav */
    --gray-mid:         #525252;   /* Gris moyen — corps de texte */
    --gray-muted:       #737373;   /* Gris atténué — sous-titres header */
    --gray-light:       #a1a1a1;   /* Gris clair — textes footer */
    --gray-border:      #e5e5e5;   /* Gris bordure */
    --gray-separator:   #f5f5f5;   /* Séparateur header */
    --white:            #fafafa;   /* Blanc — fond cartes */
    --bg:               #faf8f3;   /* Crème chaud — fond de page */

    /* Typographies */
    --font-body:        'Inter', sans-serif;
    --font-heading:     'Inter', sans-serif;

    /* Ombres */
    --shadow-sm:        0px 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md:        0px 2px 4px rgba(0, 0, 0, 0.08), 0px 8px 16px rgba(0, 0, 0, 0.12), 0px 16px 32px rgba(0, 0, 0, 0.06);
    --shadow-lg:        0px 25px 50px rgba(0, 0, 0, 0.15);

    /* Bordures */
    --radius:           8px;
    --radius-btn:       6px;
    --radius-full:      9999px;

    /* Transitions */
    --transition:       all 0.2s ease;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 10px;        /* Base rem : 1rem = 10px */
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

ul, ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

address {
    font-style: normal;
}

/* =============================================
   TYPOGRAPHIE
   ============================================= */
h1 {
    font-family: var(--font-heading);
    font-size: 7.2rem;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.012px;
}

h2 {
    font-family: var(--font-heading);
    font-size: 3.6rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.37px;
}

h3 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 400;
    line-height: 1.25;
}

h4 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.4;
}

h5 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
}

p {
    font-size: 1.6rem;
    line-height: 1.6;
}

/* =============================================
   LAYOUT
   ============================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3.45rem; /* équivalent 34.5px du Figma */
}

/* =============================================
   COMPOSANTS GLOBAUX — BOUTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 2rem;
    letter-spacing: -0.15px;
    border-radius: var(--radius-btn);
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

/* Bouton primaire — jaune doré */
.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    border: none;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background-color: var(--primary-dark);
    color: var(--white);
}

/* Bouton secondaire — sombre */
.btn-secondary {
    background-color: var(--dark);
    color: var(--white);
    border: none;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background-color: #262626;
    color: var(--white);
}

/* Bouton ghost — transparent avec bordure blanche */
.btn-ghost {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid var(--white);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* Bouton outline — bordure primaire */
.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background-color: var(--primary);
    color: var(--white);
}

/* Focus visible accessibilité */
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* =============================================
   HEADER
   ============================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--gray-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Barre de contact supérieure */
.header__topbar {
    border-bottom: 1px solid var(--gray-separator);
    padding: 0.6rem 0;
}

.header__topbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.7rem;
}

.header__topbar-left {
    display: flex;
    align-items: center;
    gap: 2.4rem;
}

.header__topbar-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.4rem;
    color: var(--gray-mid);
    letter-spacing: -0.15px;
}

.header__topbar-icon {
    width: 1.6rem;
    height: 1.6rem;
    flex-shrink: 0;
    stroke: var(--gray-mid);
}

.header__topbar-promo {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--primary);
    letter-spacing: -0.15px;
}

/* Navigation principale */
.header__main {
    padding: 0;
}

.header__main-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 8rem;
    gap: 2rem;
}

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

.header__logo-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.header__logo-img {
    width: 4.8rem;
    height: 4.8rem;
    object-fit: contain;
}

.header__logo-text {
    display: flex;
    flex-direction: column;
}

.header__logo-name {
    font-size: 2.4rem;
    font-weight: 400;
    color: var(--black);
    line-height: 1.2;
    letter-spacing: -0.05px;
}

.header__logo-tagline {
    font-size: 1.2rem;
    color: var(--gray-muted);
    line-height: 1.4;
}

/* Navigation */
.header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header__nav-list li a {
    display: inline-block;
    padding: 0.8rem 1.2rem;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--gray-dark);
    letter-spacing: -0.31px;
    line-height: 2.4rem;
    position: relative;
    transition: color 0.2s ease;
}

.header__nav-list li a:hover,
.header__nav-list li.current-menu-item a,
.header__nav-list li.current_page_item a {
    color: var(--primary);
}

/* Soulignement de l'item actif */
.header__nav-list li.current-menu-item a::after,
.header__nav-list li.current_page_item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary);
}

/* Actions header : panier + burger */
.header__actions {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-shrink: 0;
}

/* Icône panier */
.header__cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: var(--radius-btn);
    color: var(--gray-dark);
    transition: color 0.2s ease;
}

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

.header__cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 1.8rem;
    height: 1.8rem;
    background-color: var(--primary);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Bouton burger (masqué sur desktop) */
.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 3.2rem;
    height: 3.2rem;
    padding: 4px;
    flex-shrink: 0;
}

.header__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--black);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animation burger → croix */
.header__burger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header__burger.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.header__burger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    background-color: var(--dark);
    color: var(--white);
    padding-top: 6.4rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Colonne brand */
.footer__brand-logo {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2.4rem;
}

.footer__brand-logo img {
    width: 4.8rem;
    height: 4.8rem;
    object-fit: contain;
}

.footer__brand-text {
    display: flex;
    flex-direction: column;
}

.footer__brand-name {
    font-size: 2.4rem;
    font-weight: 400;
    color: var(--white);
    line-height: 1.2;
}

.footer__brand-tagline {
    font-size: 1.4rem;
    color: var(--gray-light);
    line-height: 1.4;
}

.footer__brand-desc {
    font-size: 1.4rem;
    color: var(--gray-light);
    line-height: 1.625;
    max-width: 29.2rem;
}

/* Titres des colonnes */
.footer__heading {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 2.4rem;
    letter-spacing: -0.44px;
}

/* Listes de liens */
.footer__list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer__link {
    font-size: 1.4rem;
    color: var(--gray-light);
    letter-spacing: -0.15px;
    transition: color 0.2s ease;
}

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

/* Liste contact */
.footer__list--contact {
    gap: 1.6rem;
}

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    font-size: 1.4rem;
    color: var(--gray-light);
}

.footer__contact-item svg {
    width: 1.8rem;
    height: 1.8rem;
    flex-shrink: 0;
    margin-top: 2px;
    stroke: var(--gray-light);
}

.footer__address {
    font-size: 1.4rem;
    color: var(--gray-light);
    line-height: 1.6;
}

/* Réseaux sociaux */
.footer__social {
    display: flex;
    gap: 1.2rem;
    margin-top: 2rem;
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    color: var(--gray-light);
    transition: all 0.2s ease;
}

.footer__social-link:hover {
    background-color: var(--primary);
    color: var(--white);
}

.footer__social-link svg {
    width: 1.8rem;
    height: 1.8rem;
    stroke: currentColor;
}

/* Bas de footer */
.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2.4rem 0;
    gap: 2rem;
}

.footer__copy {
    font-size: 1.4rem;
    color: var(--gray-light);
}

.footer__legal {
    display: flex;
    gap: 2.4rem;
}

.footer__legal-link {
    font-size: 1.4rem;
    color: var(--gray-light);
    transition: color 0.2s ease;
}

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

/* =============================================
   PAGE 404
   ============================================= */
.error-404 {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-404__container {
    text-align: center;
    padding: 8rem 0;
}

.error-404__code {
    display: block;
    font-size: 12rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1.6rem;
}

.error-404__title {
    font-size: 3.6rem;
    color: var(--black);
    margin-bottom: 1.6rem;
}

.error-404__message {
    font-size: 1.8rem;
    color: var(--gray-mid);
    margin-bottom: 3.2rem;
}

/* =============================================
   WOOCOMMERCE — Surcharges globales
   ============================================= */

/* Boutons WooCommerce */
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background-color: var(--primary);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    padding: 1rem 2rem;
    border: none;
    transition: var(--transition);
    cursor: pointer;
}

.woocommerce .button:hover,
.woocommerce button.button:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

/* Notifications WooCommerce */
.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--primary);
}

/* =============================================
   ACCESSIBILITÉ — Focus visible
   ============================================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Masquer les éléments visuellement mais les garder pour les lecteurs d'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
