/* Variables globales */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --text-color: #333;
    --background-color: #f5f6fa;
    --border-color: #dcdde1;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --tab-active-color: #3498db;
    --tab-inactive-color: #95a5a6;
}


/* reCAPTCHA styles */
.recaptcha-container {
    margin: 15px 0;
    padding: 15px;
    display: flex;
    justify-content: center;
}

/* Page de connexion */
.tictac-login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.tictac-login-box {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tictac-login-box h1 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    text-align: center;
    font-size: 24px;
}

.tictac-login-subtitle {
    text-align: center;
    color: var(--tab-inactive-color);
    margin-bottom: 30px;
}

.tictac-button-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.tictac-form-footer {
    text-align: center;
    margin-top: 20px;
}

.tictac-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.tictac-link:hover {
    text-decoration: underline;
}

/* Reset et styles de base */
.tictac-compte-patient {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation par onglets */
.tictac-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tictac-tab {
    padding: 15px 30px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--tab-inactive-color);
    font-size: 16px;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.tictac-tab:hover {
    color: var(--tab-active-color);
    background: none !important;
}

.tictac-tab.active {
    color: var(--tab-active-color);
    background: none !important;
}

.tictac-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--tab-active-color);
}

/* Contenu des onglets */
.tictac-tab-content {
    display: none;
    padding: 20px 0;
}

.tictac-tab-content.active {
    display: block;
}

/* Liste des rendez-vous */
.rendez-vous-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rendez-vous-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rendez-vous-card h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.rendez-vous-info {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.rendez-vous-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Boutons */
.tictac-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.tictac-button-primary {
    background-color: var(--secondary-color);
    color: white;
}

.tictac-button-primary:hover {
    background-color: #2980b9;
}

.tictac-button-danger {
    background-color: var(--error-color);
    color: white;
}

.tictac-button-danger:hover {
    background-color: #c0392b;
}

/* Responsive */
@media (max-width: 768px) {
    .tictac-compte-patient {
        padding: 10px;
    }

    .tictac-tabs {
        flex-direction: column;
    }

    .tictac-tab {
        width: 100%;
        text-align: left;
        padding: 12px 15px;
    }

    .rendez-vous-card {
        padding: 15px;
    }
}

/* Accessibilité */
.tictac-tab:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.tictac-button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* États de chargement */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Messages d'état */
.tictac-message {
    padding: 5px;
    border-radius: 4px;
    margin-bottom: 20px;
}

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

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

/* En-tête des rendez-vous */
.rendez-vous-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rendez-vous-header h2 {
    margin: 0;
    color: var(--primary-color);
}

/* Informations personnelles */
.patient-info {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.patient-info p {
    margin: 0 0 15px 0;
    display: flex;
    gap: 10px;
}

.patient-info strong {
    min-width: 150px;
    color: var(--primary-color);
}

/* Formulaire */
.tictac-form {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Actions */
.tictac-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
}

/* Icônes */
.icon {
    font-size: 1.2em;
}

/* Styles pour la section des rendez-vous */
.patient-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.patient-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.appointment-card {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.appointment-card:hover {
    transform: translateX(5px);
}

.appointment-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.appointment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.appointment-doctor {
    color: #444;
    margin: 0;
}

.appointment-card .tictac-button-danger {
    margin: 0;
}

.appointment-info p {
    margin: 0;
}

.appointment-date {
    font-weight: bold;
    color: #333;
}

.appointment-description {
    color: #666;
    font-style: italic;
    margin-left: 1rem;
}

.no-appointments {
    color: #6c757d;
    text-align: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.no-patients {
    color: #6c757d;
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* Styles des créneaux disponibles */
.slots-container {
    margin-top: 20px;
}

.loading-slots {
    padding: 15px;
    text-align: center;
    color: #777;
    font-style: italic;
}

.no-slots {
    padding: 15px;
    text-align: center;
    color: #777;
    font-style: italic;
    background-color: #f9f9f9;
    border-radius: 5px;
}

/* Organisation des créneaux */
.slots-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    margin-top: 20px;
}

/* Media queries pour adapter le nombre de colonnes selon la taille de l'écran */
@media screen and (max-width: 1200px) {
    .slots-days {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .slots-days {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .slots-days {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 576px) {
    .slots-days {
        grid-template-columns: repeat(1, 1fr);
    }
}

.slots-day {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 5px 5px;
    flex: 1;
    min-width: 110px;
    max-width: calc(20% - 12px);
    margin-bottom: 15px;
}

@media (max-width: 1200px) {
    .slots-day {
        max-width: calc(25% - 15px);
    }
}

@media (max-width: 992px) {
    .slots-day {
        max-width: calc(33.333% - 15px);
    }
}

@media (max-width: 768px) {
    .slots-day {
        max-width: calc(50% - 15px);
    }
}

@media (max-width: 576px) {
    .slots-day {
        max-width: 100%;
    }
}

.slots-day h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
    text-align: center;
}

.slots-hours {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slot-hour {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 14px;
}

.slot-hour:hover {
    background-color: #f0f7ff;
    border-color: #6495ED;
}

.slot-hour.selected {
    background-color: #6495ED;
    color: white;
    border-color: #5285db;
}

/* Navigation des créneaux */
.slots-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.slots-nav-button {
    background-color: #f0f7ff;
    border: 1px solid #6495ED;
    border-radius: 4px;
    padding: 2px 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6495ED;
    font-weight: 500;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.slots-nav-button:hover {
    background-color: #6495ED;
    color: white;
}

.slots-nav-button:disabled {
    background-color: #f9f9f9;
    border-color: #ddd;
    color: #aaa;
    cursor: not-allowed;
}

.slots-nav-date {
    font-weight: 500;
    text-align: center;
    color: #333;
    font-size: 14px;
}

.doctor-msg-public {
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    font-style: italic;
    color: #495057;
}

/* Styles pour l'onglet Mes Informations */
#informations .patient-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    background-color: #fdfdfd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

#informations .patient-section:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

#informations .patient-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    color: #2c3e50;
    font-size: 18px;
    border-bottom: 2px solid #6495ED;
}

#informations .patient-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

#informations .info-group {
    margin-bottom: 10px;
}

#informations .info-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

#informations .info-group p {
    margin: 0;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    color: #333;
    font-size: 15px;
}

@media (max-width: 768px) {
    #informations .patient-info {
        grid-template-columns: 1fr;
    }
}

/* Formulaire d'ajout de personne */
.add-person-form-container {
    background: #f6f9ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.add-person-form-container h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Styles pour la grille */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 40px;
}

.form-group {
    margin: 0;
}

.form-group.full-width {
    grid-column: 1 / -1; /* S'étend sur toutes les colonnes */
}

/* Styles pour les champs de formulaire */
.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

/* Responsive */
@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.tictac-button-secondary {
    background-color: #95a5a6;
    color: white;
}

.tictac-button-secondary:hover {
    background-color: #7f8c8d;
}

/* Liens pour ajouter aux calendriers */
.calendar-links {
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 14px;
}

.calendar-links a {
    color: var(--secondary-color);
    text-decoration: none;
    margin-right: 5px;
    transition: color 0.2s ease;
    padding: 3px 5px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.calendar-links a:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: #2980b9;
    text-decoration: underline;
}

.calendar-icon {
    margin-right: 5px;
}

.google-logo {
    position: relative;
    margin-left: -12px;
    margin-right: 5px;
    vertical-align: middle;
}

.apple-logo {
    position: relative;
    margin-left: -12px;
    margin-right: 5px;
    vertical-align: middle;
}