/* ========================================
   AGENDA GRATUIT
   Design: Clean & Modern Calendar
   ======================================== */

/* CSS Variables */
:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-bg-subtle: #f1f5f9;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    --color-primary: #06a89d;
    --color-primary-hover: #058f86;
    --color-primary-light: #d1faf7;
    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-danger-light: #fee2e2;
    --color-today: #fef3c7;
    --color-today-border: #f59e0b;
    
    /* Event colors */
    --card-blue: #dbeafe;
    --card-blue-border: #3b82f6;
    --card-green: #dcfce7;
    --card-green-border: #22c55e;
    --card-yellow: #fef9c3;
    --card-yellow-border: #eab308;
    --card-orange: #ffedd5;
    --card-orange-border: #f97316;
    --card-red: #fee2e2;
    --card-red-border: #ef4444;
    --card-purple: #f3e8ff;
    --card-purple-border: #a855f7;
    --card-gray: #f1f5f9;
    --card-gray-border: #64748b;
    
    --font-main: 'DM Sans', system-ui, -apple-system, sans-serif;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);
    --transition: 150ms ease;
    
    --sidebar-width: 260px;
    --toolbar-height: 60px;
}

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

/* Base */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-bg-alt);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    border-bottom: 1px solid var(--color-border);
    padding: 32px 0 24px;
    text-align: center;
}

.header.header-standalone {
    padding: 48px 0 32px;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-primary-light) 100%);
}

.header h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.header h1 .highlight {
    color: var(--color-primary);
    font-weight: 600;
}

.header .subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   MAIN APP
   ======================================== */
.main {
    padding: 24px 0 48px;
    min-height: 60vh;
}

/* ========================================
   TOOLBAR
   ======================================== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-arrows {
    display: flex;
    gap: 4px;
}

.current-period {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    min-width: 180px;
}

/* View Switcher */
.view-switcher {
    display: flex;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    padding: 4px;
}

.view-btn {
    padding: 8px 16px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.view-btn:hover {
    color: var(--color-text);
}

.view-btn.active {
    background: var(--color-bg);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    white-space: nowrap;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    padding: 8px 12px;
}

.btn-ghost:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.btn-danger {
    color: var(--color-danger);
}

.btn-danger:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

.btn-icon {
    padding: 8px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
}

.btn-icon:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ========================================
   DROPDOWN
   ======================================== */
.dropdown {
    position: relative;
}

.dropdown-arrow {
    margin-left: 4px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--color-text);
    background: none;
    border: none;
    cursor: pointer;
    transition: background var(--transition);
    text-align: left;
}

.dropdown-item:hover {
    background: var(--color-bg-alt);
}

.dropdown-item svg {
    color: var(--color-text-muted);
}

/* ========================================
   CALENDAR WRAPPER
   ======================================== */
.calendar-wrapper {
    display: flex;
    gap: 24px;
    min-height: 600px;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Mini Calendar */
.mini-calendar {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.mini-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mini-calendar-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}

.mini-nav-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.mini-nav-btn:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text);
}

.mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.mini-day-name {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-light);
    text-align: center;
    padding: 4px 0;
}

.mini-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--color-text);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
}

.mini-day:hover {
    background: var(--color-bg-subtle);
}

.mini-day.other-month {
    color: var(--color-text-light);
}

.mini-day.today {
    background: var(--color-today);
    font-weight: 600;
}

.mini-day.selected {
    background: var(--color-primary);
    color: white;
}

.mini-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
}

.mini-day {
    position: relative;
}

/* Categories */
.categories-section {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.categories-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--color-text);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.category-item:hover {
    background: var(--color-bg-subtle);
}

.category-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

.category-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ========================================
   CALENDAR MAIN
   ======================================== */
.calendar-main {
    flex: 1;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-width: 0;
}

.calendar-view {
    height: 100%;
}

/* ========================================
   MONTH VIEW
   ======================================== */
.month-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
}

.month-day-name {
    padding: 12px 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: center;
}

.month-day-name.weekend {
    color: var(--color-text-light);
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    height: calc(100% - 45px);
    min-height: 500px;
}

.month-day {
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 8px;
    min-height: 100px;
    cursor: pointer;
    transition: background var(--transition);
    overflow: hidden;
}

.month-day:nth-child(7n) {
    border-right: none;
}

.month-day:hover {
    background: var(--color-bg-subtle);
}

.month-day.other-month {
    background: var(--color-bg-alt);
}

.month-day.other-month .day-number {
    color: var(--color-text-light);
}

.month-day.today {
    background: var(--color-today);
}

.month-day.today .day-number {
    background: var(--color-today-border);
    color: white;
}

