/* ============================================
   FollowBrew — Thème « Tag » (refonte validée le 29/11/2026)
   Inspiré des étiquettes : fond noir, lettres condensées en majuscules, coins droits,
   orange des étiquettes pour les actions, logo et cœur du logo en signature.
   Chargé APRÈS style.css : pour revenir à l'ancien style, il suffit d'enlever la ligne
   <link … theme-tag.css> dans includes/header.php.
   Thème sombre par défaut ; le bouton 🌙 / ☀️ bascule en clair (fond crème).
   ============================================ */

/* ── Couleurs et polices : thème clair (crème) ── */
:root {
    --tag-orange: #f5a03a;
    --tag-orange-hover: #ffb862;

    --color-primary: #f5a03a;          /* fond des boutons principaux (texte noir dessus) */
    --color-primary-dark: #a85a12;     /* liens et textes d'accent sur fond clair */
    --color-primary-light: #ffc27a;
    --color-dark: #000000;             /* barre du haut, en-têtes de tableau, pied de page */
    --color-dark-alt: #1c1c1c;
    --color-text: #111111;
    --color-text-light: #55585c;
    --color-bg: #f4f2ec;
    --color-white: #ffffff;
    --color-surface: #ffffff;
    --color-border: #d9d6cc;
    --color-success: #1e7a34;
    --color-warning: #a8590f;
    --color-danger: #b02a37;
    --color-info: #22528f;

    --font-main: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-heading: 'Barlow Condensed', 'Arial Narrow', sans-serif;

    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;

    --shadow-sm: none;
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.18);

    --tag-card-head: #f8f6f1;
    --tag-hover-row: rgba(245, 160, 58, 0.08);
}

/* ── Thème sombre (défaut) : noir des étiquettes ── */
[data-theme="dark"] {
    --color-primary: #f5a03a;
    --color-primary-dark: #f5a03a;
    --color-primary-light: #ffc27a;
    --color-dark: #000000;
    --color-dark-alt: #1c1c1c;
    --color-text: #f2f2f2;
    --color-text-light: #b8b8b8;
    --color-bg: #0b0b0b;
    --color-white: #ffffff;
    --color-surface: #151515;
    --color-border: #2c2c2c;
    --color-success: #5fd17d;
    --color-warning: #ffd27a;
    --color-danger: #ff7b86;
    --color-info: #8db8ef;

    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.6);

    --tag-card-head: #1c1c1c;
    --tag-hover-row: rgba(245, 160, 58, 0.10);
}

body { font-family: var(--font-main); font-size: 1rem; }

/* ── Titres : lettres condensées en majuscules, comme les noms sur les étiquettes ── */
h1, h2, h3, h4, h5, h6, .page-title {
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1.02;
    color: var(--color-text);
}
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6,
[data-theme="dark"] .page-title { color: var(--color-text); }
h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
.page-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 0.95;
    border-bottom: 0;
    padding-bottom: 0;
}
.subtitle { font-family: var(--font-main); text-transform: none; }

a { color: var(--color-primary-dark); }
a:hover { color: var(--color-text); }
[data-theme="dark"] a { color: var(--tag-orange); }
[data-theme="dark"] a:hover { color: var(--color-primary-light); }

