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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #FFFFFF;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: #4A90E2;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #FFFFFF;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.btn-primary {
    background-color: #FFFFFF;
    color: #4A90E2;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #f0f0f0;
}

/* Messages */
.messages-container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 20px;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: #FFFFFF;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-hero {
    display: inline-block;
    background-color: #FFFFFF;
    color: #4A90E2;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Psychologue Section */
.psychologue-section {
    padding: 4rem 0;
    background-color: #F8FBFF;
}

.psychologue-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    background-color: #FFFFFF;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.1);
}

.psychologue-image {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.image-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.2);
}

.psychologue-info h2 {
    color: #4A90E2;
    margin-bottom: 0.5rem;
}

.specialite {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.description {
    margin-bottom: 2rem;
    color: #555;
}

.specialites-list h3 {
    color: #4A90E2;
    margin-bottom: 1rem;
}

.specialites-list ul {
    list-style: none;
    padding-left: 0;
}

.specialites-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.specialites-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4A90E2;
    font-weight: bold;
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
    background-color: #FFFFFF;
}

.contact-section h2 {
    text-align: center;
    color: #4A90E2;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-item {
    text-align: center;
    padding: 2rem;
    background-color: #F8FBFF;
    border-radius: 10px;
    transition: transform 0.3s;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-item h3 {
    color: #4A90E2;
    margin-bottom: 0.5rem;
}

/* Map Section */
.map-section {
    padding: 4rem 0;
    background-color: #F8FBFF;
}

.map-section h2 {
    text-align: center;
    color: #4A90E2;
    margin-bottom: 2rem;
}

#map {
    height: 400px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.15);
}

/* Reservation Section */
.reservation-section {
    padding: 4rem 0;
    background-color: #F8FBFF;
    min-height: calc(100vh - 200px);
}

.reservation-header {
    text-align: center;
    margin-bottom: 3rem;
}

.reservation-header h1 {
    color: #4A90E2;
    margin-bottom: 1rem;
}

.reservation-form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #FFFFFF;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.1);
}

.reservation-form .form-group {
    margin-bottom: 1.5rem;
}

.reservation-form label {
    display: block;
    color: #4A90E2;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.reservation-form input,
.reservation-form select,
.reservation-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #E3F2FD;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s;
}

.reservation-form input:focus,
.reservation-form select:focus,
.reservation-form textarea:focus {
    outline: none;
    border-color: #4A90E2;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-submit {
    flex: 1;
    background-color: #4A90E2;
    color: #FFFFFF;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #357ABD;
}

.btn-cancel {
    flex: 1;
    background-color: #FFFFFF;
    color: #4A90E2;
    padding: 1rem;
    border: 2px solid #4A90E2;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background-color: #4A90E2;
    color: #FFFFFF;
}

/* Date Input Styling */
.date-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.date-input-wrapper input[type="date"] {
    width: 100%;
    padding: 0.8rem 2.5rem 0.8rem 0.8rem;
    border: 2px solid #E3F2FD;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
    background-color: #FFFFFF;
    cursor: pointer;
}

