/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== VARIABLES ===== */
:root {
    --brun:        #120800;
    --brun-clair:  #5a3010;
    --or:          #b8892a;
    --or-clair:    #e8b84b;
    --or-gradient: linear-gradient(135deg, #b8892a 0%, #daa63a 100%);
    --fond:        #f5f0ea;
    --fond-carte:  #ffffff;
    --fond-subtle: #faf7f4;
    --texte:       #1a0e04;
    --texte-doux:  #6b5a4e;
    --gris:        #9e8e84;
    --gris-clair:  #d4c8be;
    --bordure:     #ece5dc;
    --vert:        #2a6b3a;
    --rouge:       #8b1a1a;
    --radius:      10px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --ombre:       0 1px 4px rgba(26,10,0,.06), 0 4px 16px rgba(26,10,0,.07);
    --ombre-hover: 0 4px 12px rgba(26,10,0,.1), 0 12px 32px rgba(26,10,0,.12);
    --ombre-card:  0 2px 8px rgba(26,10,0,.06);
    --transition:  .2s ease;
    --header-h:    58px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--fond);
    color: var(--texte);
    line-height: 1.6;
    font-size: clamp(14px, 2vw, 15px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brun-clair); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--or); }
img { max-width: 100%; border-radius: var(--radius); display: block; }

/* ===== EN-TÊTE ===== */
.entete {
    background: var(--brun);
    height: var(--header-h);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 2px 16px rgba(0,0,0,.3);
}
.entete-interieur {
    max-width: 1200px;
    margin: auto;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: clamp(.9rem, 2.8vw, 1.05rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -.01em;
    white-space: nowrap;
}
.logo svg { opacity: .9; flex-shrink: 0; }
.logo:hover { color: var(--or-clair); }
.logo-dot {
    width: 6px;
    height: 6px;
    background: var(--or);
    border-radius: 50%;
    display: inline-block;
    margin-left: .1rem;
    vertical-align: middle;
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 9px;
    cursor: pointer;
    padding: 9px 8px;
    transition: background var(--transition), border-color var(--transition);
    flex-shrink: 0;
}
.hamburger:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); }
.hamburger span {
    display: block;
    height: 1.5px;
    background: rgba(255,255,255,.8);
    border-radius: 2px;
    transition: transform .28s ease, opacity .28s ease;
    transform-origin: center;
}
.hamburger span:last-child { width: 70%; }
.hamburger.actif span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hamburger.actif span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.actif span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); width: 100%; }

/* ===== OVERLAY ===== */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 300;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.nav-overlay.actif { display: block; }

/* ===== DRAWER ===== */
.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(280px, 85vw);
    background: #0e0500;
    z-index: 400;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 1rem);
}
.nav-drawer.ouvert { transform: translateX(0); }

.nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
    min-height: var(--header-h);
}
.nav-drawer-user {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: rgba(255,255,255,.5);
    font-size: .8rem;
    font-weight: 500;
}
.nav-drawer-user svg { opacity: .5; }
.nav-close {
    background: transparent;
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.4);
    width: 30px;
    height: 30px;
    border-radius: 7px;
    cursor: pointer;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    line-height: 1;
}
.nav-close:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }

.nav-section {
    padding: .6rem 0;
}
.nav-section-label {
    padding: .5rem 1rem .25rem;
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.2);
}
.nav-lien {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem 1rem;
    color: rgba(255,255,255,.55);
    font-size: .85rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    position: relative;
}
.nav-lien::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 2px;
    background: var(--or);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity var(--transition);
}
.nav-lien:hover {
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.9);
}
.nav-lien:hover::before { opacity: 1; }
.nav-icone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(255,255,255,.06);
    flex-shrink: 0;
    transition: background var(--transition);
}
.nav-icone svg { opacity: .7; }
.nav-lien:hover .nav-icone { background: rgba(255,255,255,.1); }
.nav-lien:hover .nav-icone svg { opacity: 1; }