/* ── Barre du haut : noire dans les deux thèmes, logo blanc ── */
.navbar {
    background: #000000;
    border-bottom: 1px solid #262626;
    box-shadow: none;
}
.navbar-inner { height: 64px; }
.navbar-brand { gap: 10px; color: #ffffff !important; font-family: var(--font-heading); font-weight: 800; text-transform: uppercase; }
.navbar-brand:hover { color: #ffffff !important; opacity: 0.85; }
.navbar-logo { display: block; width: 64px; height: auto; }
.navbar-nav a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #e6e6e6;
    border-radius: 0;
}
.navbar-nav a:hover,
.navbar-nav a.active {
    background: transparent;
    color: #ffffff;
    box-shadow: inset 0 -3px 0 var(--tag-orange);
}
.nav-dropdown-menu { background: #000000; border: 1px solid #262626; border-top: 0; border-radius: 0; }
.nav-dropdown-menu a { font-size: 0.95rem !important; }
.nav-dropdown-menu a:hover { background: #151515; box-shadow: inset 3px 0 0 var(--tag-orange); }
.navbar-user { color: #b8b8b8; }
.navbar-user .btn-outline { color: #ffffff; border-color: #ffffff; }
.navbar-user .btn-outline:hover { background: #ffffff; color: #000000; }

/* ── Boutons : majuscules condensées, coins droits ── */
.btn {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 0;
    min-height: 40px;
}
.btn-sm { font-size: 0.9rem; min-height: 34px; }
.btn-lg { font-size: 1.15rem; min-height: 52px; }
.btn-primary,
[data-theme="dark"] .btn-primary { background: var(--tag-orange); color: #000000; }
.btn-primary:hover,
[data-theme="dark"] .btn-primary:hover { background: var(--tag-orange-hover); color: #000000; }
.btn-outline,
[data-theme="dark"] .btn-outline { background: transparent; border: 2px solid var(--color-text); color: var(--color-text); }
.btn-outline:hover,
[data-theme="dark"] .btn-outline:hover { background: var(--color-text); color: var(--color-bg); }
.btn-secondary { background: var(--color-text); color: var(--color-bg); }
.btn-secondary:hover { background: var(--color-text-light); color: var(--color-bg); }
.btn-success { background: var(--color-success); color: #ffffff; }
.btn-danger { background: var(--color-danger); color: #ffffff; }
[data-theme="dark"] .btn-success, [data-theme="dark"] .btn-danger { color: #000000; }
.btn-success:hover { background: var(--color-success); filter: brightness(1.12); }
.btn-danger:hover { background: var(--color-danger); filter: brightness(1.12); }

/* ── Cartes : bord fin, pas d'ombre, pas de saut au survol ── */
.card {
    border: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: none;
}
.card:hover { box-shadow: none; transform: none; }
.card-header,
[data-theme="dark"] .card-header {
    background: var(--tag-card-head);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
[data-theme="dark"] .card-footer { background: var(--tag-card-head); }

/* ── Chiffres clés ── */
.stat-value,
[data-theme="dark"] .stat-value {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-text);
}
.stat-label { font-family: var(--font-heading); font-weight: 700; font-size: 1rem; letter-spacing: 0.04em; }

/* ── Formulaires ── */
.form-control { border-radius: 0; }
.form-control:focus,
[data-theme="dark"] .form-control:focus {
    border-color: var(--tag-orange);
    box-shadow: 0 0 0 3px rgba(245, 160, 58, 0.28);
}
[data-theme="dark"] .form-control,
[data-theme="dark"] input.form-control,
[data-theme="dark"] select.form-control,
[data-theme="dark"] textarea.form-control { background: #0b0b0b; border-color: #3a3a3a; }
[data-theme="dark"] .form-control::placeholder { color: #8a8a8a; }
[data-theme="dark"] select.form-control option { background: #151515; }

/* ── Tableaux : en-tête noir en lettres condensées ── */
.table th {
    background: #000000;
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}
.table tbody tr:hover,
[data-theme="dark"] .table tbody tr:hover { background: var(--tag-hover-row); }

/* ── Alertes et badges : à plat, coins droits ── */
.alert { border-radius: 0; border-left-width: 4px; }
[data-theme="dark"] .alert-success { background: #12261a; color: #9fe0a8; }
[data-theme="dark"] .alert-danger { background: #2a1214; color: #ffb3b8; }
[data-theme="dark"] .alert-warning { background: #2a2210; color: #ffd27a; }
[data-theme="dark"] .alert-info { background: #111d2c; color: #a9c9f2; }
.badge { border-radius: 0; font-family: var(--font-heading); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; }
[data-theme="dark"] .badge-primary { background: #2a1e0e; color: var(--tag-orange); }
[data-theme="dark"] .badge-success { background: #12261a; color: #9fe0a8; }
[data-theme="dark"] .badge-warning { background: #2a2210; color: #ffd27a; }
[data-theme="dark"] .badge-danger { background: #2a1214; color: #ffb3b8; }
[data-theme="dark"] .badge-info { background: #111d2c; color: #a9c9f2; }

/* ── Fenêtres ── */
.modal { border-radius: 0; border: 1px solid var(--color-border); }
.modal-header h3 { margin: 0; }
.modal-backdrop { background: rgba(0, 0, 0, 0.7); }

/* ── Onglets ── */
.stock-tab { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.03em; }
.stock-tab.active { color: var(--color-text); border-bottom-color: var(--tag-orange); }
.stock-tab:hover { color: var(--color-text); background: transparent; }

/* ── Pied de page ── */
.footer { background: #000000; border-top: 1px solid #262626; color: #a8a8a8; }
.footer a { color: var(--tag-orange); }
.footer-logo { display: block; width: 56px; height: auto; margin: 0 auto var(--space-sm); opacity: 0.9; }

/* ── Le cœur du logo, en signature (bandeau d'accueil, cartes) : un masque coloré ── */
.tag-heart {
    background: var(--tag-orange);
    -webkit-mask: url('../img/logo-tag-hd.png') no-repeat;
    mask: url('../img/logo-tag-hd.png') no-repeat;
    -webkit-mask-size: 330% auto;
    mask-size: 330% auto;
    -webkit-mask-position: 47% 55%;
    mask-position: 47% 55%;
}

/* ── Page d'accueil (maquette validée : bandeau noir, cœur orange, BREWED WITH FUN) ── */
.tag-hero { position: relative; overflow: hidden; background: #000000; color: #ffffff; border-bottom: 1px solid #262626; }
.tag-hero-heart {
    position: absolute; top: 0; bottom: 0; right: -4%; width: 62%;
    background: var(--tag-orange);
    -webkit-mask: url('../img/logo-tag-hd.png') no-repeat;
    mask: url('../img/logo-tag-hd.png') no-repeat;
    -webkit-mask-size: 230% auto;
    mask-size: 230% auto;
    -webkit-mask-position: 50% 52%;
    mask-position: 50% 52%;
}
.tag-hero-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 110px var(--space-lg) 96px; display: flex; flex-direction: column; gap: 20px; }
.tag-hero-logo { display: block; width: 140px; height: auto; }
.tag-hero h1 { margin: 0; color: #ffffff; font-size: clamp(4rem, 11vw, 8.4rem); line-height: 0.86; text-shadow: 6px 6px 0 #000000; }
.tag-hero-sub { margin: 0; font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.3rem, 2.6vw, 1.9rem); text-transform: uppercase; letter-spacing: 0.03em; text-shadow: 3px 3px 0 #000000; }
.tag-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.tag-hero .btn { min-height: 54px; padding: 0 26px; font-size: 1.3rem; }
.tag-hero .btn-light { background: #ffffff; color: #000000; }
.tag-hero .btn-light:hover { background: #e6e6e6; color: #000000; }
.tag-hero .btn-dark { background: #000000; color: #ffffff; border: 2px solid #ffffff; }
.tag-hero .btn-dark:hover { background: #ffffff; color: #000000; }

.tag-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; border-top: 2px solid var(--color-text); padding-top: 12px; margin-bottom: var(--space-lg); }
.tag-section-head h2 { margin: 0; font-size: clamp(2rem, 4vw, 2.8rem); }
.tag-section-head span { color: var(--color-text-light); }

.tag-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--space-md); }
.tag-tile { background: var(--color-surface); border: 1px solid var(--color-border); border-top: 4px solid var(--tile, var(--tag-orange)); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.tag-tile-label { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; line-height: 1; }
.tag-tile-hint { color: var(--color-text-light); font-size: 0.9rem; }
.tag-tile .btn { align-self: flex-start; }
.tag-tile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.tag-beers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-md); }
.tag-beer { background: #000000; color: #ffffff; border: 1px solid #262626; display: flex; flex-direction: column; text-decoration: none; }
.tag-beer:hover { color: #ffffff; border-color: var(--beer, var(--tag-orange)); }
.tag-beer-visual { height: 150px; position: relative; overflow: hidden; }
.tag-beer-visual .tag-heart { position: absolute; inset: 0; background: var(--beer, var(--tag-orange)); }
.tag-beer-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tag-beer-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; border-top: 3px solid var(--beer, var(--tag-orange)); }
.tag-beer-name { font-family: var(--font-heading); font-weight: 800; font-size: 2rem; line-height: 1; text-transform: uppercase; color: var(--beer, var(--tag-orange)); }
.tag-beer-hops { font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; text-transform: uppercase; }
.tag-beer-state { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; color: #d0d0d0; }
.tag-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.tag-about { display: flex; flex-wrap: wrap; border: 1px solid var(--color-border); background: var(--color-surface); }
.tag-about-photo { flex: 1 1 420px; min-height: 340px; position: relative; overflow: hidden; }
.tag-about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.tag-about-text { flex: 1 1 380px; padding: 40px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.tag-about-text h2 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 0.92; }
.tag-about-text p { margin: 0; color: var(--color-text-light); line-height: 1.6; font-size: 1.05rem; }

.tag-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-md); }
.tag-feature { border: 1px solid var(--color-border); background: var(--color-surface); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.tag-feature h3 { margin: 0; font-size: 1.5rem; }
.tag-feature p { margin: 0; color: var(--color-text-light); }

@media (max-width: 768px) {
    .navbar-logo { width: 52px; }
    .tag-hero-inner { padding: 72px var(--space-md) 60px; }
    .tag-hero-heart { width: 100%; right: -30%; opacity: 0.85; }
    .tag-hero .btn { width: 100%; justify-content: center; }
    .tag-about-text { padding: 24px; }
}