.date-input-wrapper input[type="date"]:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.date-icon {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

/* Hours Selection */
.hour-help-text {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.hour-btn {
    padding: 0.8rem 1rem;
    background-color: #FFFFFF;
    border: 2px solid #E3F2FD;
    border-radius: 8px;
    color: #4A90E2;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.hour-btn:hover {
    background-color: #F8FBFF;
    border-color: #4A90E2;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.2);
}

.hour-btn.selected {
    background-color: #4A90E2;
    color: #FFFFFF;
    border-color: #4A90E2;
    box-shadow: 0 3px 15px rgba(74, 144, 226, 0.3);
}

.hour-btn.selected:hover {
    background-color: #357ABD;
    border-color: #357ABD;
}

.selected-hours-display {
    padding: 1rem;
    background-color: #F8FBFF;
    border-radius: 8px;
    border: 2px dashed #4A90E2;
}

.selected-hours-display strong {
    color: #4A90E2;
    margin-right: 0.5rem;
}

.selected-hours-display span {
    color: #333;
    font-weight: 500;
}

/* Admin Login */
.admin-login-section {
    padding: 6rem 0;
    background-color: #F8FBFF;
    min-height: calc(100vh - 200px);
}

.admin-login-container {
    max-width: 450px;
    margin: 0 auto;
    background-color: #FFFFFF;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.1);
    text-align: center;
}

.admin-login-container h1 {
    color: #4A90E2;
    margin-bottom: 1rem;
}

.admin-login-container p {
    color: #666;
    margin-bottom: 2rem;
}

.admin-login-form .form-group {
    margin-bottom: 2rem;
    text-align: left;
}

/* Admin Section */
.admin-section {
    padding: 3rem 0;
    background-color: #F8FBFF;
    min-height: calc(100vh - 200px);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    color: #4A90E2;
}

.btn-logout {
    background-color: #dc3545;
    color: #FFFFFF;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #c82333;
}

.rendez-vous-table-container {
    background-color: #FFFFFF;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.1);
}

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

.rendez-vous-table th {
    background-color: #4A90E2;
    color: #FFFFFF;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.rendez-vous-table td {
    padding: 1rem;
    border-bottom: 1px solid #E3F2FD;
}

.rendez-vous-table tr:hover {
    background-color: #F8FBFF;
}

.message-cell {
    max-width: 200px;
    word-wrap: break-word;
}

.no-rendez-vous {
    background-color: #FFFFFF;
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
    color: #666;
}

.admin-controls {
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-controls {
    position: sticky;
    top: 70px; /* under navbar */
    z-index: 20;
    background: transparent;
}
.search-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }
    .search-row input[type="text"], .search-row input[type="date"] {
        width: 100%;
    }
    .search-row .btn-primary {
        width: 100%;
    }
}
.search-row input[type="text"], .search-row input[type="date"] {
    padding: 0.6rem;
    border: 2px solid #E3F2FD;
    border-radius: 8px;
}
.table-footer {
    padding: 1rem 1.2rem;
    text-align: center;
}
/* Keep table at comfortable width and make it horizontally scrollable on small screens */
.rendez-vous-table-container {
    overflow-x: auto;
    /* reduce inner padding so table can use more horizontal space */
    padding: 0.6rem 8px;
}
.rendez-vous-table {
    /* allow the table to naturally fill container width on large screens */
    min-width: 0;
    width: 100%;
}

/* Make small action buttons consistent width */
.btn-delete-small, .btn-back {
    min-width: 110px;
    text-align: center;
}

/* Detail card (reuse reservation card styling) */
.detail-section .detail-card {
    max-width: 800px;
    margin: 1.5rem auto;
    background-color: #FFFFFF;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.08);
}

/* Action buttons matching site theme */
.btn-delete {
    background-color: #dc3545;
    color: #FFFFFF;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-delete:hover { background-color: #c82333; }

.btn-back {
    background-color: #FFFFFF;
    color: #4A90E2;
    padding: 0.8rem 1.2rem;
    border: 2px solid #4A90E2;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-left: 0.8rem;
}
.btn-back:hover {
    background-color: #4A90E2;
    color: #FFFFFF;
}

/* Small action buttons for table rows */
.btn-delete-small {
    background-color: #ffffff;
    color: #dc3545;
    border: 1px solid #f5c6cb;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.btn-delete-small:hover { background-color: #fdecea; }

.btn-view {
    background-color: transparent;
    color: #4A90E2;
    padding: 0.35rem 0.6rem;
    margin-left: 0.5rem;
    text-decoration: none;
    font-weight: 600;
}
.btn-view:hover { text-decoration: underline; }

/* Ensure actions column wraps nicely on small screens */
@media (max-width: 768px) {
    .rendez-vous-table td > form, .rendez-vous-table td > a {
        display: block;
        margin-bottom: 0.4rem;
    }
    .rendez-vous-table td {
        white-space: normal;
    }
}

/* On most desktop/larger screens, let the table expand fully and avoid internal vertical scrolling.
   On smaller screens the table keeps a max-height and scrolls vertically when necessary. */
@media (min-width: 1024px) {
    .rendez-vous-table-container {
        /* allow it to grow with content so no Y scrollbar is shown when there's room */
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 1023px) {
    .rendez-vous-table-container {
        /* keep table constrained on small screens so the page remains usable */
        max-height: calc(100vh - 240px);
        overflow-y: auto;
    }
}

/* Admin page: make the admin container wider and reduce side gutters so table sits closer to edges */
.admin-section .container {
    max-width: 100%;
    padding: 0 12px;
}

/* Make the table container span most of the viewport on large screens */
@media (min-width: 1200px) {
    .rendez-vous-table-container {
        padding-left: 16px;
        padding-right: 16px;
        margin-left: -12px; /* nudge towards edges */
        margin-right: -12px;
    }
}

/* Footer */
footer {
    background-color: #4A90E2;
    color: #FFFFFF;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .psychologue-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hours-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.6rem;
    }
    
    .hour-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .reservation-form-container {
        padding: 2rem 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hours-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
