:root {
    color-scheme: light;
    font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff8ec;
    color: #11132b;
}

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

body {
    margin: 0;
    background: radial-gradient(circle at 10% 20%, #fff7cc, transparent 55%),
        radial-gradient(circle at 80% 0%, #ffd0b4, transparent 45%),
        radial-gradient(circle at 50% 100%, #d1fadf, transparent 45%),
        #fffdf5;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

input,
select,
textarea,
button {
    font: inherit;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 193, 7, 0.2) 1px, transparent 0);
    background-size: 50px 50px;
    opacity: 0.3;
    pointer-events: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
    background: rgba(255, 253, 245, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(250, 204, 21, 0.3);
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.15);
}

.brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.brand .logo-img {
    width: 85px;
    height: auto;
}

.main-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-weight: 500;
}

.main-nav a {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 216, 128, 0.55);
    color: #6b370d;
}

.user-pill {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.user-pill form button {
    border: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #f0fdf4;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.content {
    padding: 2.5rem clamp(1.5rem, 4vw, 4rem) 3rem;
    position: relative;
    z-index: 1;
}

.page-auth .content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.content--wide {
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    padding: 2.5rem;
    border-radius: 32px;
    background: linear-gradient(120deg, #fff1a8, #ffd19b);
    color: #5f3605;
    margin-bottom: 2rem;
}

.hero.small {
    flex-direction: column;
}

.hero.director {
    background: linear-gradient(135deg, #c8f7d7, #8ef5ff);
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
    border-radius: 24px;
    min-width: 200px;
    text-align: center;
}

.eyebrow {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    opacity: 0.7;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 0.9rem 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn.big {
    width: 100%;
    font-size: 1.1rem;
    padding: 1.2rem 2rem;
}

.btn.primary {
    background: linear-gradient(120deg, #facc15, #fb923c);
    color: #422006;
    box-shadow: 0 20px 40px rgba(251, 146, 60, 0.35);
}

.btn.ghost {
    background: rgba(17, 19, 43, 0.08);
    color: #11132b;
}

.btn.is-loading {
    opacity: 0.6;
}

.cta-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 26px;
    padding: 1.5rem;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
}

.card.panel {
    border: 1px solid rgba(17, 19, 43, 0.05);
}

.card.stat strong {
    font-size: 2.5rem;
}

.card.stat.pending strong {
    color: #d97706;
}

.card.stat.warning strong {
    color: #ff7a18;
}

.card.stat.success strong {
    color: #16a34a;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.column.stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list li {
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(17, 19, 43, 0.05);
}

.list li:last-child {
    border-bottom: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.5rem;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    border-radius: 14px;
    border: 1px solid rgba(17, 19, 43, 0.15);
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.9);
}

.form-grid .full {
    grid-column: 1 / -1;
}

.flow-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    padding: 1.5rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255, 200, 70, 0.3);
}

.form-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #78350f;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.block input,
.block select,
.block textarea {
    border-radius: 16px;
    border: 1px solid rgba(17, 19, 43, 0.15);
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.9);
}

input[type="color"] {
    height: 48px;
    padding: 0;
    border-radius: 12px;
    cursor: pointer;
}

.label {
    font-weight: 600;
    color: #78350f;
}

.form-actions {
    text-align: center;
    margin-top: 1rem;
}

