/* ===== VARIABLES CSS ===== */
:root {
    --primary-color: #000;
    --secondary-color: #1a1a1a;
    --accent-color: #007bff;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --info-color: #17a2b8;
    --text-primary: #fff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --background-primary: rgba(255, 255, 255, 0.05);
    --background-secondary: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* ===== RESET ET BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ===== HEADER ===== */
.studio-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: var(--background-primary);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.studio-header img {
    max-width: 280px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.studio-header h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.studio-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 10px;
}

/* ===== NAVIGATION ===== */
.navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.navigation button {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navigation button:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.navigation button:active {
    transform: translateY(0);
}

/* ===== CALENDRIER ===== */
.calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    background: var(--background-primary);
    padding: 30px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.day {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--info-color));
    opacity: 0.7;
}

.day:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent-color);
}

.date {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-display {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 400;
}

.times {
    display: grid;
    gap: 8px;
}

.time {
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-align: center;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

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

.time:hover::before {
    left: 100%;
}

.time.validated {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.time.validated:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.time.unavailable {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.time.unavailable:hover {
    transform: none;
    box-shadow: none;
}

/* ===== ANIMATIONS ===== */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.blinking {
    animation: blink 1s ease-in-out 2;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.time.validated:first-child {
    animation: pulse 2s ease-in-out infinite;
}

/* ===== SECTION INFORMATIONS ===== */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.info-card {
    background: var(--background-primary);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent-color);
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 8px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.info-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* ===== BOUTONS ===== */
button, .info-button {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button:hover, .info-button:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
}

/* ===== SECTION ADMIN ===== */
.admin-section {
    margin: 40px 0;
    text-align: center;
}

.admin-section details {
    background: var(--background-primary);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.admin-section summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
    transition: var(--transition);
}

.admin-section summary:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.admin-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

#password {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 1rem;
    min-width: 200px;
}

#password:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.modal-body {
    padding: 25px 30px;
}

.modal-footer {
    padding: 20px 30px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* ===== FORMULAIRES ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
}

.radio-label:hover {
    background: var(--background-secondary);
}

.radio-label input[type="radio"] {
    margin: 0;
}

.phone-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: var(--background-secondary);
}

.country-code {
    padding: 12px 15px;
    background: var(--background-primary);
    color: var(--text-primary);
    font-weight: 600;
    border-right: 1px solid var(--border-color);
}

.phone-input input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
}

.phone-input input:focus {
    outline: none;
}

.help-text {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ===== RÉSUMÉ ===== */
.summary-details {
    background: var(--background-primary);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.summary-details p {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-note {
    background: linear-gradient(135deg, var(--info-color), #20c997);
    padding: 15px;
    border-radius: 6px;
    color: white;
    text-align: center;
}

/* ===== FOOTER ===== */
.studio-footer {
    margin-top: 60px;
    background: var(--background-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 30px;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.footer-bottom {
    background: var(--background-secondary);
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow);
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

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

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

.notification-warning {
    background: var(--warning-color);
    color: #000;
}

.notification-info {
    background: var(--info-color);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .studio-header {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .studio-header img {
        max-width: 220px;
    }
    
    .calendar {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 15px;
    }
    
    .navigation {
        gap: 10px;
    }
    
    .navigation button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .info-section {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px 0;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 20px;
    }
    
    .admin-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    #password {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .day {
        padding: 15px;
    }
    
    .time {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .studio-header h1 {
        font-size: 1.8rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ===== ACCESSIBILITÉ ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour la navigation au clavier */
button:focus-visible,
input:focus-visible,
.time:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Amélioration du contraste pour l'accessibilité */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.5);
        --text-secondary: rgba(255, 255, 255, 0.9);
    }
}