.day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    border-radius: 50%;
    margin-bottom: 4px;
}

.month-day.weekend .day-number {
    color: var(--color-text-muted);
}

.month-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.month-event {
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: transform var(--transition);
}

.month-event:hover {
    transform: scale(1.02);
}

.month-more {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    padding: 2px 6px;
    cursor: pointer;
}

.month-more:hover {
    color: var(--color-primary);
}

/* ========================================
   WEEK VIEW
   ======================================== */
.week-header {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
}

.week-header-cell {
    padding: 12px 8px;
    text-align: center;
    border-left: 1px solid var(--color-border);
}

.week-header-cell:first-child {
    border-left: none;
}

.week-day-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.week-day-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.2;
}

.week-header-cell.today .week-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
}

.week-grid {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    height: calc(100% - 80px);
    overflow-y: auto;
}

.week-time-column {
    border-right: 1px solid var(--color-border);
}

.week-time-slot {
    height: 60px;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: right;
    border-bottom: 1px solid var(--color-border);
}

.week-day-column {
    border-right: 1px solid var(--color-border);
    position: relative;
}

.week-day-column:last-child {
    border-right: none;
}

.week-hour-slot {
    height: 60px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background var(--transition);
}

.week-hour-slot:hover {
    background: var(--color-bg-subtle);
}

.week-event {
    position: absolute;
    left: 2px;
    right: 2px;
    padding: 4px 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
}

.week-event-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.week-event-time {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* ========================================
   DAY VIEW
   ======================================== */
.day-header {
    padding: 20px 24px;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

.day-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.day-date {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 4px;
}

.day-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    height: calc(100% - 90px);
    overflow-y: auto;
}

.day-time-slot {
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: right;
    border-bottom: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    height: 60px;
}

.day-hour-slot {
    height: 60px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background var(--transition);
    position: relative;
}

.day-hour-slot:hover {
    background: var(--color-bg-subtle);
}

.day-event {
    position: absolute;
    left: 8px;
    right: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    z-index: 1;
}

.day-event-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.day-event-time {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 2px;
}

.day-event-desc {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* Current time indicator */
.current-time-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-danger);
    z-index: 10;
    pointer-events: none;
}

.current-time-line::before {
    content: '';
    position: absolute;
    left: -5px;
    top: -4px;
    width: 10px;
    height: 10px;
    background: var(--color-danger);
    border-radius: 50%;
}

/* ========================================
   EVENT COLORS
   ======================================== */
.event-blue {
    background: var(--card-blue);
    border-left: 3px solid var(--card-blue-border);
    color: #1e40af;
}

.event-green {
    background: var(--card-green);
    border-left: 3px solid var(--card-green-border);
    color: #166534;
}

.event-yellow {
    background: var(--card-yellow);
    border-left: 3px solid var(--card-yellow-border);
    color: #854d0e;
}

.event-orange {
    background: var(--card-orange);
    border-left: 3px solid var(--card-orange-border);
    color: #c2410c;
}

.event-red {
    background: var(--card-red);
    border-left: 3px solid var(--card-red-border);
    color: #b91c1c;
}

.event-purple {
    background: var(--card-purple);
    border-left: 3px solid var(--card-purple-border);
    color: #7c3aed;
}

.event-gray {
    background: var(--card-gray);
    border-left: 3px solid var(--card-gray-border);
    color: #475569;
}

/* Month view event colors (smaller, without border-left) */
.month-event.event-blue {
    background: var(--card-blue-border);
    color: white;
    border-left: none;
}

.month-event.event-green {
    background: var(--card-green-border);
    color: white;
    border-left: none;
}

.month-event.event-yellow {
    background: var(--card-yellow-border);
    color: white;
    border-left: none;
}

.month-event.event-orange {
    background: var(--card-orange-border);
    color: white;
    border-left: none;
}

.month-event.event-red {
    background: var(--card-red-border);
    color: white;
    border-left: none;
}

.month-event.event-purple {
    background: var(--card-purple-border);
    color: white;
    border-left: none;
}

.month-event.event-gray {
    background: var(--card-gray-border);
    color: white;
    border-left: none;
}

/* ========================================
   MODALS
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 40px 20px;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-content {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    padding: 32px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.modal-small {
    max-width: 400px;
}

.modal-event {
    max-width: 480px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--color-text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text);
}

.modal-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
}

.modal-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 20px 0 10px;
}

.modal-content p {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="time"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select {
    cursor: pointer;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.checkbox-label span {
    font-size: 0.9rem;
    color: var(--color-text);
}

/* Color picker */
.color-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: var(--color-text);
    box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-text);
}

.color-btn[data-color="blue"] {
    background: var(--card-blue);
    border-color: var(--card-blue-border);
}