.nav-lien-accent {
    color: var(--or-clair);
}
.nav-lien-accent .nav-icone {
    background: rgba(184,137,42,.2);
}
.nav-lien-accent .nav-icone svg { opacity: 1; }
.nav-lien-accent:hover { color: #fff; background: rgba(184,137,42,.12); }
.nav-lien-accent:hover .nav-icone { background: rgba(184,137,42,.3); }

.nav-separateur {
    height: 1px;
    background: rgba(255,255,255,.07);
    margin: .25rem 0;
}
.nav-lien-deconnexion { color: rgba(255,140,140,.5); }
.nav-lien-deconnexion:hover { color: rgba(255,160,160,.9); background: rgba(139,26,26,.2); }

/* ===== CONTENU ===== */
.contenu {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1.2rem, 3vw, 2.5rem) clamp(.75rem, 3vw, 1.5rem);
}

/* ===== PIED ===== */
.pied {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gris);
    font-size: .75rem;
    font-weight: 400;
    border-top: 1px solid var(--bordure);
    margin-top: 3rem;
}

/* ===== ALERTES ===== */
.alerte {
    padding: .8rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.2rem;
    font-size: .85rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    line-height: 1.4;
}
.alerte.succes { background: #f2faf5; color: #1a5c2a; border: 1px solid #c0e8cc; }
.alerte.erreur  { background: #fdf3f3; color: #7a1a1a; border: 1px solid #f0c0c0; }

/* ===== TITRES ===== */
h1 {
    font-size: clamp(1.25rem, 4vw, 1.65rem);
    font-weight: 700;
    color: var(--brun);
    margin-bottom: 1.5rem;
    letter-spacing: -.025em;
    line-height: 1.2;
}
h1::after {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--or);
    border-radius: 2px;
    margin-top: .5rem;
    opacity: .7;
}
h2 {
    font-size: clamp(.95rem, 2.8vw, 1.08rem);
    font-weight: 600;
    color: var(--brun);
    margin-bottom: 1rem;
    letter-spacing: -.015em;
}

/* ===== STATS ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
    gap: clamp(.6rem, 2vw, .9rem);
    margin-bottom: 2rem;
}
.stat-carte {
    background: var(--fond-carte);
    border: 1px solid var(--bordure);
    border-radius: var(--radius-lg);
    padding: clamp(1rem, 3vw, 1.4rem);
    box-shadow: var(--ombre-card);
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-carte::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--or-gradient);
    opacity: .5;
}
.stat-carte:hover { transform: translateY(-2px); box-shadow: var(--ombre-hover); }
.stat-carte .chiffre {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    font-weight: 700;
    color: var(--brun);
    line-height: 1;
    margin-bottom: .25rem;
    letter-spacing: -.03em;
}
.stat-carte .libelle {
    color: var(--gris);
    font-size: .72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.stat-carte .stat-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--fond-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== GRILLE CIGARES ===== */
.grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: clamp(.7rem, 2vw, 1rem);
}
.carte-cigare {
    background: var(--fond-carte);
    border: 1px solid var(--bordure);
    border-radius: var(--radius-lg);
    box-shadow: var(--ombre-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
}
.carte-cigare:hover { transform: translateY(-3px); box-shadow: var(--ombre-hover); }
.carte-cigare img { width: 100%; height: clamp(130px, 18vw, 165px); object-fit: cover; border-radius: 0; }
.carte-cigare .photo-absent {
    height: clamp(130px, 18vw, 165px);
    background: linear-gradient(160deg, #f0e8de 0%, #e5d8cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.carte-cigare .photo-absent svg { opacity: .25; }
.carte-cigare .corps { padding: clamp(.75rem, 2vw, 1rem); flex: 1; }
.carte-cigare .marque {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--or);
    margin-bottom: .2rem;
}
.carte-cigare .nom {
    font-size: .95rem;
    font-weight: 600;
    color: var(--brun);
    margin-bottom: .45rem;
    line-height: 1.3;
}
.carte-cigare .meta {
    font-size: .76rem;
    color: var(--gris);
    margin-bottom: .15rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}
.carte-cigare .meta svg { flex-shrink: 0; opacity: .6; }
.carte-cigare .stock-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: .5rem;
    padding: .2rem .55rem;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.stock-ok   { background: #f0faf4; color: #1a6b3a; }
.stock-bas  { background: #fdf8ed; color: #8a6200; }
.stock-vide { background: #fdf3f3; color: #8b1a1a; }
.carte-cigare .actions {
    display: flex;
    gap: .35rem;
    padding: .6rem .75rem;
    background: var(--fond-subtle);
    border-top: 1px solid var(--bordure);
    flex-wrap: wrap;
}

/* ===== FORMULAIRES ===== */
.formulaire {
    background: var(--fond-carte);
    border: 1px solid var(--bordure);
    border-radius: var(--radius-lg);
    padding: clamp(1.2rem, 4vw, 2rem);
    max-width: 640px;
    box-shadow: var(--ombre-card);
}
.champ { margin-bottom: .9rem; }
.champ label {
    display: block;
    font-weight: 600;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--texte-doux);
    margin-bottom: .3rem;
}
.champ input,
.champ select,
.champ textarea {
    width: 100%;
    padding: .6rem .85rem;
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: 'Inter', sans-serif;
    background: var(--fond-subtle);
    color: var(--texte);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    -webkit-appearance: none;
}
.champ input:focus,
.champ select:focus,
.champ textarea:focus {
    outline: none;
    border-color: var(--or);
    box-shadow: 0 0 0 3px rgba(184,137,42,.1);
    background: #fff;
}
.champ input::placeholder,
.champ textarea::placeholder { color: var(--gris-clair); }
.champ textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.rangee {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .9rem;
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border-radius: var(--radius);
    font-size: .82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: .01em;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-primaire { background: var(--brun); color: #fff; box-shadow: 0 1px 4px rgba(26,10,0,.25); }
.btn-primaire:hover { background: #2a1000; color: #fff; box-shadow: 0 3px 10px rgba(26,10,0,.3); }
.btn-secondaire { background: var(--or); color: #fff; box-shadow: 0 1px 4px rgba(184,137,42,.3); }
.btn-secondaire:hover { background: #a07820; color: #fff; box-shadow: 0 3px 10px rgba(184,137,42,.35); }
.btn-danger { background: transparent; color: var(--rouge); border: 1px solid #e8c0c0; }
.btn-danger:hover { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.btn-outline { background: transparent; color: var(--texte-doux); border: 1px solid var(--bordure); }
.btn-outline:hover { background: var(--fond-subtle); border-color: var(--gris-clair); color: var(--texte); }
.btn-petit { padding: .28rem .6rem; font-size: .74rem; border-radius: 7px; }

/* ===== TABLEAU ===== */
.tableau-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--bordure);
    -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: clamp(.76rem, 2vw, .84rem); background: #fff; min-width: 500px; }
th {
    background: var(--fond-subtle);
    color: var(--texte-doux);
    padding: .65rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
    border-bottom: 1px solid var(--bordure);
}
td { padding: .6rem 1rem; border-bottom: 1px solid var(--bordure); color: var(--texte-doux); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--fond-subtle); }

/* ===== SCORE ===== */
.score {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: .76rem;
    white-space: nowrap;
}
.score-haut  { background: #edfaf3; color: #1a6b3a; }
.score-moyen { background: #fdf8ed; color: #8a6200; }
.score-bas   { background: #fdf3f3; color: #8b1a1a; }

/* ===== ACCORD RECOMMANDÉ ===== */
.accord-card {
    background: linear-gradient(150deg, #3b1e08 0%, #4e2a0e 55%, #3a1a06 100%);
    border: 1px solid rgba(184,137,42,.28);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 12px rgba(26,10,0,.12);
    position: relative;
    overflow: hidden;
}
.accord-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(184,137,42,.55), transparent);
}
.accord-header { margin-bottom: .55rem; }
.accord-titre {
    font-size: .64rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: #e8b84b;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.accord-titre svg { opacity: .85; }
.accord-resume {
    color: rgba(240,220,190,.8);
    font-size: .87rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    font-style: italic;
}
.accord-boissons {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.accord-boisson {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    background: rgba(255,255,255,.07);
    border-radius: 9px;
    padding: .65rem .85rem;
    border: 1px solid rgba(184,137,42,.2);
}
.accord-boisson-icone {
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: .12rem;
}
.accord-boisson-nom {
    font-weight: 700;
    color: #f0d08a;
    font-size: .86rem;
    margin-bottom: .1rem;
    letter-spacing: -.01em;
}
.accord-boisson-note {
    font-size: .76rem;
    color: rgba(220,195,160,.75);
    line-height: 1.45;
}

/* ===== TAGS ===== */
.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: .4rem;
}
.tags-row-sm .tag-pill { font-size: .64rem; padding: .12rem .4rem; }
.tag-pill {
    display: inline-flex;
    align-items: center;
    font-size: .7rem;
    font-weight: 600;
    padding: .18rem .5rem;
    border-radius: 20px;
    background: color-mix(in srgb, var(--tc, #b8892a) 12%, white);
    color: var(--tc, #b8892a);
    border: 1px solid color-mix(in srgb, var(--tc, #b8892a) 30%, white);
    letter-spacing: .02em;
    white-space: nowrap;
}

/* Sélecteur de tags (formulaires) */
.tag-selector {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .5rem;
    background: var(--fond-subtle);
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    min-height: 42px;
    align-items: center;
}
.tag-pill-sel {
    display: inline-flex;
    align-items: center;
    font-size: .74rem;
    font-weight: 500;
    padding: .2rem .6rem;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--tc, #b8892a) 30%, white);
    background: transparent;
    color: var(--texte-doux);
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.tag-pill-sel:hover  { background: color-mix(in srgb, var(--tc, #b8892a) 10%, white); }
.tag-pill-sel.actif  {
    background: color-mix(in srgb, var(--tc, #b8892a) 15%, white);
    color: var(--tc, #b8892a);
    border-color: color-mix(in srgb, var(--tc, #b8892a) 40%, white);
    font-weight: 600;
}
.tag-pill-new {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .72rem;
    font-weight: 500;
    padding: .2rem .55rem;
    border-radius: 20px;
    border: 1px dashed var(--gris-clair);
    background: transparent;
    color: var(--gris);
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.tag-pill-new:hover { border-color: var(--or); color: var(--or); }

/* Filtre tags collection */
.tags-filtre {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}
.tag-filtre-pill {
    display: inline-flex;
    align-items: center;
    font-size: .74rem;
    font-weight: 500;
    padding: .25rem .65rem;
    border-radius: 20px;
    border: 1px solid var(--bordure);
    background: var(--fond-carte);
    color: var(--texte-doux);
    text-decoration: none;
    transition: all .15s;
    white-space: nowrap;
}
.tag-filtre-pill:hover { border-color: var(--or); color: var(--or); }
.tag-filtre-pill.actif {
    background: color-mix(in srgb, var(--tc, var(--or)) 15%, white);
    color: var(--tc, var(--or));
    border-color: color-mix(in srgb, var(--tc, var(--or)) 40%, white);
    font-weight: 600;
}
.tag-filtre-pill:first-child.actif { background: var(--brun); color: #fff; border-color: var(--brun); }

/* ===== STOCK CONTROLS ===== */
.stock-ctrl {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-top: .5rem;
}
.stock-btn {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid var(--bordure);
    background: var(--fond-carte);
    color: var(--texte-doux);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
    font-family: inherit;
    padding: 0;
}
.stock-btn:hover:not(:disabled) { background: var(--or); color: #fff; border-color: var(--or); }
.stock-btn:active { transform: scale(.92); }
.stock-btn:disabled { opacity: .4; cursor: default; }

/* ===== PAGE CONNEXION ===== */
.page-connexion {
    max-width: 400px;
    margin: clamp(2rem, 8vw, 5rem) auto;
    padding: 0 .5rem;
}
.page-connexion h1 { text-align: center; font-size: 1.3rem; }
.page-connexion h1::after { margin: .4rem auto 0; }
.page-connexion .formulaire { max-width: 100%; margin-top: 1.5rem; }

/* ===== LAYOUT TABLEAU DE BORD ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(1rem, 3vw, 2rem);
    align-items: start;
}

/* ===== BADGE TAG ===== */
.tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .18rem .55rem;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 500;
    background: var(--fond-subtle);
    border: 1px solid var(--bordure);
    color: var(--texte-doux);
}
.tag svg { opacity: .6; }

/* ===== SPINNER ===== */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner, .spinner-accord {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(184,137,42,.25);
    border-top-color: var(--or);
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}
.spinner { width: 24px; height: 24px; border-width: 2.5px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .rangee { grid-template-columns: 1fr; gap: .75rem; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
    .stats { grid-template-columns: repeat(2, 1fr); gap: .55rem; }
    .carte-cigare .actions { gap: .3rem; }
    .btn-petit { padding: .25rem .5rem; font-size: .72rem; }
    .formulaire { border-radius: var(--radius); }
    .grille { grid-template-columns: 1fr 1fr; gap: .55rem; }
}

/* ===== RECHERCHE / WISHLIST ===== */
.search-form-card {
    background: var(--fond-carte);
    border: 1px solid var(--bordure);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--ombre-card);
    margin-bottom: 1.5rem;
}
.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(200px,100%), 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}
.search-input {
    width: 100%;
    padding: .55rem .85rem;
    font-size: .88rem;
    font-family: inherit;
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    background: var(--fond-subtle);
    color: var(--texte);
    transition: border-color .18s;
}
.search-input:focus { outline: none; border-color: var(--or); background: #fff; }
.search-input::placeholder { color: var(--gris-clair); }

.suggestions-row {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1.2rem;
}
.suggestion-pill {
    padding: .28rem .75rem;
    font-size: .72rem;
    font-weight: 500;
    border: 1px solid var(--bordure);
    border-radius: 20px;
    background: var(--fond-subtle);
    color: var(--texte-doux);
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.suggestion-pill:hover { border-color: var(--or); color: var(--or); background: #fdf8ef; }

.cigare-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px,100%), 1fr));
    gap: 1rem;
}
.cigare-search-card {
    background: var(--fond-carte);
    border: 1px solid var(--bordure);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--ombre-card);
    display: flex;
    flex-direction: column;
    gap: .45rem;
    transition: box-shadow .18s;
}
.cigare-search-card:hover { box-shadow: var(--ombre-hover); }
.sc-marque {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--or);
}
.sc-nom {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brun);
    line-height: 1.2;
    letter-spacing: -.015em;
}
.sc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    align-items: center;
}
.sc-pill {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .71rem;
    color: var(--texte-doux);
    background: var(--fond-subtle);
    border: 1px solid var(--bordure);
    padding: .12rem .42rem;
    border-radius: 20px;
}
.puissance-badge {
    display: inline-block;
    font-size: .66rem;
    font-weight: 700;
    padding: .18rem .55rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.puissance-badge.douce   { background: #e8f4ec; color: #2a6b3a; }
.puissance-badge.moyenne { background: #fef3e2; color: #a06020; }
.puissance-badge.forte   { background: #fde8e8; color: #8b1a1a; }
.sc-desc {
    font-size: .79rem;
    color: var(--texte-doux);
    line-height: 1.6;
    border-left: 2px solid var(--bordure);
    padding-left: .75rem;
    flex: 1;
}
.sc-prix {
    font-size: .85rem;
    font-weight: 700;
    color: var(--brun);
}
.sc-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    padding-top: .55rem;
    border-top: 1px solid var(--bordure);
}
.btn-wishlist {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .8rem;
    border-radius: var(--radius);
    font-size: .76rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: transparent;
    color: var(--or);
    border: 1px solid var(--or);
    transition: all .18s;
}
.btn-wishlist:hover, .btn-wishlist.en-liste {
    background: var(--or);
    color: #fff;
}
.btn-wishlist.en-liste { cursor: default; }
.btn-cave-add {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .8rem;
    border-radius: var(--radius);
    font-size: .76rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: var(--brun);
    color: #fff;
    border: none;
    text-decoration: none;
    transition: background .18s;
}
.btn-cave-add:hover { background: var(--brun-clair); color: #fff; }

/* Skeleton shimmer */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px,100%), 1fr));
    gap: 1rem;
}
.skeleton-card {
    background: var(--fond-carte);
    border: 1px solid var(--bordure);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.skeleton-line {
    height: .75rem;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--fond-subtle) 25%, #ece8e3 50%, var(--fond-subtle) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}
.skeleton-line.lg  { height: 1rem; width: 60%; }
.skeleton-line.sm  { width: 40%; }
.skeleton-line.xs  { width: 25%; }
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: #1a0e04;
    color: #fff;
    padding: .65rem 1.2rem;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 500;
    font-family: inherit;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s, transform .25s;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ===== SAFE AREA (iPhone notch) ===== */
@supports (padding-top: env(safe-area-inset-top)) {
    .entete {
        padding-top: env(safe-area-inset-top);
        height: calc(var(--header-h) + env(safe-area-inset-top));
    }
    .contenu { padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); }
}
