/* ============================================
   BeautyBooking - Design Moderne & Coloré
   Style complètement nouveau : moderne, clair, élégant
   Mobile-first, performant
   ============================================ */

/* Variables CSS */
:root {
    /* Couleurs - Palette moderne et colorée */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --secondary-light: #f472b6;
    --accent: #f59e0b;
    --success: #10b981;
    
    /* Fond */
    --bg: #fafafa;
    --bg-card: #ffffff;
    --bg-hover: #f9fafb;
    
    /* Texte */
    --text: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    /* Bordures */
    --border: #e5e7eb;
    --border-hover: #d1d5db;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    /* WhatsApp */
    --wa: #25D366;
    --wa-hover: #20BA5A;
    
    /* Rayons */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* Animation du gradient */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Overlay léger pour la lisibilité */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 0;
    pointer-events: none;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 40px 0;
}

/* Card moderne */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    z-index: 1;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Header */
.card-header {
    padding: 48px 40px 32px;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    border-bottom: 1px solid var(--border);
}

h1 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1.2;
}

h2 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1.2;
}

.subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.subtitle-hint {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.subtitle-hint::before {
    content: '•';
    margin: 0 8px;
    color: var(--primary);
}

/* Form */
.card-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

input[type="text"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

input[type="text"]:hover,
input[type="date"]:hover,
select:hover,
textarea:hover {
    border-color: var(--primary-light);
    background: var(--bg-card);
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Date picker */
.date-picker-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 50px;
}

.date-picker-input:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2325D366' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}

/* Select */
select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2325D366' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

/* Boutons */
.btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--wa) 0%, var(--wa-hover) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Message box */
.message-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    border: 2px solid var(--border);
    border-left: 4px solid var(--wa);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.message-box p {
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.6;
}

.message-box p:last-child {
    margin-bottom: 0;
}

.message-box strong {
    color: var(--primary);
    font-weight: 600;
}

/* Calendrier */
.calendar-container {
    display: none;
    position: absolute;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 20px;
    margin-top: 8px;
    z-index: 1000;
    left: 0;
    right: 0;
    max-width: 100%;
}

.calendar-container.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.calendar-nav-btn {
    background: var(--bg);
    color: var(--primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: var(--transition);
}

.calendar-nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
}

.calendar-month-year {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
    border: 2px solid transparent;
    transition: var(--transition);
}

.calendar-day:hover:not(.disabled):not(.selected) {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
}

.calendar-day.disabled {
    color: var(--text-light);
    opacity: 0.4;
    cursor: not-allowed;
}

.calendar-day.today {
    background: var(--bg);
    border-color: var(--primary);
    font-weight: 700;
    color: var(--primary);
}

.calendar-day.selected {
    background: linear-gradient(135deg, var(--wa) 0%, var(--wa-hover) 100%);
    color: white;
    font-weight: 700;
    border-color: var(--wa);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transform: scale(1.1);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .container {
        padding: 20px 0;
    }

    .card {
        border-radius: var(--radius-lg);
    }

    .card-header {
        padding: 32px 24px 24px;
    }

    .card-form {
        padding: 32px 24px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 15px;
    }

    .subtitle-hint {
        font-size: 12px;
    }

    .btn {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 48px;
    }

    input[type="text"],
    input[type="date"],
    select,
    textarea {
        padding: 14px;
        font-size: 16px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .calendar-container {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        max-height: 90vh;
        overflow-y: auto;
        margin-top: 0;
    }

    .card:hover {
        transform: none;
    }

    .message-box {
        padding: 20px;
    }
}

/* Responsive - Desktop */
@media (min-width: 769px) {
    .container {
        max-width: 650px;
        padding: 60px 0;
    }

    .card-header {
        padding: 56px 48px 40px;
    }

    .card-form {
        padding: 48px;
    }

    h1 {
        font-size: 42px;
    }

    h2 {
        font-size: 36px;
    }

    .subtitle {
        font-size: 18px;
    }

    .btn {
        padding: 18px 28px;
        font-size: 18px;
    }

    input[type="text"],
    input[type="date"],
    select,
    textarea {
        padding: 16px 18px;
    }

    .form-group {
        margin-bottom: 28px;
    }

    .message-box {
        padding: 32px;
    }
}

/* Responsive - Très petits écrans */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 15px 0;
    }

    .card-header {
        padding: 28px 20px 20px;
    }

    .card-form {
        padding: 28px 20px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 14px;
    }

    .subtitle-hint {
        font-size: 11px;
    }

    .btn {
        padding: 14px 18px;
        font-size: 15px;
        min-height: 48px;
    }

    .calendar-nav-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .calendar-day {
        min-height: 44px;
    }

    input[type="text"],
    input[type="date"],
    select,
    textarea {
        padding: 12px;
        font-size: 16px;
    }

    .calendar-container {
        left: 8px;
        right: 8px;
        padding: 16px;
    }

    .calendar-day {
        font-size: 13px;
    }

    .message-box {
        padding: 16px;
    }
}

/* Responsive - Tablettes */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        max-width: 90%;
    }

    .card-header {
        padding: 40px 32px 32px;
    }

    .card-form {
        padding: 40px 32px;
    }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    body {
        animation: none;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Confettis
   ============================================ */

#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    border-radius: 50%;
    opacity: 0.9;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Respect prefers-reduced-motion pour confettis */
@media (prefers-reduced-motion: reduce) {
    .confetti {
        display: none;
    }
}

/* ============================================
   Page de Confirmation Améliorée
   ============================================ */

.success-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.confirmation-steps {
    margin-bottom: 32px;
}

.step {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    transition: var(--transition);
}

.step:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.step-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.confirmation-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.detail-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-weight: 500;
    color: var(--text);
    font-size: 16px;
}

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

.steps-list li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text);
    line-height: 1.6;
}

.steps-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 18px;
}

.help-text {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.redirect-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 16px;
    font-weight: 500;
}

/* Responsive pour la page de confirmation */
@media (max-width: 768px) {
    .success-icon {
        font-size: 48px;
    }

    .step {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }

    .step-icon {
        font-size: 24px;
    }

    .step-content h3 {
        font-size: 16px;
    }

    .detail-item {
        padding: 10px;
    }

    .detail-label {
        font-size: 12px;
    }

    .detail-value {
        font-size: 14px;
    }
}
