/* ══════════════════════════════════════════════════════════
   L'Atelier d'Odrey — Design System
   Couleurs: Lin, Terracotta, Doré
   ══════════════════════════════════════════════════════════ */

:root {
    --lin: #EFD8CF;
    --terracotta: #C67B5C;
    --gold: #8F5F54;
    --bg: #FFF7F3;
    --bg-card: #FFFFFF;
    --text: #4B342C;
    --text-light: #86685D;
    --text-muted: #B79486;
    --border: #F0D7CC;
    --success: #5B9A6E;
    --danger: #C75050;
    --warning: #D4A04A;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(62,47,35,0.08);
    --shadow-lg: 0 8px 32px rgba(62,47,35,0.12);
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-script: 'Dancing Script', cursive;
    --nav-height: 64px;
    --header-height: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding-top: var(--header-height);
    padding-bottom: calc(var(--nav-height) + 16px);
    -webkit-font-smoothing: antialiased;
}

.startup-splash {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, rgba(255,255,255,.3), transparent 30%), linear-gradient(180deg, #d58871 0%, #cf7e68 100%);
    opacity: 1;
    visibility: visible;
    transition: opacity .45s ease, visibility .45s ease;
}

.startup-splash.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.startup-splash__inner {
    width: min(280px, 68vw);
    aspect-ratio: 1 / 1;
    border-radius: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
    box-shadow: 0 24px 60px rgba(92, 49, 38, .22);
    backdrop-filter: blur(6px);
}

.startup-splash__logo {
    width: 82%;
    height: auto;
    display: block;
    border-radius: 28px;
    box-shadow: 0 18px 38px rgba(255,255,255,.12);
}

/* ── Typography ── */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
a { color: var(--terracotta); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }

.logo {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--terracotta);
    font-weight: 700;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.brand-monogram {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 7px;
    box-shadow: none;
    opacity: .92;
}

