/* ==========================================================================
   assiin Studio v3 - Interface façon éditeur de design (menu latéral, cartes, bandeau)
   ========================================================================== */
:root {
    --p: #7c3aed; --p-dark: #6d28d9; --p-soft: #f1ebfe;
    --teal: #00c4cc; --gold: #fbbf24;
    --ink: #0e1318; --muted: #6b7280; --line: #e8eaf0; --bg: #f6f7fb;
    --side: 88px; --radius: 18px;
    --bs-primary: #7c3aed; --bs-primary-rgb: 124, 58, 237;
    --bs-link-color: #7c3aed; --bs-link-hover-color: #6d28d9;
    --bs-link-color-rgb: 124, 58, 237; --bs-link-hover-color-rgb: 109, 40, 217;
}
* { -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--ink); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; min-height: 100vh; overflow-x: hidden; }
body.app { padding-bottom: 76px; }
h1, h2, h3, h4, h5 { letter-spacing: -.02em; }

/* Boutons : tout le site passe au violet/dégradé */
.btn { border-radius: 12px; }
.btn-primary { --bs-btn-bg: var(--p); --bs-btn-border-color: var(--p); --bs-btn-hover-bg: var(--p-dark); --bs-btn-hover-border-color: var(--p-dark);
    --bs-btn-active-bg: var(--p-dark); --bs-btn-active-border-color: var(--p-dark); --bs-btn-disabled-bg: var(--p); --bs-btn-disabled-border-color: var(--p);
    background-image: linear-gradient(135deg, #8b5cf6, #6d28d9); border: 0; }
.btn-outline-primary { --bs-btn-color: var(--p); --bs-btn-border-color: var(--p); --bs-btn-hover-bg: var(--p); --bs-btn-hover-border-color: var(--p); --bs-btn-active-bg: var(--p); --bs-btn-active-border-color: var(--p); }
.btn-gold { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #422006; border: 0; font-weight: 800; display: inline-flex; align-items: center; }
.btn-gold:hover { filter: brightness(.97); color: #422006; }
.form-control, .form-select { border-radius: 12px; border-color: var(--line); background-color: #fafbfd; }
.form-control:focus, .form-select:focus { border-color: var(--p); box-shadow: 0 0 0 .2rem rgba(124, 58, 237, .15); background: #fff; }
.input-group-text { background: #fafbfd; border-color: var(--line); border-radius: 12px 0 0 12px; }
.bg-primary-light { background: var(--p-soft) !important; } .bg-success-light { background: #dcfce7; }

.logo-text { font-weight: 900; letter-spacing: -1.2px; font-size: 1.45rem; color: var(--ink); }
.logo-text span { background: linear-gradient(90deg, var(--p), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.avatar-circle { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--p), var(--teal)); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* Dégradés réutilisés (pastilles, vignettes, raccourcis) */
.g1 { background: linear-gradient(135deg, #7c3aed, #a78bfa); } .g2 { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.g3 { background: linear-gradient(135deg, #f43f5e, #fb923c); } .g4 { background: linear-gradient(135deg, #10b981, #6ee7b7); }
.g5 { background: linear-gradient(135deg, #f59e0b, #fcd34d); } .g6 { background: linear-gradient(135deg, #6366f1, #a78bfa); }
.g7 { background: linear-gradient(135deg, #ec4899, #f9a8d4); } .g8 { background: linear-gradient(135deg, #14b8a6, #5eead4); }
.g9 { background: linear-gradient(135deg, #0f172a, #475569); } .g10 { background: linear-gradient(135deg, #64748b, #cbd5e1); }

/* ---------- Menu latéral ---------- */
.sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: var(--side); background: #fff; border-right: 1px solid var(--line);
    flex-direction: column; align-items: center; padding: 14px 0; z-index: 1040; }
.side-logo { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--p), var(--teal)); color: #fff; font-size: 1.7rem; font-weight: 900;
    display: grid; place-items: center; text-decoration: none; margin-bottom: 18px; box-shadow: 0 6px 16px rgba(124, 58, 237, .35); }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; width: 100%; padding: 0 8px; }
.side-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 0; background: transparent; color: #4b5563;
    border-radius: 14px; font-size: .68rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: .2s; width: 100%; }
.side-item i { font-size: 1.35rem; }
.side-item:hover { background: #f3f4f8; color: var(--ink); }
.side-item.active { background: var(--p-soft); color: var(--p); }
.side-bottom { width: 100%; padding: 0 8px; }

.app-main { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 992px) { .app-main { margin-left: var(--side); } body.app { padding-bottom: 0; } }

/* ---------- Barre du haut ---------- */
.topbar { position: sticky; top: 0; z-index: 1030; height: 64px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
@media (min-width: 992px) { .topbar { padding: 0 32px; } }
.quota-chip { background: var(--p-soft); color: var(--p); border-radius: 999px; padding: 6px 14px; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.quota-chip.is-premium { background: #fef3c7; color: #92400e; }

/* ---------- Contenu ---------- */
.app-content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 20px 16px 32px; flex: 1; }
@media (min-width: 992px) { .app-content { padding: 28px 32px 40px; } }
.section-title { font-size: 1.35rem; font-weight: 800; }

/* Bandeau d'accueil */
.hero { position: relative; overflow: hidden; border-radius: 28px; color: #fff; padding: 44px 24px;
    background: linear-gradient(115deg, #6d28d9 0%, #4f46e5 45%, #0ea5e9 80%, #00c4cc 100%); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.hero::before { width: 320px; height: 320px; top: -140px; right: -60px; }
.hero::after { width: 200px; height: 200px; bottom: -90px; left: 8%; }
.hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; text-align: center; }
.hero-title { font-weight: 900; font-size: clamp(1.6rem, 4.2vw, 2.6rem); line-height: 1.12; margin-bottom: 10px; }
.hero-sub { opacity: .92; font-size: 1.05rem; margin-bottom: 22px; }
.hero-search { display: flex; align-items: center; background: #fff; border-radius: 16px; padding: 4px 18px; box-shadow: 0 14px 34px rgba(15, 23, 42, .25); }
.hero-search i { color: #9ca3af; font-size: 1.1rem; }
.hero-search input { border: 0; outline: 0; flex: 1; min-width: 0; padding: 14px 12px; font-size: 1.02rem; background: transparent; color: var(--ink); }
.hero-quota { display: inline-block; margin-top: 18px; background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 7px 16px; font-size: .88rem; }

/* Raccourcis ronds */
.shortcuts { display: flex; gap: 14px; overflow-x: auto; padding: 22px 4px 6px; scrollbar-width: none; justify-content: flex-start; }
.shortcuts::-webkit-scrollbar { display: none; }
@media (min-width: 992px) { .shortcuts { justify-content: center; } }
.shortcut { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 78px; cursor: pointer; }
.shortcut .ico { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; box-shadow: 0 8px 18px rgba(15, 23, 42, .15); transition: .25s; }
.shortcut:hover .ico { transform: translateY(-4px) scale(1.06); }
.shortcut .lbl { font-size: .76rem; font-weight: 700; color: #374151; white-space: nowrap; }

/* Filtres */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: #fff; color: #374151; border-radius: 999px; padding: 7px 16px; font-size: .84rem; font-weight: 700; white-space: nowrap; cursor: pointer; transition: .2s; }
.chip:hover { border-color: var(--p); color: var(--p); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Cartes d'outils */
.tool-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; height: 100%; display: flex; flex-direction: column; transition: .28s; outline: none; }
.tool-card:hover, .tool-card:focus-visible { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(15, 23, 42, .12); border-color: #d9d3f5; }
.tool-card:focus-visible { box-shadow: 0 0 0 3px rgba(124, 58, 237, .35); }
.thumb { position: relative; height: 128px; display: grid; place-items: center; overflow: hidden; }
.thumb::before { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .16); top: -50px; right: -40px; }
.paper { position: relative; width: 74px; height: 92px; background: #fff; border-radius: 12px; display: grid; place-items: center; font-size: 2rem; color: #4b5563;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .18); transform: rotate(-5deg); transition: .3s; }
.tool-card:hover .paper { transform: rotate(0) scale(1.08); }
.tag { position: absolute; top: 10px; font-size: .62rem; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; background: #fff; }
.tag-free, .tag-premium, .tag-unlimited { right: 10px; }
.tag-free { color: #166534; } .tag-unlimited { color: #1d4ed8; } .tag-premium { color: #92400e; background: #fef3c7; }
.tag-new { left: 10px; background: #ef4444; color: #fff; }
.tool-body { padding: 14px 16px 16px; }
.tool-body h3 { font-size: .98rem; font-weight: 800; margin: 0 0 4px; }
.tool-body p { font-size: .8rem; color: var(--muted); margin: 0; line-height: 1.4; }
@media (max-width: 575.98px) { .thumb { height: 104px; } .paper { width: 60px; height: 76px; font-size: 1.6rem; } .tool-body { padding: 12px; } .tool-body p { font-size: .74rem; } }

/* Bannière Premium */
.pro-banner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; border-radius: 26px; padding: 30px 28px; color: #fff;
    background: radial-gradient(circle at 90% 10%, rgba(251, 191, 36, .35), transparent 45%), linear-gradient(120deg, #1e1b4b, #4c1d95 60%, #9d174d); }
.pro-banner h2 { font-weight: 900; font-size: 1.6rem; margin: 6px 0; }
.pro-banner p { opacity: .85; margin: 0; max-width: 560px; }
.pro-kicker { background: rgba(251, 191, 36, .2); color: #fde68a; font-size: .75rem; font-weight: 800; border-radius: 999px; padding: 4px 12px; }

/* Tarifs */
.plan-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 28px 22px; display: flex; flex-direction: column; align-items: center; }
.plan-best { border: 2px solid var(--p); box-shadow: 0 18px 40px rgba(124, 58, 237, .15); }
.plan-ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: #fff; font-size: .7rem; font-weight: 800; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.plan-price { font-size: 2.3rem; font-weight: 900; }
.plan-price small { font-size: .9rem; font-weight: 700; color: var(--muted); }
.compare-table { background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.compare-table th, .compare-table td { padding: 13px 16px; border-color: var(--line); }
.compare-table thead th { background: #fafbfd; font-size: .85rem; }

/* ---------- Fenêtres des outils ---------- */
.modal-content { border: 0; border-radius: 26px; box-shadow: 0 30px 80px rgba(15, 23, 42, .25); }
.modal-header, .modal-body { padding-left: 24px; padding-right: 24px; }
.modal-body { padding-bottom: 24px; }
.m-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 1.2rem; flex: none; }
.choice-group { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 14px; cursor: pointer; background: #fff; transition: .2s; }
.choice:has(input:checked) { border-color: var(--p); background: var(--p-soft); }
.choice > span { display: flex; flex-direction: column; align-items: flex-start; font-size: .85rem; line-height: 1.25; min-width: 0; }
.choice .badge-premium { display: inline-block; width: fit-content; margin-right: 4px; }
.choice small { color: var(--muted); }
.badge-premium { background: #fef3c7; color: #92400e; font-size: .65rem; font-weight: 800; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.acc-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 6px; }
.nav-pills .nav-link { color: #4b5563; border-radius: 999px; font-weight: 700; }
.nav-pills .nav-link.active { background: var(--p); color: #fff; }

/* ---------- Connexion ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) { .auth-wrap { grid-template-columns: 1.05fr 1fr; } }
.auth-side { flex-direction: column; justify-content: space-between; gap: 32px; padding: 44px; color: #fff;
    background: linear-gradient(145deg, #6d28d9 0%, #4f46e5 50%, #0ea5e9 100%); position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255, 255, 255, .1); bottom: -140px; right: -100px; }
.auth-side .logo-text span { -webkit-text-fill-color: #a5f3fc; }
.auth-points li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 1.02rem; }
.auth-points i { color: #a5f3fc; margin-top: 4px; }
.auth-form { display: grid; place-items: center; padding: 28px 18px; background: #fff; }
.auth-card { width: 100%; max-width: 420px; }

/* ---------- Pied de page & navigation mobile ---------- */
.app-footer { justify-content: space-between; padding: 18px 32px; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); background: #fff; }
.mobile-nav { display: flex; justify-content: space-around; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 0 8px; z-index: 1030; }
.nav-link-custom { color: #6b7280; text-decoration: none; font-size: .68rem; font-weight: 700; flex: 1; }
.nav-link-custom i { font-size: 1.25rem; }
.nav-link-custom.active { color: var(--p); }

.animate-up { animation: assiinUp .55s ease both; }
@keyframes assiinUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .animate-up, .tool-card, .paper, .shortcut .ico { animation: none; transition: none; } }
@media (max-width: 575.98px) { .hero { padding: 32px 16px; border-radius: 22px; } .pro-banner { padding: 24px 20px; } }

/* ==========================================================================
   Pages dédiées, composants et ANIMATIONS
   ========================================================================== */
a.tool-card, a.shortcut, a.chip, a.side-item { text-decoration: none; color: inherit; }
a.tool-card:hover { color: inherit; }
.page-enter { animation: pageIn .5s ease both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* Apparition au défilement (déclenchée par ui.js) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 55ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* Bandeau d'accueil : formes flottantes */
.hero .blob { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .16); filter: blur(1px); animation: floaty 9s ease-in-out infinite; }
.hero .b1 { width: 120px; height: 120px; left: 6%; top: 18%; }
.hero .b2 { width: 70px; height: 70px; right: 14%; bottom: 14%; animation-delay: -3s; background: rgba(0, 196, 204, .35); }
.hero .b3 { width: 46px; height: 46px; left: 30%; bottom: 10%; animation-delay: -6s; background: rgba(251, 191, 36, .45); }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(8deg); } }
.hero-title { animation: slideUp .8s .1s both; } .hero-sub { animation: slideUp .8s .25s both; } .hero-search { animation: slideUp .8s .4s both; } .hero-quota { animation: slideUp .8s .55s both; }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-search:focus-within { box-shadow: 0 0 0 4px rgba(255, 255, 255, .35), 0 14px 34px rgba(15, 23, 42, .25); }
.hero-search .btn { margin: 4px 0; }

/* Brillance au survol des boutons principaux */
.btn-primary, .btn-gold { position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s, filter .2s; }
.btn-primary:hover, .btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(124, 58, 237, .3); }
.btn-primary::after, .btn-gold::after { content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .4), transparent); transform: skewX(-20deg); }
.btn-primary:hover::after, .btn-gold:hover::after { animation: shine .8s; }
@keyframes shine { to { left: 140%; } }
.btn-gold { animation: pulseGold 2.8s ease-in-out infinite; }
@keyframes pulseGold { 0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, .5); } 50% { box-shadow: 0 0 0 9px rgba(251, 191, 36, 0); } }
.quota-chip { transition: transform .2s; } .quota-chip:hover { transform: scale(1.05); }
.side-item { position: relative; } .side-item i { transition: transform .25s; } .side-item:hover i { transform: translateY(-2px) scale(1.12); }
.side-item.active::before { content: ""; position: absolute; left: -8px; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: var(--p); animation: growIn .35s both; }
@keyframes growIn { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Pages d'outils */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--p); } .crumbs i { font-size: .9rem; opacity: .6; }
.crumbs span { color: var(--ink); font-weight: 700; }
.tool-head { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px 22px; }
.tool-head h1 { font-size: 1.35rem; font-weight: 900; margin: 0; } .tool-head p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.m-ico.lg { width: 58px; height: 58px; border-radius: 18px; font-size: 1.5rem; box-shadow: 0 8px 18px rgba(15, 23, 42, .15); animation: popIn .6s both; }
.m-ico.sm { width: 36px; height: 36px; border-radius: 11px; font-size: 1rem; }
@keyframes popIn { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 70% { transform: scale(1.1) rotate(3deg); } 100% { transform: none; opacity: 1; } }
.avatar-circle.lg { width: 58px; height: 58px; font-size: 1.5rem; }
.tag-inline { border-radius: 999px; font-size: .7rem; font-weight: 800; text-transform: uppercase; padding: 5px 12px; background: #dcfce7; color: #166534; white-space: nowrap; }
.tag-inline.tag-unlimited { background: #dbeafe; color: #1d4ed8; } .tag-inline.tag-premium { background: #fef3c7; color: #92400e; }
.work-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: 0 6px 24px rgba(15, 23, 42, .04); }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; margin-bottom: 16px; }
.side-card h2 { font-size: .98rem; font-weight: 800; margin-bottom: 10px; } .side-card h2 i { margin-right: 6px; color: var(--p); }
.tips { margin: 0; padding-left: 18px; color: #4b5563; font-size: .88rem; } .tips li { margin-bottom: 6px; }
.related-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; text-decoration: none; color: var(--ink); transition: .2s; }
.related-item:hover { background: var(--p-soft); transform: translateX(4px); color: var(--ink); }
.related-item strong { display: block; font-size: .9rem; } .related-item small { color: var(--muted); }

/* Résultat : apparition douce + coche animée */
[id$="-preview-zone"]:not(.d-none) { animation: resultIn .55s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes resultIn { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
[id$="-form-zone"] { animation: pageIn .35s ease both; }

/* Bannières marketing */
.mk-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 18px; padding: 14px 18px; margin-bottom: 16px; color: #fff; transition: opacity .3s, transform .3s; }
.mk-banner.out { opacity: 0; transform: translateY(-8px); }
.mk-info { background: linear-gradient(120deg, #4f46e5, #0ea5e9); } .mk-promo { background: linear-gradient(120deg, #db2777, #f59e0b); } .mk-alerte { background: linear-gradient(120deg, #b91c1c, #f97316); }
.mk-text strong { display: block; } .mk-text span { font-size: .9rem; opacity: .95; }
.mk-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mk-close { background: rgba(255, 255, 255, .2); border: 0; color: #fff; width: 30px; height: 30px; border-radius: 50%; }
@media (max-width: 575.98px) { .mk-banner { flex-direction: column; align-items: flex-start; } }

/* Partage */
.share-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; border-radius: 24px; padding: 26px 28px; color: #fff; background: linear-gradient(120deg, #059669, #10b981 55%, #00c4cc); position: relative; overflow: hidden; }
.share-strip h2 { font-size: 1.35rem; font-weight: 900; margin: 0 0 4px; } .share-strip p { margin: 0; opacity: .92; max-width: 560px; }
.share-strip .btn { color: #047857; }
.page-hero { text-align: center; padding: 34px 18px; border-radius: 28px; color: #fff; background: radial-gradient(circle at 85% 15%, rgba(251, 191, 36, .35), transparent 45%), linear-gradient(120deg, #1e1b4b, #4c1d95 60%, #9d174d); }
.page-hero.share-hero { background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .2), transparent 45%), linear-gradient(120deg, #059669, #0ea5e9); }
.page-hero h1 { font-weight: 900; font-size: clamp(1.5rem, 4vw, 2.3rem); margin: 10px 0; } .page-hero p { max-width: 640px; margin: 0 auto; opacity: .9; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.share-btn { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 13px 10px; background: var(--c); color: #fff !important; font-weight: 700; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.share-btn:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 12px 24px rgba(15, 23, 42, .22); }
.share-btn i { font-size: 1.2rem; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; } .stat-row:last-child { border-bottom: 0; }
.stat-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.stat-card strong { display: block; font-size: 1.5rem; font-weight: 900; line-height: 1.1; } .stat-card small { color: var(--muted); }
.steps { padding-left: 20px; color: #4b5563; font-size: .9rem; } .steps li { margin-bottom: 8px; }

/* Tarifs */
.plan-list { list-style: none; padding: 0; margin: 4px 0 20px; text-align: left; width: 100%; font-size: .92rem; }
.plan-list li { padding: 6px 0; } .plan-list i { color: #10b981; margin-right: 8px; }
.plan-card { transition: transform .3s, box-shadow .3s; } .plan-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(15, 23, 42, .12); }
.plan-best { animation: glowBorder 3s ease-in-out infinite; }
@keyframes glowBorder { 0%, 100% { box-shadow: 0 18px 40px rgba(124, 58, 237, .15); } 50% { box-shadow: 0 18px 54px rgba(124, 58, 237, .32); } }
.faq .accordion-item { border: 1px solid var(--line); border-radius: 14px !important; margin-bottom: 8px; overflow: hidden; }
.faq .accordion-button { font-weight: 700; } .faq .accordion-button:not(.collapsed) { background: var(--p-soft); color: var(--p); box-shadow: none; }
.admin-tabs .nav-link { border-radius: 999px; font-weight: 700; color: #4b5563; } .admin-tabs .nav-link.active { background: var(--p); color: #fff; }

/* Confettis de réussite */
.confetti-box { position: fixed; inset: 0; pointer-events: none; z-index: 3000; overflow: hidden; }
.confetti-box i { position: absolute; top: -14px; width: 9px; height: 15px; border-radius: 2px; animation: confettiFall 2s linear forwards; }
@keyframes confettiFall { to { transform: translateY(105vh) rotate(720deg); opacity: .9; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Composants des outils photo (fonds, moteur de détourage, aperçu)
   ========================================================================== */
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: .7rem; color: var(--muted); }
.swatch > input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.swatch .sw { position: relative; overflow: hidden; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; transition: transform .2s, box-shadow .2s, border-color .2s; color: #9ca3af; }
.swatch:hover .sw { transform: scale(1.08); }
.swatch > input:checked + .sw { border-color: var(--p); box-shadow: 0 0 0 3px rgba(124, 58, 237, .25); transform: scale(1.1); }
.swatch > input:checked ~ small { color: var(--p); font-weight: 800; }
.swatch > input:focus-visible + .sw { outline: 3px solid rgba(124, 58, 237, .5); outline-offset: 2px; }
.sw-checker { background-color: #fff; background-image: conic-gradient(#d1d5db 25%, #fff 0 50%, #d1d5db 0 75%, #fff 0); background-size: 12px 12px; }
.sw-picker { background: conic-gradient(#f43f5e, #f59e0b, #10b981, #0ea5e9, #8b5cf6, #f43f5e); }
.sw-picker input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.engine-note { display: flex; gap: 10px; align-items: flex-start; background: #f1f5f9; border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; font-size: .85rem; margin-bottom: 16px; color: #475569; }
.engine-note i { margin-top: 3px; color: var(--p); }
.engine-note.is-ai { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.engine-note.is-ai i { color: #16a34a; }

/* Aperçu : damier derrière l'image pour visualiser la transparence */
.result-frame { display: inline-block; max-width: 100%; padding: 8px; border-radius: 16px; background-color: #fff;
    background-image: conic-gradient(#e5e7eb 25%, #fff 0 50%, #e5e7eb 0 75%, #fff 0); background-size: 18px 18px; }
.result-frame img { max-height: 300px; display: block; margin: 0 auto; }
.range-value { color: var(--p); font-weight: 800; }
.form-range { accent-color: var(--p); }
.user-filter { max-width: 320px; width: 100%; } .user-filter-sm { max-width: 200px; width: 100%; }
.pay-wrap { max-width: 640px; margin: 0 auto; padding: 32px 16px 48px; }
.tool-head-text { flex: 1 1 200px; min-width: 0; }
.list-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px 22px; }
.list-head h1 { font-size: 1.35rem; font-weight: 900; margin: 0; } .list-head p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.list-search { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; min-width: 260px; }
.list-search i { color: #9ca3af; } .list-search input { border: 0; outline: 0; background: transparent; padding: 11px 0; width: 100%; font-size: .95rem; }
.app-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.app-footer a { color: var(--muted); text-decoration: none; } .app-footer a:hover { color: var(--p); }

/* ==========================================================================
   RESPONSIVE : tablette et mobile
   ========================================================================== */
html, body { max-width: 100%; overflow-x: hidden; }
img, canvas, svg, video { max-width: 100%; }
.app-main, .app-content { min-width: 0; }
.work-card, .side-card, .tool-head, .list-head { min-width: 0; }
.text-break { word-break: break-word; }

@media (max-width: 991.98px) {
    .app-content { padding: 18px 16px 28px; }
    .hero { padding: 36px 20px; }
    .page-hero { padding: 28px 16px; }
    .share-strip, .pro-banner { padding: 22px 20px; }
}

@media (max-width: 575.98px) {
    body { font-size: 15px; }
    .topbar { height: 56px; padding: 0 12px; gap: 8px; }
    .logo-text { font-size: 1.2rem; letter-spacing: -1px; }
    .quota-chip { padding: 5px 10px; font-size: .74rem; }
    .topbar .btn-sm { padding: .35rem .65rem; }
    .app-content { padding: 14px 12px 24px; }

    .hero { padding: 26px 14px; border-radius: 20px; }
    .hero-title { font-size: 1.55rem; }
    .hero-sub { font-size: .95rem; margin-bottom: 16px; }
    .hero-search { padding: 2px 12px; border-radius: 14px; }
    .hero-search input { padding: 12px 8px; }
    .hero-quota { display: block; font-size: .8rem; border-radius: 14px; padding: 8px 12px; }
    .shortcuts { gap: 10px; padding-top: 16px; }
    .shortcut { min-width: 68px; }
    .shortcut .ico { width: 54px; height: 54px; font-size: 1.3rem; border-radius: 17px; }

    .section-title { font-size: 1.15rem; }
    .chips { width: 100%; }
    .tool-head, .list-head { padding: 14px; gap: 12px; border-radius: 18px; }
    .tool-head h1, .list-head h1 { font-size: 1.1rem; }
    .tool-head p, .list-head p { font-size: .85rem; }
    .m-ico.lg { width: 46px; height: 46px; font-size: 1.2rem; border-radius: 14px; }
    .avatar-circle.lg { width: 46px; height: 46px; font-size: 1.2rem; }
    .list-search { min-width: 0; width: 100%; }

    .work-card { padding: 16px; border-radius: 18px; }
    .side-card { padding: 16px; border-radius: 16px; }
    .form-control, .form-select { font-size: 16px; }              /* évite le zoom automatique sur iPhone */
    .swatches { gap: 8px; } .swatch .sw { width: 38px; height: 38px; }
    .result-frame img { max-height: 240px; }
    .stat-card { padding: 12px; gap: 10px; } .stat-card strong { font-size: 1.2rem; }

    .page-hero { padding: 24px 14px; border-radius: 22px; }
    .share-strip, .pro-banner { padding: 20px 16px; border-radius: 20px; }
    .share-strip .btn, .pro-banner .btn { width: 100%; }
    .share-strip h2, .pro-banner h2 { font-size: 1.2rem; }
    .plan-card { padding: 22px 16px; }
    .plan-price { font-size: 2rem; }
    .compare-table th, .compare-table td { padding: 10px 8px; font-size: .82rem; }
    .share-grid { grid-template-columns: repeat(2, 1fr); }
    .share-link .btn { padding-left: 12px; padding-right: 12px; }

    .app-footer { flex-direction: column; gap: 8px; padding: 14px 12px; text-align: center; }
    .auth-form { padding: 20px 14px; }
    .pay-wrap { padding: 20px 12px 40px; }
    .mk-banner { padding: 12px 14px; }
}

/* Très petits écrans (≤ 360 px) */
@media (max-width: 380px) {
    .logo-text { font-size: 1.05rem; }
    .quota-chip { font-size: .7rem; padding: 4px 8px; }
    .hero-title { font-size: 1.4rem; }
    .mobile-nav .nav-link-custom { font-size: .62rem; }
}

/* Ajustements issus des tests d'affichage mobile */
.tool-head { flex-wrap: wrap; }
.shortcut .lbl { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575.98px) {
    .tag { font-size: .58rem; padding: 2px 7px; top: 8px; }
    .tag-free, .tag-premium, .tag-unlimited { right: 8px; }
    .tag-new { top: auto; bottom: 8px; left: 8px; }
    .swatches { gap: 6px; } .swatch .sw { width: 34px; height: 34px; } .swatch { font-size: .64rem; }
    .tool-head .tag-inline { margin-left: 58px; }
}

@media (max-width: 575.98px) { .paper { margin-top: 14px; } }
