/*
 * Structure commune à tous les thèmes. Aucune couleur ni police en dur :
 * tout passe par les variables définies dans styles/themes/<thème>.css.
 */
:root {
    --bg: #fff; --surface: #fff; --text: #222; --muted: #666;
    --primary: #333; --primary-text: #fff; --accent: #333; --danger: #c62828;
    --border: #ddd; --radius: 10px; --shadow: none;
    --font-body: system-ui, sans-serif; --font-title: system-ui, sans-serif;
    --title-weight: 800; --title-transform: none; --title-spacing: normal;
    --giant-bg: var(--primary); --giant-text: var(--primary-text);
    --giant-shadow: var(--shadow); --giant-radius: var(--radius);
    --card-tilt: 0deg;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: var(--font-body); font-size: 1.05rem; line-height: 1.6;
    min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-block: 2rem 4rem; }
a { color: var(--accent); }
img, iframe { max-width: 100%; }
h1, h2, h3, .logo-text, .btn-giant {
    font-family: var(--font-title); font-weight: var(--title-weight);
    text-transform: var(--title-transform); letter-spacing: var(--title-spacing);
    line-height: 1.15;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .5rem; }
h2 { font-size: 1.6rem; }

.container { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem; z-index: 10; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.signup-hint { margin-top: 1.5rem; padding: .8rem 1rem; border: 2px dashed var(--border); border-radius: var(--radius); }
.signup-hint a { font-weight: 700; }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--muted); }

/* En-tête */
.site-header { background: var(--header-bg, var(--surface)); border-bottom: var(--header-border, 1px solid var(--border)); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--header-text, var(--text)); }
.logo-icon { font-size: 1.8rem; }
.logo-text { font-size: 1.45rem; }
.main-nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.main-nav a:not(.btn) { color: var(--header-text, var(--text)); text-decoration: none; font-weight: 600; }
.main-nav a:not(.btn):hover { color: var(--accent); }

/* Boutons */
.btn {
    display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
    padding: .7rem 1.2rem; border-radius: var(--radius); border: 2px solid transparent;
    font: inherit; font-weight: 700; text-decoration: none; transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-2px); }