.map-field {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.coords {
    display: flex;
    gap: 0.5rem;
}

.coords label {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    border: 1px dashed rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline li {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(17, 19, 43, 0.05);
}

.timeline__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff758c;
    margin-top: 0.5rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pill.orange {
    background: rgba(255, 122, 24, 0.12);
    color: #b54700;
}

.pill.yellow {
    background: rgba(250, 204, 21, 0.2);
    color: #854d0e;
}

.pill.green {
    background: rgba(34, 197, 94, 0.2);
    color: #166534;
}

.pill.neutral {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.pillset {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stock-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.stock-pill {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    min-width: 180px;
    color: #0f172a;
    position: relative;
}

.stock-pill::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    border: 2px solid var(--accent, #facc15);
    opacity: 0.4;
    pointer-events: none;
}

.stock-pill strong {
    display: block;
    margin-bottom: 0.2rem;
}

.support-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.05);
}

.scoreboard li,
.activity li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.activity li {
    flex-direction: column;
    align-items: flex-start;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(17, 19, 43, 0.1);
}

.chip input {
    margin-right: 0.25rem;
}

.chip-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.chip.large {
    width: 100%;
    border-radius: 18px;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(249, 115, 22, 0.25);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.15);
}

.chip.large input {
    margin-right: 0.6rem;
}

.chip.large span {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.chip.ghost {
    background: transparent;
    border: 1px dashed rgba(17, 19, 43, 0.2);
}

.flash {
    padding: 1rem 1.2rem;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.flash.success {
    background: #ecfdf5;
    color: #047857;
}

.flash.error {
    background: #fef2f2;
    color: #b91c1c;
}

.auth-card {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin: 0 0 1rem 0;
}

.auth-logo .logo-img {
    width: 160px;
    height: auto;
}

.auth-card__inner {
    background: #fff;
    padding: 3.25rem 3.5rem;
    border-radius: 28px;
    box-shadow: 0 40px 80px rgba(15, 23, 42, 0.15);
    text-align: center;
    max-width: 480px;
    width: 100%;
}

.map {
    border-radius: 24px;
    overflow: hidden;
    background: #f5f5ff;
    height: 320px;
}

.map.-large {
    height: 520px;
}

.map-error {
    margin-top: 0.5rem;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: rgba(248, 113, 113, 0.12);
    color: #b91c1c;
    font-size: 0.9rem;
}

.legend {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.35rem;
}

.dot.installed {
    background: #22c55e;
}

.dot.needs-removal {
    background: #f97316;
}

.dot.removed {
    background: #a3a3a3;
}

.dot.pending {
    background: #facc15;
}

.dot.support-pancarte {
    background: #facc15;
}

.dot.support-banderole {
    background: #fb923c;
}

.dot.support-affiche {
    background: #22c55e;
}

.marker {
    background: transparent;
}

.marker span {
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--marker-color, #2563eb);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.marker-square span {
    border-radius: 4px;
}

.marker-diamond span {
    transform: rotate(45deg);
}

.marker-triangle span {
    position: relative;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 18px solid var(--marker-color, #2563eb);
    border-radius: 0;
    box-shadow: none;
}

.marker-triangle span::after {
    content: '';
    position: absolute;
    top: 2px;
    left: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 14px solid #fff;
}

.legend-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shape {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.shape span {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: currentColor;
    border-radius: 50%;
}

.shape.square span {
    border-radius: 4px;
}

.shape.triangle span {
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 12px solid currentColor;
    border-radius: 0;
}

.installer-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

.installer-card {
    background: #fff;
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.installer-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.installer-form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-weight: 500;
}

.installer-form input,
.installer-form select,
.installer-form textarea {
    border-radius: 16px;
    border: 1px solid rgba(17, 19, 43, 0.15);
    padding: 0.9rem 1rem;
    background: #f9f9ff;
}

.installer-actions {
    text-align: center;
}

.hint {
    color: #6b7280;
}

.installer-status {
    font-weight: 600;
    margin-top: 1rem;
}

.installer-status[data-variant="success"] {
    color: #0f9d58;
}

.installer-status[data-variant="error"] {
    color: #e11d48;
}

.manual-block {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px dashed rgba(0, 0, 0, 0.08);
}

.manual-block[hidden] {
    display: none;
}

.manual-hint {
    margin-top: 1rem;
    text-align: center;
}

.manual-hint .btn {
    padding: 0.4rem 1rem;
}

.manual-hint.warning {
    color: #b45309;
}

.manual-hint.warning .btn {
    background: #fef3c7;
    color: #92400e;
}

.manual-actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.manual-actions small {
    color: #6b7280;
}

.manual-actions .btn {
    flex-shrink: 0;
}

.manual-map[hidden] {
    display: none;
}

.removal-target {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.removal-target__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.removal-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.removal-status {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.05);
}

.distance {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
}

.manual-fallback {
    margin-top: 1.5rem;
}
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.inventory-card {
    background: #fff;
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    position: relative;
}

.inventory-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 2px solid var(--accent, #facc15);
    opacity: 0.3;
    pointer-events: none;
}

.inventory-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.badge {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 999px;
    padding: 0.2rem 0.8rem;
    font-size: 0.8rem;
}

.inventory-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.inventory-form label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.9rem;
}

.inventory-form input {
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 0.6rem 0.8rem;
}

.inventory-form button {
    margin-top: 0.3rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b370d;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.event-actions form {
    margin: 0;
}

@media (max-width: 800px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        position: static;
    }

    .hero {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
}