.color-btn[data-color="green"] {
    background: var(--card-green);
    border-color: var(--card-green-border);
}

.color-btn[data-color="yellow"] {
    background: var(--card-yellow);
    border-color: var(--card-yellow-border);
}

.color-btn[data-color="orange"] {
    background: var(--card-orange);
    border-color: var(--card-orange-border);
}

.color-btn[data-color="red"] {
    background: var(--card-red);
    border-color: var(--card-red-border);
}

.color-btn[data-color="purple"] {
    background: var(--card-purple);
    border-color: var(--card-purple-border);
}

.color-btn[data-color="gray"] {
    background: var(--card-gray);
    border-color: var(--card-gray-border);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

/* Share modal */
.share-info {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.share-link-group {
    display: flex;
    gap: 10px;
}

.share-link-group input {
    flex: 1;
    padding: 12px 14px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: var(--color-text);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

/* Search modal */
.search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 16px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition);
}

.search-result-item:hover {
    background: var(--color-bg-subtle);
}

.search-result-color {
    width: 8px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.search-no-results {
    text-align: center;
    padding: 24px;
    color: var(--color-text-muted);
}

/* ========================================
   SAVE INDICATOR & TOAST
   ======================================== */
.save-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 0.8rem;
    color: var(--color-success);
    opacity: 0;
    transition: opacity 300ms ease;
}

.save-indicator.visible {
    opacity: 1;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: var(--color-text);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 300ms ease;
    z-index: 2000;
}

.toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--color-success);
}

.toast.error {
    background: var(--color-danger);
}

/* ========================================
   SEO CONTENT
   ======================================== */
.seo-content {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: 64px 0;
}

.seo-section {
    margin-bottom: 56px;
}

.seo-section:last-child {
    margin-bottom: 0;
}

.seo-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.section-intro {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    max-width: 800px;
}

.section-intro strong {
    color: var(--color-text);
}

/* SEO Grid */
.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.seo-card {
    padding: 24px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: box-shadow var(--transition);
}

.seo-card:hover {
    box-shadow: var(--shadow-md);
}

.seo-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.seo-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.seo-card p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.seo-card p strong {
    color: var(--color-text);
    font-weight: 500;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-item summary {
    padding: 18px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--transition);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-text-muted);
    transition: transform var(--transition);
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    background: var(--color-bg);
}

.faq-item p {
    padding: 0 24px 18px;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.footer-credit {
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
}

.footer-credit a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-credit a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.footer-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-separator {
    color: var(--color-border-strong);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .calendar-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .mini-calendar {
        flex: 1;
        min-width: 250px;
    }
    
    .categories-section {
        flex: 1;
        min-width: 250px;
    }
    
    .sidebar .btn-full {
        width: auto;
        flex: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header {
        padding: 24px 0 20px;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }
    
    .toolbar-left,
    .toolbar-center,
    .toolbar-right {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .current-period {
        text-align: center;
        min-width: auto;
        width: 100%;
        order: -1;
        margin-bottom: 8px;
    }
    
    .btn-text {
        display: none;
    }
    
    .sidebar {
        display: none;
    }
    
    .calendar-main {
        border-radius: var(--radius-md);
    }
    
    .month-day {
        min-height: 80px;
        padding: 4px;
    }
    
    .day-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .month-event {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
    
    .seo-content {
        padding: 40px 0;
    }
    
    .seo-section h2 {
        font-size: 1.25rem;
    }
    
    .modal-content {
        margin: 10px;
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .view-switcher {
        width: 100%;
    }
    
    .view-btn {
        flex: 1;
        text-align: center;
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .toolbar-right {
        width: 100%;
    }
    
    .toolbar-right .btn {
        flex: 1;
    }
    
    .share-link-group {
        flex-direction: column;
    }
    
    .month-day-name {
        font-size: 0.7rem;
        padding: 8px 4px;
    }
    
    .month-event {
        display: none;
    }
    
    .month-day.has-events::after {
        content: '';
        display: block;
        width: 6px;
        height: 6px;
        background: var(--color-primary);
        border-radius: 50%;
        margin: 4px auto 0;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .header,
    .toolbar,
    .sidebar,
    .save-indicator,
    .seo-content,
    .footer,
    .modal {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .main {
        padding: 0;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .calendar-wrapper {
        display: block;
    }
    
    .calendar-main {
        border: 2px solid #000;
        border-radius: 0;
    }
    
    .month-header {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .month-day {
        min-height: 80px;
    }
    
    .month-event {
        font-size: 0.7rem;
    }
    
    @page {
        size: A4 landscape;
        margin: 10mm;
    }
}