/* ── Header ── */
#app-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--header-height);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px;
}
.header-left .logo { font-size: 1.4rem; cursor: pointer; }
.header-right { display: flex; align-items: center; gap: 8px; }
.dropdown-menu {
    position: absolute; top: var(--header-height); right: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
    min-width: 180px; z-index: 200;
}
.dropdown-menu a { display: block; padding: 10px 16px; color: var(--text); }
.dropdown-menu a:hover { background: var(--bg); text-decoration: none; }
.dropdown-label { padding: 10px 16px; font-weight: 600; border-bottom: 1px solid var(--border); font-size: .9rem; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border: none; border-radius: var(--radius-sm);
    font-family: var(--font); font-size: .95rem; font-weight: 500;
    cursor: pointer; transition: all .2s;
}
.btn:active { transform: scale(0.97); }
.btn-terracotta { background: var(--terracotta); color: #fff; }
.btn-terracotta:hover { background: #B56A4D; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #B39349; }
.btn-outline { background: transparent; border: 1.5px solid var(--terracotta); color: var(--terracotta); }
.btn-outline:hover { background: var(--terracotta); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { background: none; border: none; font-size: 1.3rem; cursor: pointer; position: relative; padding: 4px; }
.btn-back { background: none; border: none; color: var(--terracotta); font-size: .95rem; cursor: pointer; padding: 8px 0; font-weight: 500; }

.badge {
    position: absolute; top: -4px; right: -6px;
    background: var(--danger); color: #fff; font-size: .7rem;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}

/* ── Forms ── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 500; color: var(--text-light); margin-bottom: 4px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-family: var(--font); font-size: .95rem;
    background: var(--bg-card); color: var(--text); transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--terracotta);
}
.password-field { position: relative; }
.password-field input { padding-right: 88px; }
.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--terracotta);
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 8px;
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.field-action-row { display: flex; gap: 8px; align-items: center; }
.field-action-row > *:first-child { flex: 1; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; margin: 12px 0; }
.checkbox-label input { width: auto; accent-color: var(--terracotta); }
.error-msg { color: var(--danger); font-size: .85rem; margin: 8px 0; min-height: 1.2em; }
.search-bar { padding: 0 16px 12px; }
.search-bar input { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 24px; font-size: .95rem; background: var(--bg-card); }

/* ── Pages ── */
.page { display: none; padding: 16px; max-width: 800px; margin: 0 auto; }
.page.active { display: block; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }
.page-header p { width: 100%; font-size: .85rem; color: var(--text-light); }
.section { margin-bottom: 28px; }
.section h3 { margin-bottom: 12px; }

/* ── Hero (Home) ── */
.hero {
    min-height: 380px;
    border-radius: var(--radius);
    margin: -16px -16px 24px;
    box-shadow: var(--shadow-lg);
    background: radial-gradient(circle at top left, #f9efe8 0%, #f6eee7 22%, #ead7ca 52%, #d3aa93 100%);
}
.hero-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 38px 22px 34px;
    min-height: 380px;
    position: relative;
}
.hero-title {
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    color: #453f3c;
    text-shadow: 0 2px 12px rgba(255,255,255,.45);
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .btn-terracotta { box-shadow: 0 10px 30px rgba(198,123,92,.25); }
.hero .btn-outline {
    border-color: rgba(69,63,60,.6);
    color: #43332a;
    background: rgba(255,255,255,.5);
}
.hero .btn-outline:hover { background: #fff; color: var(--terracotta); }
.hero-rating {
    margin-top: 18px;
    font-size: .9rem;
    color: rgba(62,47,35,.82);
    background: rgba(255,255,255,.58);
    padding: 8px 14px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}
.hero-safe {
    overflow: hidden;
}
.hero-overlay-safe {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}
.btn-install-hero {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(198,123,92,.4);
    color: var(--terracotta);
    font-size: .78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    white-space: nowrap;
}

/* ── Install Banner ── */
.install-banner {
    position: fixed; top: calc(var(--header-height) + 8px); left: 8px; right: 8px;
    background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 16px; z-index: 90;
}
.install-content { text-align: center; }
.install-banner-logo {
    width: 34px;
    height: 34px;
    display: block;
    margin: 0 auto 8px;
}
.install-content .logo { font-size: 1.3rem; }
.install-content p { font-size: .9rem; color: var(--text-light); margin: 8px 0 12px; }
.install-actions { display: flex; gap: 10px; justify-content: center; }

/* ── Specialties Grid ── */
.specialties-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.specialty-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 12px; text-align: center;
    cursor: pointer; transition: all .2s;
}
.specialty-card:hover { border-color: var(--terracotta); box-shadow: var(--shadow); }
.specialty-icon { font-size: 2rem; display: block; margin-bottom: 8px; }

/* ── Services ── */
.services-container {}
.category-section { margin-bottom: 24px; }
.category-section h3 { color: var(--terracotta); margin-bottom: 4px; }
.category-desc { font-size: .85rem; color: var(--text-light); margin-bottom: 12px; }
.service-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px; margin-bottom: 8px;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; transition: all .2s;
}
.service-card:hover { border-color: var(--terracotta); }
.service-card.selectable.selected {
    border-color: var(--terracotta);
    background: #fff7f3;
    box-shadow: var(--shadow);
}
.service-info { flex: 1; }
.service-name { font-weight: 500; }
.service-meta { font-size: .85rem; color: var(--text-light); margin-top: 2px; }
.service-price { font-weight: 700; color: var(--terracotta); font-size: 1.1rem; white-space: nowrap; margin-left: 12px; }
.service-phone { font-size: .8rem; color: var(--warning); margin-top: 4px; }
.service-card-admin { cursor: default; }
.service-admin-actions { display: flex; gap: 4px; align-items: center; margin-left: 8px; flex-shrink: 0; }
.btn-icon-danger { color: #c0392b; }
.service-select-indicator {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--terracotta);
    font-weight: 700;
    margin-left: 12px;
    flex: 0 0 auto;
}

/* ── Auth ── */
.auth-container { max-width: 400px; margin: 40px auto; text-align: center; }
.auth-container .logo { font-size: 2rem; margin-bottom: 24px; display: block; }
.auth-container h3 { margin-bottom: 20px; }
.auth-container form { text-align: left; }
.auth-switch { margin-top: 16px; font-size: .9rem; color: var(--text-light); }

/* ── Booking ── */
.booking-step { margin-bottom: 20px; }
.booking-step4-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.booking-step4-header h3 { flex: 1; margin: 0; }
.notify-early-label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin: 14px 0;
    font-size: .95rem;
    cursor: pointer;
}
.booking-search-panel {
    position: sticky;
    top: calc(var(--header-height) + 8px);
    z-index: 20;
    background: linear-gradient(180deg, rgba(250,248,245,.98) 0%, rgba(250,248,245,.94) 100%);
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.booking-search-bar { padding: 0 0 10px; }
.booking-selected-services {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    display: none;
}
.booking-selected-services.active { display: block; }
.selected-services-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.selected-services-head p {
    font-size: .88rem;
    color: var(--text-light);
}
.selected-service-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.selected-service-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8efe9;
    color: var(--text);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: .88rem;
}
.selected-service-pill button {
    background: none;
    border: none;
    color: var(--terracotta);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}
.booking-actions-sticky {
    position: sticky;
    bottom: calc(var(--nav-height) + 10px);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    background: rgba(250,248,245,.96);
    padding-top: 12px;
    margin-top: 16px;
}
.booking-actions-sticky .btn { flex: 1; }
.practitioners-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.practitioner-card {
    background: var(--bg-card); border: 2px solid var(--border);
    border-radius: var(--radius); padding: 20px; text-align: center; cursor: pointer;
    transition: all .2s;
}
.practitioner-card:hover, .practitioner-card.selected { border-color: var(--terracotta); background: #FDF6F3; }
.practitioner-card .name { font-weight: 600; font-size: 1.1rem; margin-top: 8px; }
.practitioner-card .specs { font-size: .85rem; color: var(--text-light); margin-top: 4px; }

.calendar-container { margin-bottom: 16px; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-header button { background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 4px 8px; color: var(--terracotta); }
.cal-header span { font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-day-label { font-size: .75rem; color: var(--text-muted); font-weight: 600; padding: 4px; }
.cal-day {
    padding: 8px 4px; border-radius: var(--radius-sm); font-size: .9rem;
    cursor: pointer; transition: all .15s;
}
.cal-day:hover { background: #FDF6F3; }
.cal-day.today { font-weight: 700; }
.cal-day.selected { background: var(--terracotta); color: #fff; }
.cal-day.disabled { color: var(--text-muted); cursor: default; }
.cal-day.disabled:hover { background: transparent; }
.cal-day.empty { cursor: default; }

.slots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.availability-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.availability-list-caption {
    margin: 0;
    color: var(--text-light);
    font-size: .9rem;
}
.booking-summary-actions {
    margin: -4px 0 16px;
}
.booking-availability-card {
    display: grid;
    gap: 12px;
}
.booking-availability-item {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fcfaf7;
}
.booking-availability-item .label {
    display: block;
    color: var(--text-light);
    font-size: .82rem;
    margin-bottom: 6px;
}
.booking-availability-item .value {
    display: block;
    font-weight: 600;
    line-height: 1.5;
    white-space: pre-line;
}
.availability-day-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 16px;
    align-items: center;
}
.availability-day-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
}
.availability-day-header h4 { font-size: 1.04rem; }
.availability-day-header span {
    color: var(--text-light);
    font-size: .86rem;
}
.availability-slot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.slot-btn {
    min-width: 110px;
    padding: 12px 14px;
    background: #faf7f3;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 600;
    transition: all .2s;
}
.slot-btn:hover { border-color: var(--terracotta); color: var(--terracotta); }
.slot-btn.selected { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.booking-inline-summary { margin-bottom: 16px; }
.availability-more {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.booking-summary {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px;
}
.booking-summary-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 5px 0; border-bottom: 1px solid var(--border);
}
.booking-summary-row:last-child { border-bottom: none; }
.booking-summary-row .label { color: var(--text-light); font-size: .85rem; }
.booking-summary-row .value { font-weight: 600; }
.booking-summary-total { color: var(--terracotta); font-size: 1.05rem; }
.booking-summary-services-label { border-bottom: none; padding-bottom: 2px; }
.booking-summary-services-list { margin-bottom: 4px; }
.booking-summary-service {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0 6px 10px; border-left: 2px solid var(--terracotta);
    margin-bottom: 4px;
}
.booking-summary-service-meta { color: var(--text-light); font-size: .82rem; margin-left: 6px; }
.btn-remove-service {
    background: none; border: none; color: var(--text-light);
    cursor: pointer; font-size: 1rem; padding: 0 4px; line-height: 1;
    flex-shrink: 0;
}
.btn-remove-service:hover { color: #c0392b; }
.booking-checks-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}
.booking-check-row {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    width: 100%; box-sizing: border-box;
}
.booking-check-row--last { border-bottom: none; }
.booking-check-label {
    display: flex; align-items: center; gap: 12px;
    flex: 1; cursor: pointer; font-size: .9rem; color: var(--text);
}
.booking-check-label input[type="checkbox"] {
    width: 20px; height: 20px; flex-shrink: 0;
    accent-color: var(--terracotta); cursor: pointer;
}
.btn-conditions-inline {
    background: none; border: 1px solid var(--terracotta);
    color: var(--terracotta); border-radius: 999px;
    font-size: .75rem; font-weight: 600; font-family: inherit;
    padding: 4px 10px; cursor: pointer; white-space: nowrap;
    flex-shrink: 0; transition: background .15s, color .15s;
}
.btn-conditions-inline:hover { background: var(--terracotta); color: #fff; }
.auth-helper {
    margin-top: 12px;
    text-align: center;
    font-size: .92rem;
}
.booking-errors-list { list-style: none; padding: 0; margin: 0; }
.booking-errors-list li {
    padding: 8px 12px 8px 36px; position: relative;
    border-left: 3px solid #e74c3c; margin-bottom: 8px;
    background: #fff5f5; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: .9rem; color: #c0392b;
}
.booking-errors-list li::before { content: '✕'; position: absolute; left: 10px; font-weight: 700; }
.btn-link {
    background: none; border: none; padding: 0;
    color: var(--terracotta); text-decoration: underline;
    cursor: pointer; font-size: inherit; font-family: inherit;
}
.modal-body h4 { margin: 14px 0 4px; color: var(--terracotta); }
.modal-body p { margin-bottom: 6px; font-size: .9rem; }
.conditions-salon { color: var(--text-light); font-size: .82rem; margin-bottom: 16px; font-style: italic; }

/* ── Appointments ── */
.appointments-list {}
.appointment-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px;
}
.appointment-card .appt-header { display: flex; justify-content: space-between; align-items: center; }
.appointment-card .appt-date { font-weight: 600; }
.appt-status {
    font-size: .8rem; padding: 3px 10px; border-radius: 12px; font-weight: 600;
}
.appt-status.CONFIRMED { background: #E8F5E9; color: var(--success); }
.appt-status.COMPLETED { background: #E3F2FD; color: #1976D2; }
.appt-status.CANCELLED { background: #FFEEF0; color: var(--danger); }
.appt-status.NO_SHOW { background: #FFF3E0; color: #E65100; }
.appt-service { margin-top: 4px; }
.appt-meta { font-size: .85rem; color: var(--text-light); margin-top: 2px; }
.appt-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Reviews ── */
.reviews-summary { text-align: center; margin-bottom: 24px; }
.reviews-summary .big-rating { font-size: 3rem; font-weight: 700; color: var(--gold); }
.reviews-summary .stars { font-size: 1.3rem; color: var(--gold); }
.review-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px;
}
.review-header { display: flex; justify-content: space-between; align-items: center; }
.review-author { font-weight: 600; }
.review-stars { color: var(--gold); }
.review-date { font-size: .8rem; color: var(--text-muted); }
.review-comment { margin-top: 8px; font-size: .95rem; }
.review-response { margin-top: 10px; padding: 10px; background: var(--bg); border-radius: var(--radius-sm); font-size: .9rem; }
.review-response .resp-label { font-weight: 600; color: var(--terracotta); font-size: .85rem; }

.planity-reviews-box {
    background: linear-gradient(180deg, #fff 0%, #f8f4ee 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}
.planity-reviews-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.planity-reviews-head p {
    font-size: .85rem;
    color: var(--text-light);
}
.planity-badge {
    background: #fff7e7;
    color: #9c6a00;
    border: 1px solid #f0d18a;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}
.planity-carousel {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    gap: 10px;
    align-items: center;
}
.planity-carousel-track-wrap {
    overflow: hidden;
}
.planity-carousel-track {
    display: flex;
    transition: transform .35s ease;
}
.planity-slide {
    min-width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px;
    min-height: 220px;
}
.planity-slide-stars {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.planity-slide-text {
    font-size: 1rem;
    line-height: 1.7;
}
.planity-slide-response {
    margin-top: 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: .9rem;
}
.planity-slide-response strong {
    display: block;
    color: var(--terracotta);
    margin-bottom: 4px;
}
.planity-slide-date {
    margin-top: 14px;
    font-size: .85rem;
    color: var(--text-muted);
}
.planity-carousel-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--terracotta);
    font-size: 1.4rem;
    cursor: pointer;
}
.planity-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.planity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    cursor: pointer;
}
.planity-dot.active { background: var(--terracotta); }

/* Rating input */
.rating-input { display: flex; gap: 4px; font-size: 1.5rem; cursor: pointer; }
.rating-input span { color: var(--border); transition: color .15s; }
.rating-input span.active { color: var(--gold); }

/* ── Gallery ── */
.gallery-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.tab-btn {
    padding: 6px 16px; border: 1.5px solid var(--border); border-radius: 20px;
    background: var(--bg-card); font-size: .9rem; cursor: pointer; white-space: nowrap;
    transition: all .2s;
}
.tab-btn.active, .tab-btn:hover { border-color: var(--terracotta); color: var(--terracotta); }
.tab-btn.active { background: #FDF6F3; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.gallery-item { aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm); cursor: pointer; position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .delete-btn {
    position: absolute; top: 4px; right: 4px; background: var(--danger); color: #fff;
    border: none; border-radius: 50%; width: 28px; height: 28px; cursor: pointer;
    display: none; align-items: center; justify-content: center; font-size: .9rem;
}
.editable .gallery-item:hover .delete-btn { display: flex; }

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(20, 14, 11, .9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
}
.gallery-lightbox-content {
    max-width: min(1100px, 82vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.gallery-lightbox-content img {
    max-width: 100%;
    max-height: calc(88vh - 60px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    object-fit: contain;
}
.gallery-lightbox-caption {
    color: #fff;
    text-align: center;
    font-size: .95rem;
}
.gallery-lightbox-close,
.gallery-lightbox-nav {
    border: none;
    background: rgba(255,255,255,.12);
    color: #fff;
    cursor: pointer;
}
.gallery-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.25rem;
}
.gallery-lightbox-nav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 2rem;
    flex: 0 0 auto;
}

/* ── Contact ── */
.contact-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow);
}
.contact-card .logo { font-size: 1.6rem; display: block; margin-bottom: 16px; }
.contact-info p { margin-bottom: 10px; }
.hours-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.hours-table td { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.hours-table td:first-child { font-weight: 500; width: 100px; }
.hours-table .closed td { color: var(--text-muted); }
.legal-card p { margin-bottom: 14px; }

/* Social */
.social-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px;
    border-radius: var(--radius-sm); font-weight: 500; font-size: .95rem;
    transition: all .2s; text-decoration: none;
}
.social-btn.instagram { background: #FFEEF5; color: #C13584; }
.social-btn.instagram:hover { background: #FFD6E8; text-decoration: none; }
.social-btn.facebook { background: #EBF0FF; color: #1877F2; }
.social-btn.facebook:hover { background: #D6E4FF; text-decoration: none; }

/* ── Profile ── */
.profile-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow);
}
.profile-card .profile-name { font-size: 1.3rem; font-weight: 600; }
.profile-card .profile-info { margin-top: 12px; }
.profile-card .profile-info p { margin: 6px 0; font-size: .95rem; }

/* ── Dashboard KPIs ── */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.kpi-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 16px;
    box-shadow: var(--shadow); text-align: center;
}
.kpi-value { font-size: 1.8rem; font-weight: 700; color: var(--terracotta); }
.kpi-label { font-size: .8rem; color: var(--text-light); margin-top: 2px; }

/* ── Agenda full screen ── */
body.page-is-agenda {
    overflow: hidden;
    padding-bottom: 0;
}
body.page-is-agenda .site-footer {
    display: none;
}
#page-agenda {
    flex-direction: column;
    height: calc(100vh - var(--header-height) - var(--nav-height));
    overflow: hidden;
    padding: 0;
    max-width: none;
}
#page-agenda.active {
    display: flex;
}
#page-agenda .agenda-grid {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ── Agenda ── */
.agenda-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; flex-shrink: 0; }
#page-agenda .agenda-nav { margin-bottom: 0; padding: 8px 16px; background: #fff; border-bottom: 1px solid #e4e4e4; }
.agenda-nav button { background: var(--bg-card); border: 1px solid var(--border); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 1rem; }
.agenda-period-btn {
    width: auto !important;
    min-width: 180px;
    border-radius: 999px !important;
    padding: 0 14px;
    font-weight: 700;
}
.agenda-zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid var(--border);
}
.agenda-zoom-btn {
    min-width: 36px;
    width: auto !important;
    padding: 0 10px;
    border-radius: 999px !important;
    font-size: .8rem !important;
    font-weight: 700;
}
.agenda-zoom-reset {
    min-width: 62px;
}
.agenda-grid {
    overflow-x: auto;
    touch-action: pan-x pan-y pinch-zoom;
}
.agenda-time-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}
.agenda-time-picker select {
    flex: 1;
}
.agenda-month-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}
.agenda-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.agenda-month-weekday,
.agenda-month-day {
    text-align: center;
    padding: 10px 4px;
    border-radius: 10px;
}
.agenda-month-weekday {
    font-size: .75rem;
    color: var(--text-light);
    font-weight: 700;
}
.agenda-month-day {
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
}
.agenda-month-day.is-muted {
    opacity: .35;
}
.agenda-month-day.is-today {
    background: #fff3ee;
    border: 2px solid var(--terracotta);
    font-weight: 700;
    color: var(--terracotta);
}
.agenda-month-day.is-selected {
    background: var(--terracotta);
    color: #fff;
    border-color: var(--terracotta);
}
.modal-top-sheet {
    align-items: flex-start;
    padding-top: calc(var(--header-height) + 8px);
}
.modal-top-sheet .modal-content {
    margin-top: 0;
}
.agenda-settings-zoom {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
/* ── Agenda grille Planity (classes calquées sur le mockup) ── */
#page-agenda .agenda-grid {
    background: #fff;
    user-select: none;
}
.pm-header {
    display: grid;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1.5px solid #ccc;
    z-index: 10;
}
.pm-time-spacer { /* coin vide en haut à gauche */ }
.pm-col-header {
    padding: 6px 4px 5px 8px;
    border-left: 3px solid #2aab6a;
    line-height: 1.3;
}
.pm-col-header.today    { background: #f2fff8; border-left-color: #2aab6a; }
.pm-col-header.closed-hd{ border-left-color: #bbb; background: #f4f4f4; }
.pm-day-name { font-size: 11px; font-weight: 500; color: #777; }
.pm-day-date { font-size: 13px; font-weight: 700; color: #111; }
.pm-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 0;
}
.pm-canvas {
    position: absolute;
    inset: 0;
    display: grid;
}
.pm-time-col { position: relative; }
.pm-day-col  { position: relative; border-left: 1px solid #ddd; }
.pm-appt {
    position: absolute;
    left: 3px; right: 3px;
    border-radius: 8px;
    padding: 5px 7px;
    overflow: hidden;
    z-index: 3;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.13);
}
.pm-appt:hover { filter: brightness(.95); cursor: pointer; }
.pm-day-col { user-select: none; cursor: crosshair; }
.pm-drag-overlay {
    position: absolute; left: 2px; right: 2px; z-index: 10; pointer-events: none;
    background: rgba(80,140,255,0.28); border: 2px solid #4090e0; border-radius: 6px;
    transition: none;
}
.pm-drag-choice {
    position: fixed; z-index: 200; background: #fff; border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,.18); padding: 8px; display: flex;
    flex-direction: column; gap: 6px; min-width: 180px;
}
.pm-drag-choice button {
    width: 100%; padding: 10px 14px; border: none; border-radius: 7px;
    font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
}
.pm-drag-choice .btn-rdv { background: #C4A882; color: #fff; }
.pm-drag-choice .btn-block { background: #f0f0f0; color: #333; }
.pm-appt-icons   { font-size: 10px; margin-bottom: 2px; opacity: .75; }
.pm-appt-name    { font-size: 12px; font-weight: 700; line-height: 1.2; }
.pm-appt-service { font-size: 10.5px; font-weight: 400; opacity: .82; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-empty-note { padding: 18px; color: var(--text-light); }

/* ── Clients list ── */
.clients-list {}
.client-row {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; transition: all .2s;
}
.client-row:hover { border-color: var(--terracotta); }
.client-name { font-weight: 500; }
.client-meta { font-size: .85rem; color: var(--text-light); }
.client-noshow { background: #FFF3E0; color: #E65100; padding: 2px 8px; border-radius: 10px; font-size: .8rem; font-weight: 600; }

/* ── Notifications ── */
.notifications-list {}
.notif-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px;
    cursor: pointer; transition: all .2s;
}
.notif-item.unread { border-left: 3px solid var(--terracotta); }
.notif-title { font-weight: 500; font-size: .95rem; }
.notif-message { font-size: .85rem; color: var(--text-light); margin-top: 2px; }
.notif-time { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

/* ── Modals ── */
.modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(62,47,35,.4); z-index: 300;
    display: flex; align-items: flex-end; justify-content: center;
}
.modal-content {
    background: var(--bg-card); border-radius: var(--radius) var(--radius) 0 0;
    width: 100%; max-width: 500px; max-height: 85vh; overflow-y: auto; padding: 20px;
}
.modal-large { max-width: 700px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header button { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text-light); }
.modal-footer { margin-top: 20px; }

/* ── Toast ── */
.toast {
    position: fixed; bottom: calc(var(--nav-height) + 20px); left: 50%; transform: translateX(-50%);
    background: var(--text); color: #fff; padding: 12px 24px; border-radius: var(--radius-sm);
    font-size: .9rem; z-index: 400; opacity: 0; transition: opacity .3s;
    pointer-events: none; max-width: 90%;
}
.toast.show { opacity: 1; }

/* ── Bottom Nav ── */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-height); background: var(--terracotta);
    border-top: 1px solid rgba(255,255,255,.16);
    display: flex; align-items: center; justify-content: space-around;
    z-index: 100; padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 0; cursor: pointer; color: rgba(255,255,255,.72);
    font-size: .7rem; font-weight: 500; transition: color .2s;
    background: none; border: none; flex: 1;
}
.nav-item.active { color: #fff; }
.nav-item .nav-icon { font-size: 1.3rem; }

.site-footer {
    margin: 10px auto calc(var(--nav-height) + 24px);
    max-width: 800px;
    padding: 18px 16px 0;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-light);
}
.footer-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: .84rem;
}
.footer-links {
    margin-left: auto;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: .88rem;
}

/* ── Responsive ── */
@media (min-width: 600px) {
    .kpi-grid { grid-template-columns: repeat(4, 1fr); }
    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
    .page { padding: 24px 32px; }
    .hero { margin: 0 0 24px; }
    .modal-content { border-radius: var(--radius); margin-bottom: 10vh; }
    .modal { align-items: center; }
}

@media (max-width: 700px) {
    .planity-carousel {
        grid-template-columns: 1fr;
    }
    .planity-carousel-nav {
        display: none;
    }
    .gallery-lightbox {
        padding: 12px;
    }
    .gallery-lightbox-content {
        max-width: 100%;
    }
    .gallery-lightbox-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    .gallery-lightbox-nav.prev { left: 10px; }
    .gallery-lightbox-nav.next { right: 10px; }
    .hero {
        margin: -16px -16px 24px;
        min-height: 320px;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-monogram {
        width: 92px;
        top: 16px;
        right: 16px;
        border-radius: 20px;
    }
    .header-left .logo {
        font-size: 1.15rem;
    }
    .brand-monogram {
        width: 18px;
        height: 18px;
        border-radius: 6px;
    }
    .booking-actions-sticky {
        flex-direction: column;
    }
    .availability-day-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .slot-btn {
        width: calc(50% - 5px);
    }
    .agenda-table {
        --agenda-time-width: 42px;
        --agenda-day-min-width: 0;
        --agenda-card-padding-y: 3px;
        --agenda-card-padding-x: 4px;
        --agenda-time-font: .62rem;
        --agenda-title-font: .66rem;
        --agenda-meta-font: .56rem;
        min-width: 0;
    }
    .agenda-table-hour-head,
    .agenda-time-cell {
        width: 42px;
        min-width: 42px;
        max-width: 42px;
        padding-left: 3px;
        padding-right: 2px;
    }
    .agenda-table-day-head {
        padding: 10px 8px 8px;
    }
    .agenda-table-day-head strong {
        font-size: .82rem;
    }
    .agenda-table-day-head span {
        font-size: .68rem;
    }
    .agenda-zoom-controls {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
    }
    .agenda-zoom-btn {
        min-width: 40px;
    }
    .agenda-month-toolbar {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    .agenda-month-toolbar .btn {
        flex-shrink: 0;
        padding: 6px 10px;
        font-size: .8rem;
    }
    .agenda-month-toolbar strong {
        flex: 1;
        text-align: center;
        font-size: .9rem;
    }
    .agenda-period-btn {
        min-width: 150px;
    }
    #page-agenda {
        max-width: none;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    #page-agenda .agenda-nav {
        margin-bottom: 0;
        padding: 8px 10px 6px;
        background: #fff;
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
    }
    #page-agenda .agenda-grid {
        width: 100%;
        overflow: hidden;
        padding: 0;
    }
    #app-header .btn-icon {
        font-size: 1.15rem;
    }
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-links {
        margin-left: 0;
    }
    body.page-is-agenda {
        padding-bottom: 0;
    }
}
