/* ═══════════════════════════════════════════════════
   codes-promo.eu — Styles partagés
   ═══════════════════════════════════════════════════ */

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

:root {
    --pink:   #FF2D78;
    --orange: #FF6B2B;
    --yellow: #FFD600;
    --green:  #00C853;
    --cyan:   #00BCD4;
    --blue:   #2979FF;
    --purple: #AA00FF;
    --coral:  #FF5252;

    --bg:        #FAFAFA;
    --card-bg:   #FFFFFF;
    --text:      #1A1A2E;
    --muted:     #6B7280;
    --border:    #F0F0F5;
    --radius:    16px;
    --radius-sm: 10px;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ── HEADER ─────────────────────────────────────── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250,250,250,0.92);
    backdrop-filter: blur(12px);
    padding: 0 2rem;
}
header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pink), var(--orange), var(--yellow), var(--green), var(--cyan), var(--blue), var(--purple));
}
.header-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    font-size: 1.4rem;
    font-weight: 900;
    text-decoration: none;
    background: linear-gradient(135deg, var(--pink), var(--orange), var(--yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
nav { display: flex; gap: 2rem; align-items: center; }
nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}
nav a:hover { color: var(--pink); }

/* ── Skip link accessibilité ─────────────────────────── */
.skip-link {
    position: absolute;
    top: -999px;
    left: 0;
    background: var(--pink);
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 9999;
    border-radius: 0 0 8px 0;
    text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── Switcher de langue ───────────────────────────────── */
.lang-switcher {
    margin-left: 0.5rem;
}
.lang-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    font-weight: 800;
    font-size: 0.75rem;
    color: var(--muted);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.lang-switcher a:hover { border-color: var(--pink); color: var(--pink); }

/* ── Autocomplétion recherche ─────────────────────────── */
.hero-search-wrap { position: relative; max-width: 560px; margin: 0 auto; }
#autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0.4rem 0;
    z-index: 200;
    overflow: hidden;
}
#autocomplete-list[hidden] { display: none; }
#autocomplete-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}
#autocomplete-list li:hover,
#autocomplete-list li[aria-selected="true"] { background: var(--bg); }
.ac-brand { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.ac-cat   { font-size: 0.75rem; color: var(--muted); }

/* ── Focus visible (accessibilité) ──────────────────── */
:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Classe utilitaire lecteurs d'écran ──────────── */
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── BRAND LOGOS (shared) ────────────────────────── */
.brand-logo {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 0.85rem;
    color: white; flex-shrink: 0;
    letter-spacing: -0.5px;
}
.brand-pink   { background: linear-gradient(135deg, var(--pink),   var(--orange)); }
.brand-blue   { background: linear-gradient(135deg, var(--blue),   var(--cyan)); }
.brand-green  { background: linear-gradient(135deg, var(--green),  #00BCD4); }
.brand-purple { background: linear-gradient(135deg, var(--purple), var(--pink)); }
.brand-orange { background: linear-gradient(135deg, var(--orange), var(--yellow)); }
.brand-coral  { background: linear-gradient(135deg, var(--coral),  var(--orange)); }
.brand-cyan   { background: linear-gradient(135deg, var(--cyan),   var(--blue)); }

/* ── TOAST ───────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 2rem; left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--text);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 9999;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── FOOTER ──────────────────────────────────────── */
footer {
    background: white;
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    font-size: 0.85rem;
    color: var(--muted);
}
footer strong {
    background: linear-gradient(135deg, var(--pink), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 600px) {
    nav { display: none; }
}