.btn-small { padding: .45rem .9rem; font-size: .95rem; }
.btn-primary { background: var(--primary); color: var(--primary-text); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-like { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-like.is-liked { background: var(--accent); color: var(--primary-text); border-color: var(--accent); }

/* LE gros bouton */
.btn-giant {
    display: inline-flex; align-items: center; justify-content: center; gap: .8rem;
    font-size: clamp(1.8rem, 6vw, 3.4rem); padding: 1.6rem 3rem; margin-block: 1.5rem;
    background: var(--giant-bg); color: var(--giant-text); border: var(--giant-border, none);
    border-radius: var(--giant-radius); box-shadow: var(--giant-shadow);
    text-decoration: none; cursor: pointer; transition: transform .15s;
}
.btn-giant:hover { transform: scale(1.04) rotate(-1deg); }
.btn-giant:active { transform: scale(.97); }
.btn-giant-icon { font-size: 1.2em; }
.btn-submit { width: 100%; font-size: 1.6rem; padding: 1.1rem; }

/* Accueil */
.hero { text-align: center; padding-block: 2.5rem 1.5rem; }
.hero-title { font-size: clamp(2.4rem, 7vw, 4.5rem); }
.hero-accent { color: var(--accent); }
.hero-secondary { display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap; }
.counter { color: var(--muted); font-weight: 600; }
.home-section { margin-top: 3rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.pitch { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }

/* Cartes */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.3rem; }
.card {
    background: var(--surface); border: var(--card-border, 1px solid var(--border));
    border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--card-shadow, var(--shadow));
    display: flex; flex-direction: column; gap: .5rem; transition: transform .15s;
}
.card-grid .card:nth-child(odd) { transform: rotate(var(--card-tilt)); }
.card-grid .card:nth-child(even) { transform: rotate(calc(var(--card-tilt) * -1)); }
.card-grid .card:hover { transform: rotate(0) translateY(-4px); }
.card-title { margin: 0; font-size: 1.3rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-excerpt { margin: 0; color: var(--muted); flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; font-size: .88rem; color: var(--muted); }
.likes { color: var(--accent); font-weight: 700; }
.sketch-card { cursor: pointer; }
.sketch-card:hover .card-title a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.card-like { margin: 0; display: inline; }
button.likes { background: none; border: 1px solid transparent; border-radius: 999px; padding: .1rem .45rem; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; transition: transform .1s; }
button.likes:hover { border-color: var(--accent); transform: scale(1.1); }
button.likes.is-liked { background: var(--accent); color: var(--primary-text); }

.tag { display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: var(--tag-bg, var(--bg)); color: var(--tag-text, var(--accent)); text-decoration: none; font-size: .88rem; font-weight: 600; border: 1px solid var(--border); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag small { opacity: .6; }

/* Listes */
.page-head { margin-bottom: 1rem; }
.sort-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.sort-link { padding: .4rem 1rem; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--text); font-weight: 600; }
.sort-link.is-active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 2.4rem; padding: .4rem .7rem; text-align: center; border-radius: var(--radius); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.pagination .current { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.pagination .gap { border: none; }
.empty-state { text-align: center; padding: 3rem 1rem; border: 2px dashed var(--border); border-radius: var(--radius); color: var(--muted); margin-top: 2rem; }

/* Détail */
.sketch-detail { max-width: 760px; margin-inline: auto; }
.sketch-body { font-size: 1.15rem; margin-block: 1.5rem; }
.video { position: relative; aspect-ratio: 16 / 9; margin-block: 1.5rem; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.sketch-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.prose { max-width: 760px; margin-inline: auto; }

/* Mécanismes */
.mechanism-family { margin-top: 2.5rem; }
.mechanism-family h2, .mechanism-ideas h2 { margin-bottom: 1rem; }
.mechanism h2 { margin-top: 2rem; }
.mechanism-status { padding: .7rem 1rem; border: 2px dashed var(--border); border-radius: var(--radius); color: var(--muted); font-size: .95rem; }
.mechanism-ideas { margin-top: 3rem; }
.mechanism-cta { text-align: center; margin-top: 3rem; }

/* Formulaires */
.form-page { max-width: 720px; margin-inline: auto; }
.form-page.narrow { max-width: 480px; }
.sketch-form > div, .form-row { margin-bottom: 1.3rem; }
label { display: block; font-weight: 700; margin-bottom: .35rem; }
input[type=text], input[type=email], input[type=url], textarea, select {
    width: 100%; padding: .8rem 1rem; font: inherit; color: var(--text);
    background: var(--input-bg, var(--surface)); border: 2px solid var(--border); border-radius: var(--radius);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
.help-text, .form-text { font-size: .88rem; color: var(--muted); margin-top: .3rem; }
.sketch-form ul { color: var(--danger); margin: .3rem 0 0; padding-left: 1.2rem; font-weight: 600; }
.email-box { background: var(--tag-bg, var(--bg)); border: 2px dashed var(--accent); border-radius: var(--radius); padding: 1.1rem 1.2rem .4rem; margin-bottom: 1.3rem; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin-bottom: 2rem; }
.inline-form label { margin: 0; }
.inline-form input { width: auto; flex: 1; min-width: 200px; }

/* Messages */
/* Notifications : franches, avec icône et petite entrée animée, pour qu'on ne les rate pas. */
.flash { position: relative; padding: 1rem 1.3rem 1rem 3.6rem; border-radius: var(--radius); margin-bottom: 1.8rem; font-weight: 700; font-size: 1.1rem; line-height: 1.4; color: #2b1d3a; background: #fff0c2; border: var(--card-border, 3px solid #2b1d3a); box-shadow: var(--card-shadow, 0 4px 0 #2b1d3a); animation: flash-pop .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.flash::before { content: "💡"; position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.7rem; line-height: 1; }
.flash-success { background: #3ddc97; }
.flash-success::before { content: "🎉"; }
.flash-error { background: #ffd2cc; }
.flash-error::before { content: "⚠️"; }
.flash-info { background: #e3d6ff; }
.flash-premium { background: #fff0c2; animation: none; }
.flash-premium::before { content: "⭐"; }
@keyframes flash-pop { from { opacity: 0; transform: translateY(-14px) scale(.95); } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

/* Tableaux, modération */
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { text-align: left; padding: .7rem; border-bottom: 1px solid var(--border); }
.status { font-weight: 700; font-size: .88rem; }
.status-ok { color: #2e7d32; } .status-wait { color: #e68a00; } .status-no { color: var(--danger); }
.moderation-card { margin-bottom: 1.5rem; }
.moderation-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.reject-form { display: flex; gap: .5rem; flex: 1; flex-wrap: wrap; }
.reject-form select, .reject-form input { width: auto; flex: 1; min-width: 160px; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--border); background: var(--footer-bg, var(--surface)); color: var(--muted); font-size: .92rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.5rem; }
.footer-inner nav { display: flex; gap: 1rem; }
.footer-inner a { color: var(--muted); }

/* Sélecteur de thème (mode développeur) */
.theme-switcher {
    position: fixed; right: 1rem; bottom: 3.5rem; z-index: 100; display: flex; gap: .3rem; align-items: center; flex-wrap: wrap;
    background: #111; color: #fff; padding: .45rem .6rem; border-radius: 999px; font: 13px/1.2 system-ui, sans-serif;
    box-shadow: 0 6px 20px rgba(0,0,0,.3); opacity: .85;
}
.theme-switcher:hover { opacity: 1; }
.theme-switcher a { color: #fff; text-decoration: none; padding: .25rem .6rem; border-radius: 999px; }
.theme-switcher a.is-active, .theme-switcher a:hover { background: #fff; color: #111; }

@media (max-width: 640px) {
    .main-nav { gap: .8rem; font-size: .95rem; }
    .btn-giant { padding: 1.2rem 1.6rem; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Page d'erreur 404 : l'illustration fait le titre (« 4 », la tête du personnage, « 4 ») */
.error-page { display: grid; place-items: center; text-align: center; padding: 1rem 1rem 3rem; }
.error-content { max-width: 40rem; }
.error-visual { margin: 0; line-height: 0; }
.error-visual img { width: 100%; max-width: 38rem; height: auto; }
.error-title { font-family: var(--font-title); font-size: 1.6rem; font-weight: 700; margin: .5rem 0; }
.error-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.error-actions .btn:not(.btn-primary) { background: var(--surface); border: 3px solid var(--text); }

/* Mode développeur (App\Dev\DevMode) */
.nav-account { display: inline-flex; align-items: center; gap: .45rem; }
.nav-account img { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.dev-badge { position: fixed; left: 1rem; bottom: 1rem; z-index: 1000; padding: .35rem .8rem; border-radius: 999px; background: #2b1d3a; color: #fff; font-size: .8rem; font-weight: 700; text-decoration: none; opacity: .85; }
.dev-badge:hover { opacity: 1; color: #fff; }

/* Marmite magique (mode dev) */
.marmite-layout { display: grid; grid-template-columns: 1fr minmax(280px, 380px); gap: 2rem; align-items: start; margin-top: 1.5rem; }
.pantry h2 { margin-top: 0; }
.pantry-family { font-size: 1rem; margin: 1.2rem 0 .5rem; color: var(--muted); }
.pantry-items { display: flex; flex-wrap: wrap; gap: .5rem; }
.ingredient-chip { position: relative; display: inline-flex; align-items: stretch; border-radius: 999px; border: 2px solid var(--text); background: var(--tag-bg, var(--surface)); transition: transform .15s, opacity .15s; }
.ingredient-chip:hover { transform: translateY(-2px) rotate(-2deg); }
.ingredient-chip.is-in { opacity: .35; }
.ingredient { cursor: grab; font: inherit; font-weight: 700; font-size: .92rem; padding: .4rem .5rem .4rem .85rem; border: 0; background: none; color: var(--tag-text, var(--accent)); border-radius: 999px 0 0 999px; }
.ingredient-info { cursor: help; font: 700 .8rem/1 Georgia, serif; font-style: italic; width: 1.45rem; height: 1.45rem; margin: auto .35rem auto 0; border-radius: 50%; border: 2px solid var(--tag-text, var(--accent)); background: var(--surface); color: var(--tag-text, var(--accent)); padding: 0; }
.ingredient-info:hover, .ingredient-info:focus-visible { background: var(--tag-text, var(--accent)); color: var(--surface); }
/* Ordinateur : le résumé en bulle, tout de suite au survol (pas de survol au doigt : le i suffit). */
@media (hover: hover) {
    .ingredient-chip:hover::after { content: attr(data-summary); position: absolute; left: 0; bottom: calc(100% + .5rem); width: max-content; max-width: 260px; padding: .5rem .7rem; border-radius: 10px; background: var(--text); color: var(--surface); font-size: .85rem; font-weight: 600; line-height: 1.35; z-index: 5; pointer-events: none; }
}
.pantry-items .ingredient-chip:hover { z-index: 5; }
.pot-zone { position: sticky; top: 1rem; text-align: center; }
.pot { position: relative; border-radius: var(--radius); padding: .5rem; border: 3px dashed transparent; transition: border-color .2s; }
.pot.is-over { border-color: var(--accent); }
.pot-content { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; min-height: 3.2rem; align-content: flex-end; }
.pot-empty { margin: 0; align-self: center; }
.pot-item { display: inline-flex; align-items: center; border-radius: 999px; border: 2px solid var(--text); background: var(--surface); animation: pot-float 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.4s); }
.pot-item button { font: inherit; font-weight: 700; border: 0; background: none; color: var(--text); cursor: pointer; }
.pot-item-name { font-size: .85rem; padding: .2rem .2rem .2rem .65rem; }
.pot-item-name:hover { color: var(--accent); }
.pot-item-out { font-size: 1.05rem; line-height: 1; padding: .2rem .55rem .25rem .3rem; color: var(--muted) !important; }
.pot-item-out:hover { color: var(--danger) !important; }
.pot-svg { width: 100%; max-width: 300px; display: block; margin: -.4rem auto 0; overflow: visible; }
.pot-body, .pot-rim, .pot-foot { fill: var(--text); }
.pot-soup { fill: var(--accent); }
.pot-bubbles circle { fill: var(--primary); opacity: .85; transform-box: fill-box; transform-origin: center; animation: pot-bubble 2.2s ease-in-out infinite; }
.pot-bubbles circle:nth-child(2) { animation-delay: -.7s; } .pot-bubbles circle:nth-child(3) { animation-delay: -1.3s; } .pot-bubbles circle:nth-child(4) { animation-delay: -1.8s; }
.pot-spoon { stroke: var(--muted); stroke-width: 9; stroke-linecap: round; transform-box: view-box; transform-origin: 170px 75px; }
.pot-steam path { fill: none; stroke: var(--muted); stroke-width: 5; stroke-linecap: round; opacity: 0; transform: translateY(0); }
.pot.is-splash .pot-svg { animation: pot-splash .45s ease-out; }
.pot-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1rem; }
.pot-status { min-height: 1.6em; font-weight: 700; color: var(--accent); }
.is-cooking .pot-svg { animation: pot-shake .5s ease-in-out infinite; }
.is-cooking .pot-bubbles circle { animation-duration: .7s; }
.is-cooking .pot-spoon { animation: pot-stir 1.2s ease-in-out infinite; }
.is-cooking .pot-steam path { animation: pot-steam 1.8s ease-out infinite; }
.is-cooking .pot-steam path:nth-child(2) { animation-delay: -.6s; } .is-cooking .pot-steam path:nth-child(3) { animation-delay: -1.2s; }
.is-cooking .pot-item { animation: pot-swirl 1s linear infinite; animation-delay: calc(var(--i) * -.15s); }
.dish { margin-top: 2.5rem; padding: 1.5rem; background: var(--surface); border: var(--card-border, 1px solid var(--border)); border-radius: var(--radius); box-shadow: var(--card-shadow, var(--shadow)); animation: pot-serve .5s ease-out; }
.dish-title { margin-top: 0; font-size: 2rem; }
.dish-pitch { font-size: 1.15rem; font-weight: 700; color: var(--accent); }
.dish-ingredients { padding-left: 1.2rem; }
@keyframes pot-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
@keyframes pot-swirl { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(6px, -6px) rotate(8deg); } 50% { transform: translate(0, -10px) rotate(0); } 75% { transform: translate(-6px, -6px) rotate(-8deg); } 100% { transform: translate(0, 0) rotate(0); } }
@keyframes pot-bubble { 0%, 100% { transform: scale(.6); } 50% { transform: scale(1.15) translateY(-4px); } }
@keyframes pot-splash { 0% { transform: scale(1); } 40% { transform: scale(1.06, .94); } 100% { transform: scale(1); } }
@keyframes pot-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.5deg); } 75% { transform: rotate(1.5deg); } }
@keyframes pot-stir { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-35deg); } }
@keyframes pot-steam { 0% { opacity: 0; transform: translateY(10px); } 30% { opacity: .7; } 100% { opacity: 0; transform: translateY(-25px); } }
@keyframes pot-serve { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .marmite-page *, .marmite-page *::before { animation: none !important; } }

/* Fiche d'un ingrédient : panneau à droite (ordinateur), en bas de l'écran (téléphone) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 100; }
.sheet { position: fixed; z-index: 101; top: 0; right: 0; bottom: 0; width: min(440px, 100%); overflow-y: auto; padding: 1.5rem 1.5rem 2rem; background: var(--surface); border-left: var(--card-border, 1px solid var(--border)); box-shadow: -6px 0 0 var(--accent); animation: sheet-in-right .25s ease-out; }
.sheet[hidden], .sheet-backdrop[hidden], .mobile-cook[hidden] { display: none; }
.sheet-close { position: absolute; top: .6rem; right: .8rem; font-size: 1.8rem; line-height: 1; border: 0; background: none; color: var(--muted); cursor: pointer; }
.sheet-title { margin: 0 2rem .3rem 0; }
.sheet-summary { font-weight: 700; color: var(--accent); }
.sheet-body h2 { font-size: 1.15rem; margin: 1.2rem 0 .3rem; }
.sheet-actions { position: sticky; bottom: -2rem; display: flex; flex-wrap: wrap; gap: .6rem; padding: 1rem 0 1rem; background: var(--surface); }
.mobile-cook { display: none; }
.pot-zone { scroll-margin-top: 5rem; }
.mobile-cook:disabled { opacity: .75; cursor: progress; }
@media (max-width: 800px) {
    .sheet { top: auto; left: 0; width: 100%; max-height: 82vh; border-left: 0; border-top: var(--card-border, 1px solid var(--border)); border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -6px 0 var(--accent); animation: sheet-in-up .25s ease-out; }
    .mobile-cook { display: block; position: fixed; z-index: 30; left: 1rem; right: 1rem; bottom: calc(3.6rem + env(safe-area-inset-bottom)); font-size: 1.15rem; padding: .8rem; }
    /* Après les règles ordinateur, sinon la marmite reste collée en haut et cache le garde-manger. */
    .marmite-layout { grid-template-columns: 1fr; gap: 1rem; }
    .pot-zone { order: -1; position: static; }
    .pot-svg { max-width: 190px; }
    .marmite-page { padding-bottom: 6rem; }
}
@keyframes sheet-in-right { from { transform: translateX(100%); } to { transform: none; } }
@keyframes sheet-in-up { from { transform: translateY(100%); } to { transform: none; } }

/* Marmite : les chefs au choix, de chaque côté (clé = modèle du LLM). Le chef non choisi est grisé. */
.pot-stage { display: grid; grid-template-columns: 1fr 2.6fr 1fr; align-items: end; gap: .2rem; }
.chef { display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .3rem .1rem; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; border-radius: var(--radius); transition: filter .25s, opacity .25s, transform .2s; }
.chef > * { transition: filter .25s, opacity .25s; }
.chef:not(.is-chosen) > :not(.chef-traits) { filter: grayscale(1); opacity: .4; }
.chef:not(.is-chosen):hover, .chef:not(.is-chosen):focus-visible { transform: translateY(-3px); }
.chef:not(.is-chosen):hover > :not(.chef-traits) { opacity: .7; }
.chef:disabled { cursor: default; }
.chef-svg { width: 100%; max-width: 88px; overflow: visible; transform-origin: 50% 100%; }
.chef-svg :is(rect, circle, path) { stroke: var(--text); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chef-hat :is(circle, rect) { fill: #fff; }
.chef-skin { fill: #ffd9b3; }
.chef-cheek { fill: #ff4f7b; stroke: none !important; opacity: .45; }
.chef-eye, .chef-mustache, .chef-mouth, .chef-shoe { fill: var(--text); }
.chef-line { fill: none; }
.chef-line.thin, .chef-monocle { stroke-width: 2 !important; }
.chef-monocle { fill: rgba(255, 255, 255, .35); }
.chef-body.sonny { fill: #ff9a3c; }
.chef-body.opus { fill: #7b3fe4; }
.chef-bolt, .chef-star { fill: #ffd23f; }
.chef-tie { fill: #ff4f7b; }
.chef-speed path { fill: none; stroke-width: 3.5 !important; opacity: 0; }
.chef-name { font-weight: 800; font-size: .85rem; line-height: 1.1; }
.chef-model { font-size: .72rem; font-weight: 700; color: var(--muted); }
.chef-time { font-size: .72rem; font-weight: 700; color: var(--accent); min-height: 1em; }
.chef.is-chosen .chef-svg { animation: chef-idle 2.4s ease-in-out infinite; }
.chef-sonnet.is-chosen .chef-speed path { opacity: .6; }
.is-cooking .chef.is-chosen .chef-svg { animation: chef-busy .45s ease-in-out infinite; }
.is-cooking .chef-opus.is-chosen .chef-svg { animation: chef-busy 1.1s ease-in-out infinite; }
.is-cooking .chef-sonnet.is-chosen .chef-speed path { animation: chef-speed .4s linear infinite; }
.pot-chef-hint { margin: .2rem 0 0; }
.dish-chef { margin: -.3rem 0 .8rem; font-weight: 700; color: var(--muted); }
@keyframes chef-idle { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg) translateY(-3px); } }
@keyframes chef-busy { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
@keyframes chef-speed { from { transform: translateX(6px); opacity: .8; } to { transform: translateX(-6px); opacity: 0; } }
@media (max-width: 800px) {
    .chef-svg { max-width: 64px; }
    .chef-name { font-size: .75rem; }
}
/* Caractère de chaque chef : en bulle au survol (ordinateur) ou au focus clavier. */
.chef { position: relative; }
.chef-traits { display: none; position: absolute; bottom: calc(100% - .5rem); left: 50%; transform: translateX(-50%); z-index: 6; width: max-content; max-width: 180px; padding: .5rem .6rem; border-radius: 12px; background: var(--text); color: var(--surface); font-size: .78rem; line-height: 1.3; flex-direction: column; align-items: center; gap: .3rem; pointer-events: none; }
.chef-traits em { font-weight: 600; opacity: .85; }
.chef-badge { padding: .1rem .5rem; border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 800; }
@media (hover: hover) { .chef:hover .chef-traits { display: flex; } }
.chef:focus-visible .chef-traits { display: flex; }

/* Harmonisation (mode dev) : le fil qui serpente, le catalogue, les réglages */
.harmo-thread-zone { margin-top: 1rem; }
.harmo-thread { position: relative; min-height: 7rem; padding: 1.2rem 1rem; border: 3px dashed var(--border); border-radius: var(--radius); background: var(--surface); }
.harmo-snake { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.harmo-snake-body { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14 10; opacity: .85; }
.harmo-snake-head { fill: var(--accent); stroke: var(--text); stroke-width: 3; }
.is-cooking .harmo-snake-body { animation: harmo-crawl .6s linear infinite; }
.harmo-rows { position: relative; display: flex; flex-direction: column; gap: 1.6rem; }
.harmo-row-cards { display: grid; gap: 1.2rem 2.2rem; }
.harmo-card { grid-row: 1; position: relative; display: flex; flex-direction: column; gap: .3rem; padding: .7rem .7rem .5rem 1.1rem; min-height: 5rem; border: 2px solid var(--text); border-radius: 14px; background: var(--tag-bg, var(--surface)); box-shadow: 3px 3px 0 var(--text); cursor: grab; animation: harmo-pop .3s ease-out; transform: rotate(calc((var(--i) - 1) * .7deg)); }
.harmo-card:nth-child(even) { transform: rotate(-1deg); }
.harmo-card.is-free { border-style: dashed; }
.harmo-num { position: absolute; top: -.8rem; left: -.6rem; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--surface); font-weight: 800; font-size: .85rem; border: 2px solid var(--text); }
.harmo-card-title { font-weight: 800; font-size: .92rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.harmo-card-tools { margin-top: auto; display: flex; justify-content: flex-end; gap: .1rem; }
.harmo-card-tools button { font: inherit; font-weight: 800; border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 .35rem; font-size: 1.1rem; line-height: 1; }
.harmo-card-tools button:hover { color: var(--accent); }
.harmo-card-tools .harmo-out:hover { color: var(--danger); }
.harmo-thread-empty { margin: 1.5rem 0; text-align: center; }
.harmo-thread-empty[hidden] { display: none; }
.harmo-free { display: flex; gap: .5rem; margin-top: .7rem; }
.harmo-free input { flex: 1; font: inherit; padding: .45rem .7rem; border: 2px solid var(--border); border-radius: var(--radius); }
.harmo-count { margin: .4rem 0 0; }
.harmo-layout { display: grid; grid-template-columns: 1fr minmax(300px, 400px); gap: 2rem; align-items: start; margin-top: 1.5rem; }
.harmo-catalog h2, .harmo-settings h2 { margin-top: 0; }
.harmo-search { width: 100%; font: inherit; padding: .5rem .8rem; border: 2px solid var(--border); border-radius: var(--radius); }
.harmo-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0; }
.harmo-tag { font: inherit; font-size: .8rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.harmo-tag.is-on { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.harmo-list { list-style: none; padding: 0; margin: 0; max-height: 70vh; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; }
.harmo-item { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .7rem; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: grab; }
.harmo-item.is-on { border-color: var(--accent); opacity: .65; }
.harmo-item p { margin: .2rem 0; line-height: 1.35; }
.harmo-add { flex: none; width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--text); background: var(--accent); color: var(--surface); font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.harmo-item.is-on .harmo-add { background: var(--surface); color: var(--accent); }
.harmo-settings { position: sticky; top: 1rem; padding: 1.2rem; border: var(--card-border, 1px solid var(--border)); border-radius: var(--radius); background: var(--surface); box-shadow: var(--card-shadow, var(--shadow)); }
.harmo-settings fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.harmo-settings legend { font-weight: 800; margin-bottom: .4rem; }
.harmo-choices { display: flex; flex-direction: column; gap: .4rem; }
.harmo-choice { display: flex; gap: .5rem; align-items: flex-start; padding: .45rem .6rem; border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.harmo-choice:has(input:checked) { border-color: var(--accent); }
.harmo-choice span { display: flex; flex-direction: column; line-height: 1.3; }
.harmo-choice small, .harmo-choice em { font-size: .8rem; color: var(--muted); }
.harmo-pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.harmo-pill input, .harmo-choice input[type=radio] { accent-color: var(--accent); }
.harmo-pill input { position: absolute; opacity: 0; pointer-events: none; }
.harmo-pill span { display: inline-block; padding: .25rem .7rem; border-radius: 999px; border: 2px solid var(--border); font-size: .85rem; font-weight: 700; cursor: pointer; }
.harmo-pill input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.harmo-pill input:focus-visible + span { outline: 2px solid var(--text); }
.harmo-row { display: flex; gap: 1rem; margin-bottom: .8rem; }
.harmo-row label, .harmo-field { display: flex; flex-direction: column; gap: .2rem; font-weight: 700; font-size: .9rem; flex: 1; }
.harmo-field { margin: .7rem 0; }
.harmo-row select, .harmo-field input, .harmo-field textarea { font: inherit; font-weight: 400; padding: .4rem .6rem; border: 2px solid var(--border); border-radius: var(--radius); }
.harmo-check { display: block; font-size: .9rem; font-weight: 700; }
.harmo-go { width: 100%; margin-top: .6rem; font-size: 1.15rem; padding: .8rem; }
.harmo-table-wrap { overflow-x: auto; }
.harmo-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.harmo-table th, .harmo-table td { border: 1px solid var(--border); padding: .45rem .55rem; vertical-align: top; text-align: left; }
.harmo-table th { background: var(--bg); }
.harmo-table td:nth-child(-n+3) { white-space: nowrap; }
.harmo-scene { margin: 1.2rem 0; }
.harmo-scene-head { font-weight: 800; text-transform: uppercase; }
.harmo-line { display: flex; flex-direction: column; align-items: center; text-align: center; margin: .6rem auto; max-width: 32rem; }
.harmo-who { font-weight: 800; text-transform: uppercase; }
.harmo-how { font-style: italic; color: var(--muted); font-size: .9rem; }
@keyframes harmo-crawl { to { stroke-dashoffset: -24; } }
@keyframes harmo-pop { from { opacity: 0; transform: scale(.85); } }
@media (max-width: 800px) {
    .harmo-layout { grid-template-columns: 1fr; }
    .harmo-settings { position: static; }
    .harmo-row-cards { gap: 1rem 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { .harmo-page * { animation: none !important; } }

/* ----- La cuisine : jauge, onglets, page, premium ----- */
.jauge { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--text); }
.jauge-barre { position: relative; display: block; overflow: hidden; border: 2px solid var(--text); border-radius: 999px; background: var(--surface); }
.jauge-niveau { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .8s cubic-bezier(.3, 1.4, .5, 1); }
.jauge-mini .jauge-barre { width: 64px; height: 12px; }
.jauge-mini .jauge-texte { font-size: .8rem; font-weight: 700; min-width: 2.6em; }
.jauge-grand { display: grid; grid-template-columns: auto 1fr; gap: .3rem .7rem; width: 100%; }
.jauge-grand .jauge-icone { grid-row: span 3; font-size: 2.6rem; align-self: center; }
.jauge-grand .jauge-label { font-weight: 800; font-size: 1.15rem; }
.jauge-grand .jauge-barre { width: 100%; height: 26px; border-width: 3px; }
.jauge-grand .jauge-texte { color: var(--muted); font-weight: 700; }
.jauge.is-vide .jauge-barre { border-color: var(--danger); }
.jauge.is-vide .jauge-texte { color: var(--danger); }
.jauge.is-admin .jauge-niveau { background: var(--muted); }
.cuisine-onglets { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 1rem 0 1.4rem; }
.cuisine-onglets > a { padding: .35rem .9rem; border-radius: 999px; border: 2px solid var(--text); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; }
.cuisine-onglets > a.is-active { background: var(--text); color: var(--surface); }
.cuisine-onglets-jauge { margin-left: auto; }
.cuisine-hero { text-align: center; margin-bottom: 1.4rem; }
.cuisine-jauge-bloc { padding: 1.2rem 1.4rem; margin-bottom: 1.6rem; }
.cuisine-jauge-bloc p { margin: .8rem 0 0; }
.cuisine-outils { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; margin-bottom: 1.6rem; }
.cuisine-outil { display: block; padding: 1.4rem; text-decoration: none; color: var(--text); transition: transform .2s; }
.cuisine-outil:hover { transform: translateY(-4px) rotate(-.5deg); }
.cuisine-outil-icone { font-size: 3rem; }
.cuisine-regle { padding: 1.2rem 1.4rem; margin-bottom: 1.6rem; }
.premium-offres { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.4rem; margin: 1.4rem 0 1rem; }
.premium-offre { position: relative; padding: 1.4rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.premium-offre.is-vedette { transform: scale(1.04); }
.premium-badge { position: absolute; top: -.9rem; background: var(--primary); color: var(--primary-text); padding: .15rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 800; border: 2px solid var(--text); }
.premium-prix { font-family: var(--font-title); font-size: 2.4rem; font-weight: 800; margin: 0; }
.premium-detail, .premium-moyens { color: var(--muted); }
@media (max-width: 720px) { .main-nav .jauge-mini .jauge-barre { width: 40px; } }

/* ----- Tableau de rentabilité (admin) ----- */
.renta-periode a { margin-right: .6rem; }
.renta-periode a.is-active { font-weight: 800; text-decoration: none; }
.renta-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: 1rem 0 1.4rem; }
.renta-tuile { padding: 1rem; display: flex; flex-direction: column; gap: .2rem; }
.renta-tuile span, .renta-tuile small { color: var(--muted); }
.renta-tuile strong { font-family: var(--font-title); font-size: 1.8rem; }
.renta-tuile.is-perte strong { color: var(--danger); }
.renta-graphe, .renta-table { padding: 1.2rem; margin-bottom: 1.4rem; }
.renta-svg { width: 100%; height: auto; display: block; }
.renta-grille { stroke: var(--border); stroke-width: 1; }
.renta-base { stroke: var(--muted); stroke-width: 1; }
.renta-budget { stroke: var(--text); stroke-width: 2; stroke-dasharray: 6 5; }
.renta-axe { font-size: 11px; fill: var(--muted); }
.renta-hit { fill: transparent; }
.renta-barre-g:hover .renta-hit { fill: rgba(0, 0, 0, .05); }
.renta-barre-commun, .renta-barre-depenses { fill: #7b3fe4; }
.renta-barre-gains { fill: #e8890c; }
.renta-legende { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--muted); }
.renta-puce { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: .6rem; }
.renta-puce-depenses { background: #7b3fe4; }
.renta-puce-gains { background: #e8890c; }
.renta-aide { color: var(--muted); font-size: .9rem; }
.renta-table table { width: 100%; border-collapse: collapse; margin-top: .8rem; font-size: .9rem; }
.renta-table th, .renta-table td { text-align: right; padding: .3rem .5rem; border-bottom: 1px solid var(--border); }
.renta-table th:first-child, .renta-table td:first-child { text-align: left; }

/* Bulle de la jauge */
.jauge { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; text-align: left; }
.jauge-wrap { position: relative; display: inline-block; }
.jauge-wrap-grand { display: block; }
.jauge-bulle { position: absolute; top: calc(100% + .6rem); right: 0; z-index: 50; width: min(330px, 90vw); padding: 1rem 1.1rem; text-align: left; font-weight: 400; color: var(--text); transform: none; }
.jauge-wrap-grand .jauge-bulle { left: 0; right: auto; }
.jauge-bulle[hidden] { display: none; }
.jauge-bulle p { margin: 0 0 .5rem; }
.jauge-bulle-titre { font-weight: 800; font-size: 1.05rem; }
.jauge-bulle-minuit, .jauge-bulle-vie { color: var(--muted); font-size: .92rem; }
.jauge-bulle-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 0 !important; }

/* Premium : date de fin après prolongation, page Mon compte */
.premium-jusqua { font-weight: 700; margin: .2rem 0 .8rem; }
.account-premium h2 { margin-top: 2rem; }
.account-infos { display: grid; gap: 1.2rem; padding: 1.5rem; }
.account-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; }
.account-session { font-size: .9rem; color: var(--muted); margin: 0; }

/* Pages légales */
.legal table { border-collapse: collapse; margin: 1rem 0; }
.legal th, .legal td { border: 2px solid currentColor; padding: .4rem .8rem; text-align: left; }
.legal blockquote { margin: 1rem 0; padding: .5rem 1rem; border-left: 4px solid currentColor; }
.footer-legal { font-size: .85em; opacity: .8; }
.premium-cgv { display: block; font-size: .8em; line-height: 1.3; margin: .6rem 0; text-align: left; }
.premium-cgv input { margin-right: .3rem; }

/* Se connecter avec Google */
.or-sep { text-align: center; margin: 1rem 0 .5rem; }
.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; background: #fff; color: #1f1f1f; }

/* Pages thématiques (référencement, App\Seo\Collections) */
.collection-intro { max-width: 46rem; font-size: 1.1rem; }
.collection-tips { margin-top: 2.5rem; max-width: 46rem; }
.collection-tips ul { padding-left: 1.2rem; }
.collection-links { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.collection-links h2 { width: 100%; font-size: 1.1rem; margin: 0; }

.home-collections { margin-top: 2rem; }
.home-collections h2, .themes-popover h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
.collection-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; }
.collection-tile { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1rem .5rem; border: 2px solid var(--border); border-radius: var(--radius); background: var(--card-bg, var(--bg)); color: var(--text); text-decoration: none; font-weight: 700; text-align: center; transition: transform .15s; }
.collection-tile:hover { transform: translateY(-3px) rotate(-1deg); }
.collection-tile.is-active { border-color: var(--primary); outline: 2px solid var(--primary); }
.collection-tile-emoji { font-size: 2rem; line-height: 1; }
.collection-tile-hidden { font-weight: 400; font-size: .75rem; opacity: .7; }
.sort-themes { cursor: pointer; font: inherit; font-weight: 600; background: transparent; }
.themes-popover { width: min(40rem, 92vw); padding: 1.25rem; border: 3px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.themes-popover::backdrop { background: rgb(0 0 0 / .35); }
.themes-popover-head { display: flex; justify-content: space-between; align-items: center; }
.themes-popover-close { border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; color: inherit; }
.collection-more { margin-top: .75rem; font-weight: 600; }
.dev-note { font-size: .9rem; opacity: .8; }
.footer-collections { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .9rem; }
