/* ===== STYLES POUR LE CALENDRIER ET SÉLECTION DE DATES ===== */

/* Media queries responsive */
@media (max-width: 768px) {
    .modal-header,
    .profile-header,
    .stats-header {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .modal-content,
    .profile-content,
    .stats-content {
        padding: var(--spacing-lg);
    }

    .modal-actions {
        padding: var(--spacing-md) var(--spacing-lg);
        flex-direction: column;
    }

    .create-tab-confirm-btn,
    .cancel-btn,
    .confirm-profile-btn {
        width: 100%;
        justify-content: center;
    }

    .profiles-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .profile-option {
        padding: var(--spacing-lg);
        min-height: 60px;
    }

    .profile-option-icon {
        font-size: 24px;
        margin-bottom: var(--spacing-xs);
    }

    .profile-option-name {
        font-size: 14px;
    }

    .admin-controls {
        padding: var(--spacing-lg);
    }

    .profile-input-row,
    .email-input-row {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .admin-actions {
        flex-direction: column;
    }

    .save-profiles-btn,
    .view-stats-btn {
        width: 100%;
    }

    .current-profile-indicator {
        font-size: 12px;
        padding: 6px var(--spacing-md);
        max-width: 150px;
    }

    .current-profile-indicator .profile-name {
        max-width: 80px;
    }

    .navbar-center {
        flex: 0;
        margin: 0 var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .filter-tabs-list {
        max-height: 250px;
    }

    .tab-badges {
        gap: 2px;
    }

    .filter-badge {
        font-size: 8px;
        padding: 1px 2px;
    }

    .tab-actions {
        position: static;
        display: flex;
        justify-content: flex-end;
        background: transparent;
        padding: var(--spacing-xs) 0 0 0;
        box-shadow: none;
        margin-top: 6px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .filter-tab.active .tab-actions {
        background: transparent;
        border-top-color: rgba(255, 255, 255, 0.3);
    }

    .suggestion-text {
        font-size: 12px;
    }

    .suggestion-btn.create {
        font-size: 10px;
        padding: 5px var(--spacing-sm);
    }

    .profile-header h2 {
        font-size: 20px;
    }

    .profile-subtitle {
        font-size: 14px;
    }

    .profile-stats-modal {
        max-height: 90vh;
    }

    .profile-stat-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }

    .profile-stat-count {
        order: -1;
    }
}

/* ===== STYLES POUR LES INFORMATIONS DE CLASSIFICATION ===== */

/* 1. Badge de statut amélioré avec détails de classification */
.email-status-badge.classified {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.badge-main {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.classification-details {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.classification-who,
.classification-when,
.classification-type {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 3px;
}

.classification-who:last-child,
.classification-when:last-child,
.classification-type:last-child {
    margin-bottom: 0;
}

/* 2. Mini-info de classification dans la liste d'emails */
.classification-mini-info {
    font-size: 10px;
    opacity: 0.8;
    font-weight: normal;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* 3. Badge classifié amélioré dans la liste */
.classified-badge {
    position: relative;
    background: #10b981;
    color: white;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    cursor: help;
    transition: all 0.2s ease;
}

.classified-badge:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* 4. Tooltip personnalisé pour les infos de classification */
.classified-badge[title] {
    position: relative;
}

.classified-badge[title]:hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeInTooltip 0.2s ease;
}

.classified-badge[title]:hover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-bottom-color: #1f2937;
    z-index: 1001;
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 5. Indicateurs visuels pour différents types de classification */
.classification-type-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.classification-type-classifier .classification-type-indicator {
    background: #3b82f6;
    /* Bleu pour "lu/classifié" */
}

.classification-type-rendez-vous .classification-type-indicator {
    background: #f59e0b;
    /* Orange pour "rendez-vous" */
}

.classification-type-relance .classification-type-indicator {
    background: #ef4444;
    /* Rouge pour "relance" */
}

.classification-type-nouveau-dossier .classification-type-indicator {
    background: #8b5cf6;
    /* Violet pour "nouveau dossier" */
}

.classification-type-relancer .classification-type-indicator {
    background: #f97316;
    /* Orange foncé pour "à relancer" */
}

.classification-type-important .classification-type-indicator {
    background: #eab308;
    /* Jaune pour "important" */
}

/* 6. Styles pour le mode vue détail */
.email-detail-classification-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
    font-size: 13px;
}

.email-detail-classification-info h5 {
    margin: 0 0 8px 0;
    color: #374151;
    font-weight: 600;
}

.classification-info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 12px;
    align-items: center;
}

.classification-info-label {
    font-weight: 500;
    color: #6b7280;
}

.classification-info-value {
    color: #374151;
}

/* 7. Animation de chargement pour les infos de classification */
.classification-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(6, 95, 70, 0.3);
    border-top: 2px solid #065f46;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

.classification-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: rgba(6, 95, 70, 0.8);
    font-style: italic;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 8. État de chargement pour le badge */
.classified-badge.loading {
    background: #6b7280;
    animation: pulse 1.5s ease-in-out infinite;
}

.classified-badge.loading::after {
    content: "...";
    animation: dots 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes dots {

    0%,
    20% {
        color: transparent;
        text-shadow: .25em 0 0 transparent, .5em 0 0 transparent;
    }

    40% {
        color: white;
        text-shadow: .25em 0 0 transparent, .5em 0 0 transparent;
    }

    60% {
        text-shadow: .25em 0 0 white, .5em 0 0 transparent;
    }

    80%,
    100% {
        text-shadow: .25em 0 0 white, .5em 0 0 white;
    }
}

/* 9. Responsive design pour les infos de classification */
@media (max-width: 768px) {
    .classification-details {
        font-size: 11px;
        padding: 6px;
    }

    .classification-mini-info {
        font-size: 9px;
        max-width: 60px;
    }

    .classified-badge {
        min-width: 60px;
        font-size: 10px;
    }
}

/* 11. Indicateur de profil dans la classification */
.classification-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 4px;
}

/* 12. Styles pour les statistiques de classification */
.classification-stats-summary {
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.classification-stats-summary h4 {
    margin: 0 0 8px 0;
    color: #5b21b6;
}

.classification-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.classification-stat-item {
    background: white;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.classification-stat-number {
    font-size: 18px;
    font-weight: bold;
    color: #5b21b6;
}

.classification-stat-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

/* ===== STYLES POUR L'AUTOCOMPLÉTION SAVETODRIVE ===== */

/* Container principal de l'autocomplétion */
.savetodrive-autocomplete-container {
    position: relative;
    width: 100%;
}

/* Wrapper pour l'input avec préfixe */
.savetodrive-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
}

.savetodrive-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Préfixe "SaveToDrive/" */
.savetodrive-input-wrapper .savetodrive-prefix {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    border-right: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    min-height: 44px;
    font-family: 'Courier New', monospace;
    user-select: none;
}

/* Input principal */
.savetodrive-autocomplete-input {
    flex: 1;
    padding: 12px 14px;
    border: none;
    font-size: 14px;
    background: transparent;
    color: #374151;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    outline: none;
    min-width: 0;
}

.savetodrive-autocomplete-input::placeholder {
    color: #9ca3af;
    font-style: italic;
    font-family: inherit;
}

/* Liste des suggestions */
.savetodrive-suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: -2px;
    /* Pour coller avec l'input */
}

.savetodrive-suggestions-list::-webkit-scrollbar {
    width: 6px;
}

.savetodrive-suggestions-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.savetodrive-suggestions-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.savetodrive-suggestions-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Items de suggestion */
.savetodrive-suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.15s ease;
    gap: 10px;
    background: white;
}

.savetodrive-suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.savetodrive-suggestion-item:hover:not(.no-results) {
    background-color: #f8fafc;
}

.savetodrive-suggestion-item.highlighted {
    background-color: #eff6ff;
    border-color: #dbeafe;
}

.savetodrive-suggestion-item.exact-match {
    background-color: #f0fdf4;
    border-left: 4px solid #10b981;
    padding-left: 10px;
}

.savetodrive-suggestion-item.exact-match:hover {
    background-color: #dcfce7;
}

.savetodrive-suggestion-item.create-new {
    background-color: #fefce8;
    border-left: 4px solid #eab308;
    padding-left: 10px;
}

.savetodrive-suggestion-item.create-new:hover {
    background-color: #fef3c7;
}

.savetodrive-suggestion-item.no-results {
    background-color: #f9fafb;
    color: #64748b;
    font-style: italic;
    cursor: default;
    text-align: center;
    padding: 20px 14px;
    justify-content: center;
}

/* Icônes des suggestions */
.savetodrive-suggestion-item .suggestion-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.savetodrive-suggestion-item.exact-match .suggestion-icon {
    color: #10b981;
}

.savetodrive-suggestion-item.create-new .suggestion-icon {
    color: #eab308;
}

.savetodrive-suggestion-item.no-results .suggestion-icon {
    color: #64748b;
}

/* Contenu des suggestions */
.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.suggestion-info {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.savetodrive-suggestion-item.exact-match .suggestion-name {
    color: #059669;
}

.savetodrive-suggestion-item.create-new .suggestion-name {
    color: #d97706;
}

/* États de validation du container */
.savetodrive-autocomplete-container.valid .savetodrive-input-wrapper {
    border-color: #10b981;
    background: #f0fdf4;
}

.savetodrive-autocomplete-container.valid .savetodrive-prefix {
    background: linear-gradient(135deg, #10b981, #059669);
}

.savetodrive-autocomplete-container.invalid .savetodrive-input-wrapper {
    border-color: #ef4444;
    background: #fef2f2;
}

.savetodrive-autocomplete-container.invalid .savetodrive-prefix {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.savetodrive-autocomplete-container.warning .savetodrive-input-wrapper {
    border-color: #f59e0b;
    background: #fef3c7;
}

.savetodrive-autocomplete-container.warning .savetodrive-prefix {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Aide et aperçu */
.savetodrive-help {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
}

.savetodrive-help small {
    color: #64748b;
    display: block;
    margin-bottom: 4px;
}

.savetodrive-help small:last-child {
    margin-bottom: 0;
}

.savetodrive-autocomplete-hint {
    color: #3b82f6 !important;
    font-weight: 500 !important;
}

/* Aperçu en temps réel */
#savetodrive-preview {
    font-size: 12px;
    color: #3b82f6;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    background: #eff6ff;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 120px;
    text-align: center;
}

/* Animation pour l'apparition des suggestions */
.savetodrive-suggestions-list {
    animation: slideDownSuggestions 0.2s ease-out;
}

@keyframes slideDownSuggestions {
    from {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 280px;
    }
}

/* Animation pour les items de suggestion */
.savetodrive-suggestion-item {
    animation: fadeInSuggestion 0.15s ease-out;
}

@keyframes fadeInSuggestion {
    from {
        opacity: 0;
        transform: translateX(-4px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation de focus */
.savetodrive-input-wrapper:focus-within .savetodrive-prefix {
    animation: prefixFocusGlow 0.3s ease;
}

@keyframes prefixFocusGlow {
    0% {
        box-shadow: none;
    }

    50% {
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
    }

    100% {
        box-shadow: none;
    }
}

/* Hover effects avancés */
.savetodrive-suggestion-item:not(.no-results):hover {
    transform: translateX(2px);
}

.savetodrive-suggestion-item.highlighted:not(.no-results) {
    transform: translateX(3px);
    box-shadow: inset 4px 0 0 #3b82f6;
}

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

.savetodrive-autocomplete-container.loading .savetodrive-input-wrapper::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .savetodrive-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        border-radius: 8px;
    }

    .savetodrive-input-wrapper .savetodrive-prefix {
        border-right: none;
        border-bottom: 2px solid #e5e7eb;
        text-align: center;
        border-radius: 8px 8px 0 0;
        padding: 10px 12px;
        min-height: 40px;
    }

    .savetodrive-autocomplete-input {
        border-radius: 0 0 8px 8px;
        text-align: center;
        padding: 10px 12px;
    }

    .savetodrive-suggestions-list {
        margin-top: 4px;
        border-radius: 8px;
        border-top: 2px solid #e2e8f0;
    }

    .savetodrive-suggestion-item {
        padding: 10px 12px;
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .suggestion-content {
        text-align: center;
    }

    .suggestion-name,
    .suggestion-info {
        text-align: center;
        white-space: normal;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .savetodrive-input-wrapper .savetodrive-prefix {
        font-size: 12px;
        padding: 8px 10px;
    }

    .savetodrive-autocomplete-input {
        font-size: 12px;
        padding: 8px 10px;
    }

    .savetodrive-suggestions-list {
        max-height: 200px;
    }

    .savetodrive-suggestion-item {
        padding: 8px 10px;
    }

    .suggestion-name {
        font-size: 12px;
    }

    .suggestion-info {
        font-size: 11px;
    }

    .savetodrive-help {
        font-size: 11px;
        padding: 8px 10px;
    }
}

/* Amélioration de l'accessibilité */
.savetodrive-autocomplete-input:focus {
    outline: none;
}

.savetodrive-input-wrapper:focus-within {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* Indicateurs visuels améliorés */
.savetodrive-suggestion-item[role="option"][aria-selected="true"] {
    background-color: #eff6ff;
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* Transition fluide pour le changement d'état */
.savetodrive-autocomplete-container * {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Badge pour indiquer le nombre de résultats */
.suggestions-count-badge {
    position: absolute;
    top: -8px;
    right: 8px;
    background: #3b82f6;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    z-index: 1001;
}

/* Style pour l'état "en cours de frappe" */
.savetodrive-autocomplete-container.typing .savetodrive-input-wrapper {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.savetodrive-autocomplete-container.typing .savetodrive-prefix {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Effet de brillance lors de la sélection */
.savetodrive-suggestion-item.selected {
    background: linear-gradient(90deg, #eff6ff, #dbeafe, #eff6ff);
    background-size: 200% 100%;
    animation: shimmer 0.8s ease-in-out;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===========================================
   STYLES POUR L'INTÉGRATION GOOGLE CALENDAR
   =========================================== */

.calendar-integration-option {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #1e293b;
    gap: 8px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label:hover .checkmark {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

/* Amélioration du champ time */
#quick-rdv-time {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
}

/* Amélioration du select de durée */
#quick-rdv-duration {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    color: #374151;
}

#quick-rdv-duration:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Indicateur de succès Calendar */
.calendar-success-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #059669;
    font-size: 12px;
    font-weight: 500;
    background: #d1fae5;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.calendar-error-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    background: #fee2e2;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

/* Animation pour les toast de rendez-vous */
.toast-item.calendar-success {
    border-left: 4px solid #059669;
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
}

.toast-item.calendar-success .toast-message {
    color: #065f46;
}

/* Styles pour le formulaire de rendez-vous */
.rendez-vous-form {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border: 1px solid #3b82f6;
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
}

.rendez-vous-form .form-group:last-child {
    margin-bottom: 0;
}

/* Styles pour les notifications de rendez-vous */
.rdv-notification {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #3b82f6;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.rdv-notification-icon {
    font-size: 20px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.rdv-notification-content {
    flex: 1;
}

.rdv-notification-title {
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 2px;
}

.rdv-notification-details {
    font-size: 13px;
    color: #1e3a8a;
    opacity: 0.8;
}

/* Responsive pour mobile */
@media (max-width: 640px) {
    .calendar-integration-option {
        padding: 10px;
    }

    .checkbox-label {
        font-size: 14px;
    }

    .form-help {
        font-size: 11px;
    }

    #quick-rdv-time,
    #quick-rdv-duration {
        font-size: 16px;
        /* Évite le zoom sur iOS */
    }
}

.calendar-integration-info {
    margin-top: 10px;
}

.calendar-info-box {
    display: flex;
    align-items: center;
    padding: 12px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #2196f3;
    border-radius: 8px;
    margin-bottom: 8px;
}

.calendar-info-icon {
    font-size: 24px;
    margin-right: 12px;
    animation: pulse 2s infinite;
}

.calendar-info-text {
    flex: 1;
}

.calendar-info-text strong {
    color: #1976d2;
    font-size: 14px;
}

.calendar-info-text small {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.invitees-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    background-color: #f9fafb;
}

.suggested-invitees {
    margin-bottom: 16px;
}

.invitee-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.invitee-suggestion {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px;
    transition: all 0.2s ease;
}

.invitee-suggestion:hover {
    border-color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.invitee-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    width: 100%;
}

.invitee-checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.invitee-label {
    flex: 1;
    line-height: 1.4;
}

.invitee-role {
    color: #6b7280;
    font-size: 0.9em;
}

.manual-invitee-input {
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.manual-input-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.manual-input-group input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.add-invitee-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
}

.add-invitee-btn:hover {
    background: #059669;
}

.manual-invitee-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
}

.remove-invitee-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-invitee-btn:hover {
    background: #dc2626;
}

.selected-invitees-preview {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.invitees-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    min-height: 30px;
    align-items: center;
}

.selected-invitee-tag {
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.meet-link-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.meet-notification-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.meet-icon {
    font-size: 20px;
}

.meet-close-btn {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.meet-link-container {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.meet-link-input {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    min-width: 200px;
}

.copy-meet-btn,
.open-meet-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.copy-meet-btn:hover,
.open-meet-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.meet-attendees {
    margin-top: 8px;
    opacity: 0.9;
}

.ai-analyze-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.ai-analyze-btn:hover {
    transform: scale(1.05);
}

/* Animation pour le warning "no-rdv" */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.no-rdv-warning {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.manual-load-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.manual-load-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.manual-load-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ==========================================
   STYLES POUR LES RENDEZ-VOUS MULTIPLES
   ========================================== */

.multiple-rdv-container {
    max-width: 100%;
    margin: 0;
}

.appointment-item {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 20px;
    background: #fefefe;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.appointment-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.appointment-item.ai-suggested {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #f0f9ff 0%, #fefefe 100%);
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 10px 10px 0 0;
}

.appointment-header h4 {
    margin: 0;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
}

.appointment-actions {
    display: flex;
    gap: 8px;
}

.remove-appointment-btn,
.toggle-details-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.remove-appointment-btn:hover {
    background: #fee2e2;
}

.toggle-details-btn:hover {
    background: #e5e7eb;
}

.appointment-details {
    padding: 20px;
    display: block;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

.add-appointment-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.add-appointment-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* ==========================================
   INDICATEURS IA AMÉLIORÉS
   ========================================== */

.ai-confidence-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background: #f0f9ff;
    border-radius: 6px;
    border: 1px solid #bfdbfe;
}

.confidence-label {
    font-size: 12px;
    font-weight: 500;
    color: #1e40af;
}

.confidence-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
    transition: width 0.3s ease;
}

.confidence-text {
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
}

.ai-reasoning {
    margin-top: 10px;
    padding: 8px;
    background: #fef3c7;
    border-radius: 4px;
    border-left: 4px solid #f59e0b;
}

.ai-reasoning small {
    color: #92400e;
    font-style: italic;
}

/* ==========================================
   INVITÉS POUR CHAQUE RDV
   ========================================== */

.invitees-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

.invitee-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.invitee-suggestion {
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    transition: all 0.2s;
}

.invitee-suggestion:hover {
    background: #f8fafc;
}

.invitee-suggestion.ai-suggested {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.invitee-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.invitee-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.invitee-label {
    flex: 1;
    line-height: 1.4;
}

.invitee-role {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
}

.selected-invitees-preview {
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
    margin-top: 15px;
}

.invitees-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.selected-invitee-tag {
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* ==========================================
   ÉTATS ET ANIMATIONS
   ========================================== */

.appointment-item.processing {
    opacity: 0.7;
    pointer-events: none;
}

.appointment-item.success {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #fefefe 100%);
}

.appointment-item.error {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fefefe 100%);
}
