/* (v1.17.13) Ajout de box-sizing global */
*, *::before, *::after {
    box-sizing: border-box;
}

/**
 * FEUILLE DE STYLE PRINCIPALE (v7.15 FINAL)
 * - Navigation : Tiroir (Drawer)
 * - Login : Support SSO (Microsoft) & Centrage
 * - Sidebar : Sticky 140px
 * - Vue Jour : Compatible HTML complet
 * - FIX PUBLIC : Champ recherche & Bouton Azure actifs
 */

.df-calendar-wrapper { 
    max-width: 100%; 
    margin: 20px auto; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ==========================================================================
   1. BARRE D'OUTILS & TIROIR
   ========================================================================== */

.df-calendar-nav { 
    display: block; 
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
    border: none;
    border-radius: 0;
}
.df-calendar-nav h3 { display: none; }

.df-calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    z-index: 20;
}

.df-toolbar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- RECHERCHE (FIX PUBLIC AJOUTÉ ICI) --- */
.df-search-wrapper {
    flex-grow: 1;
    min-width: 200px;
    position: relative;
}

/* On cible les DEUX IDs (Privé et Public) */
#df-calendar-search, 
#df-calendar-search-public {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 20px; /* Bord rond */
    font-size: 14px;
    height: 38px;
    transition: border-color 0.3s;
    background-color: #fff;
    color: #333;
    appearance: none; /* Reset natif */
}

#df-calendar-search:focus, 
#df-calendar-search-public:focus {
    border-color: #5e4682;
    outline: none;
    box-shadow: 0 0 0 2px rgba(94, 70, 130, 0.1);
}

/* Suggestions */
.df-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 5px;
}
.df-search-suggestions h4 {
    font-size: 0.8em;
    text-transform: uppercase;
    color: #777;
    font-weight: bold;
    padding: 8px 12px;
    margin: 0;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    border-top: 1px solid #eee;
}
.df-search-suggestions h4:first-child { border-top: none; }
.df-suggestion-item {
    display: block;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 0.9em;
    color: #333;
    text-decoration: none;
}
.df-suggestion-item:last-child { border-bottom: none; }
.df-suggestion-item:hover { background: #f9f9f9; color: #5e4682; }
.df-suggestion-item-code { float: right; color: #999; font-size: 0.8em; }
.df-search-no-results { padding: 15px; font-style: italic; color: #777; text-align: center; }
.df-search-loading { padding: 10px; font-style: italic; font-size: 0.9em; }

/* Navigation Date */
.df-date-nav {
    background: #f4f4f4;
    padding: 3px;
    border-radius: 20px;
    display: flex;
    align-items: center;
}
.df-select-compact {
    background: transparent;
    border: none;
    font-weight: bold;
    color: #333;
    padding: 0 10px;
    cursor: pointer;
    font-size: 14px;
    height: 30px;
    outline: none;
}
.df-btn-nav {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    padding: 0;
    cursor: pointer;
    color: #5e4682;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}
.df-btn-nav:hover {
    background: #5e4682;
    color: #fff;
    border-color: #5e4682;
}

/* Bouton Filtre */
.df-btn-filter {
    background: #fff;
    border: 1px solid #ccc;
    padding: 0 15px;
    height: 36px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}
.df-btn-filter.active {
    background: #5e4682;
    color: white;
    border-color: #5e4682;
}

/* Tiroir (Drawer) */
.df-filters-drawer {
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-top: none;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    margin-top: -5px;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.02);
}

.df-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.df-nav-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.df-nav-group label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    margin-bottom: 5px;
    text-transform: uppercase;
}
.df-nav-group select {
    width: 100%;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    height: 38px;
    font-size: 14px;
}

.df-drawer-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#df-calendar-show-my-profile,
#df-calendar-show-my-company {
    background-color: #ffffff;
    border: 1px solid #5e4682;
    color: #5e4682;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s;
}
#df-calendar-show-my-profile:hover,
#df-calendar-show-my-company:hover {
    background-color: #5e4682;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(94, 70, 130, 0.2);
}

/* ==========================================================================
   2. MISE EN PAGE & GRILLE
   ========================================================================== */

.df-calendar-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
}
.df-calendar-sidebar { 
    position: -webkit-sticky; 
    position: sticky;
    top: 140px; 
    align-self: flex-start; 
}
.df-calendar-sticky-nav { display: none; } 

.df-calendar-title {
    font-size: 1.8em;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.df-calendar-grid { 
    display: grid; 
    table-layout: fixed; 
    grid-template-columns: 50px repeat(5, 1fr) 0.5fr 0.5fr; 
    border-left: 1px solid #e0e0e0; 
    border-top: 1px solid #e0e0e0; 
}

.df-calendar-header { 
    font-weight: bold; 
    text-align: center; 
    padding: 10px 5px; 
    background: #f5f5f5; 
    border-right: 1px solid #e0e0e0; 
    border-bottom: 1px solid #e0e0e0; 
    font-size: 0.85em; 
}
.df-calendar-week-header, .df-calendar-week-number {
    font-weight: bold;
    text-align: center;
    padding: 10px 5px;
    background: #f5f5f5;
    border-right: 1px solid #e0e0e0; 
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9em;
    writing-mode: vertical-rl; 
    transform: rotate(180deg); 
}
.df-calendar-week-number {
    background: #fcfcfc;
    font-size: 0.85em;
    color: #777;
}

.df-calendar-week-header { background-color: rgba(94, 70, 130, 0.05); }
.df-calendar-week-number { background-color: rgba(94, 70, 130, 0.02); }
.df-calendar-header:nth-child(7), .df-calendar-header:nth-child(8) { background-color: #f0f0f0; }
.df-calendar-day:nth-child(8n+7), .df-calendar-day:nth-child(8n+8) { background-color: #f9f9f9; }
.df-calendar-day:nth-child(8n+7).is-padding, .df-calendar-day:nth-child(8n+8).is-padding { background-color: #f7f7f7; }

.df-calendar-day { 
    border-right: 1px solid #e0e0e0; 
    border-bottom: 1px solid #e0e0e0; 
    padding: 8px; 
    min-height: 120px; 
    background: #fff; 
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer; 
}
.df-calendar-day.is-padding { background: #fdfdfd; cursor: default; } 
.df-calendar-day-number { font-weight: bold; font-size: 0.9em; color: #333; }

.df-calendar-day.is-highlighted {
    outline: 3px solid #5e4682; 
    outline-offset: -2px; 
    box-shadow: 0 0 8px rgba(94, 70, 130, 0.5);
}

/* ==========================================================================
   3. ÉLÉMENTS SESSION
   ========================================================================== */

.df-session-item { 
    color: #fff; 
    padding: 5px 8px; 
    border-radius: 4px; 
    font-size: 0.85em; 
    margin-top: 5px; 
    cursor: pointer; 
    transition: background 0.2s, opacity 0.3s;
    height: 2.2em; 
    line-height: 1.2em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
}
.df-session-item:hover { opacity: 1 !important; transform: scale(1.02); }
.df-session-item.is-faded { opacity: 0.4; }

.df-session-item.style-internal {
    background-color: #fff !important;
    border: 2px solid; 
    color: #333 !important; 
    line-height: 1.0em; 
    padding: 3px 6px; 
}
.df-session-item.style-external {
    border: 2px solid #000;
    padding: 3px 6px; 
    line-height: 1.0em; 
}
.df-session-item.style-past {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* ==========================================================================
   4. SIDEBAR & DETAILS
   ========================================================================== */

.df-session-card { 
    background: #fff; 
    border: 1px solid #e0e0e0; 
    border-radius: 5px; 
    padding: 15px 20px; 
    margin-bottom: 20px;
}

.df-session-card h3.df-session-training-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: 700;
    color: #fff;
    padding: 10px 15px;
    border-radius: 4px;
}

.df-session-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9em;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.df-meta-item {
    background: #f4f4f4;
    border-radius: 4px;
    padding: 5px 10px;
    flex-grow: 1;
    text-align: center;
    border: 1px solid #e0e0e0;
}
.df-meta-item strong {
    display: block;
    font-size: 0.85em;
    color: #777;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.df-meta-item span { font-weight: 600; color: #333; }

.df-session-date-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.df-session-date-clickable {
    font-weight: 600;
    color: #5e4682; 
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95em;
    background-color: rgba(94, 70, 130, 0.05); 
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}
.df-session-date-clickable:hover {
    background-color: rgba(94, 70, 130, 0.1);
    filter: brightness(1.1);
}
.df-session-date-clickable svg { width: 16px; height: 16px; stroke: #5e4682; }

.df-session-modality-tag {
    font-size: 0.85em;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    color: #333;
    background-color: #f0f0f0;
    text-transform: capitalize;
}

.df-trainee-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.df-trainee-tag {
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #5e4682; 
    border-radius: 4px;
    padding: 6px 12px;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.2s;
}
.df-trainee-tag:hover {
    background: #f9f9f9;
    border-color: #ccc;
    color: #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.df-trainee-link {
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}
.df-trainee-link:hover { color: var(--trainee-hover-color, #5e4682); }

a.df-trainee-company-link { text-decoration: none; }
.df-trainee-company-subtitle {
    display: block;
    font-size: 0.95em;
    font-weight: 500;
    color: #777;
    margin-top: -5px;
    margin-bottom: 15px;
    transition: color 0.2s;
}
a.df-trainee-company-link:hover .df-trainee-company-subtitle { color: #5e4682; }

.df-back-to-session, .df-back-to-trainee {
    display: inline-block;
    margin-bottom: 15px;
    color: #5e4682;
    text-decoration: none;
    font-size: 0.9em;
}
.df-back-to-session:hover, .df-back-to-trainee:hover { text-decoration: underline; }

/* ==========================================================================
   5. LISTES ET TIROIRS (Inscriptions, Historique)
   ========================================================================== */

.df-toggle-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.df-toggle-link h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    font-size: 1.1em;
}
.df-toggle-link h4 span.is-open:last-child { transform: rotate(90deg); }

.df-session-registration {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}
.df-session-registration .df-toggle-link h4 {
    background-color: #5e4682;
    color: #fff;
    padding: 10px 15px;
    border-radius: 4px;
}
.df-registration-drawer { overflow: hidden; padding-top: 15px; }
.df-registration-form-group { display: flex; flex-direction: column; gap: 10px; }
.df-registration-form-group label { font-weight: bold; font-size: 0.9em; }
.df-registration-form-group textarea {
    width: 100%;
    min-height: 100px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}
.df-registration-submit {
    background-color: #5e4682;
    border: 1px solid #5e4682;
    color: #fff !important;
    padding: 0 12px;
    height: 38px; 
    line-height: 38px;
    font-size: 0.95em; 
    font-weight: 600 !important; 
    cursor: pointer;
    border-radius: 4px;
    text-align: center;
    align-self: flex-start;
}
.df-registration-status {
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    display: none;
}
.df-registration-status.is-success { background-color: #dff0d8; border: 1px solid #d6e9c6; color: #3c763d; }
.df-registration-status.is-error { background-color: #f2dede; border: 1px solid #ebccd1; color: #a94442; }

.df-past-sessions-toggle .df-toggle-link h4 { margin-bottom: 10px; }
.df-past-sessions-content { overflow: hidden; }

/* LISTE SESSIONS (Standard) */
.df-trainee-session-cards { list-style-type: none; padding: 0; margin: 0; }
.df-trainee-session-cards li {
    margin-bottom: 10px;
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.df-trainee-session-cards li:hover { box-shadow: 0 4px 10px rgba(0,0,0,0.05); border-color: #ccc; }
.df-trainee-session-cards a.df-trainee-session-link {
    display: flex;
    align-items: stretch;
    text-decoration: none;
    color: #333;
    border: none;
    background: transparent;
    box-shadow: none;
}
.session-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background-color: #ccc; 
    color: #fff;
    flex-shrink: 0;
    min-width: 65px;
    border-top-left-radius: 4px; 
    border-bottom-left-radius: 4px;
}
.session-card-day { font-size: 1.8em; font-weight: bold; line-height: 1; }
.session-card-month { font-size: 0.9em; font-weight: 600; text-transform: uppercase; }
.session-card-info { padding: 10px 15px; flex-grow: 1; }
.session-card-title { font-weight: 600; margin-bottom: 3px; }
.session-card-code { font-size: 0.85em; color: #777; }

.df-session-result-badge { 
    font-weight: bold; 
    font-size: 0.9em; 
    margin-top: 5px; 
    display: inline-block;
}
.df-session-result-badge.is-passed { color: #28a745; }
.df-session-result-badge.is-failed { color: #dc3545; }
.df-session-result-badge.is-pending { color: #6c757d; }

.session-card-info-trainees {
    padding: 10px 15px;
    background: #f7f7f7; 
    border-top: 1px solid #e0e0e0;
}
.session-card-info-trainees .df-trainee-tag-list-compact { margin-top: 0; gap: 5px; }
.session-card-info-trainees .df-trainee-tag-list-compact .df-trainee-tag { font-size: 0.8em; padding: 3px 6px; border-left-width: 3px; }

/* ==========================================================================
   6. VUE DETAIL DU JOUR (SIDEBAR)
   ========================================================================== */

.df-day-detail-card h3 { 
    margin-top: 0; 
    font-size: 1.3em; 
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee; 
}

.df-day-detail-card .df-trainee-session-cards li {
    transition: transform 0.2s, box-shadow 0.2s;
}
.df-day-detail-card .df-trainee-session-cards li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ==========================================================================
   7. LOGIN BANNER (FIX VUE PUBLIC & SSO)
   ========================================================================== */

.df-public-login-banner {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin: 40px auto; 
    max-width: 480px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    font-family: inherit;
    position: relative;
    z-index: 100;
}

.df-login-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.4em;
    font-weight: 700;
}

/* SSO (Azure / Microsoft) - FIX COMPLET */
.df-login-sso-container {
    margin-bottom: 25px;
    text-align: center;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* CIBLE LARGE pour attraper TOUS les boutons SSO */
.df-login-sso-container a,
.df-login-sso-container button,
.df-login-sso-container .wpo365-login-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 5px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer !important;
    margin: 5px 0;
    position: relative;
    z-index: 10;
    pointer-events: auto !important; /* Force le clic */
}

/* Style par défaut Microsoft (Fond sombre) */
.df-login-sso-container a:not([class*="google"]):not([class*="facebook"]), 
.df-login-sso-container button {
    background-color: #2f2f2f; 
    color: #fff !important;
    border: 1px solid #2f2f2f;
}
.df-login-sso-container a:hover,
.df-login-sso-container button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.df-login-sso-container p { margin: 0; padding: 0; }

/* Séparateur "OU" */
.df-login-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: #888;
    font-size: 0.8em;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.8;
}
.df-login-separator::before, .df-login-separator::after { content: ''; flex: 1; border-bottom: 1px solid #ddd; }
.df-login-separator span { padding: 0 10px; background: #fff; }

/* Login Classique */
.df-public-login-form { display: block; }

.df-login-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9em;
}
.df-login-prompt { font-weight: 700; color: #555; }
.df-login-links a { color: #5e4682; text-decoration: none; }
.df-login-links a:hover { text-decoration: underline; }

.df-login-main-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.df-login-field input[type="text"], .df-login-field input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 15px;
    height: 45px;
    background-color: #f9f9f9;
}
.df-login-field input:focus {
    background-color: #fff;
    border-color: #5e4682;
    outline: none;
}

.df-login-submit button {
    width: 100%;
    height: 45px;
    font-size: 1em;
    font-weight: 700 !important;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 5px;
    background: #5e4682;
    border: 1px solid #5e4682;
    color: #fff;
    transition: background 0.2s;
}
.df-login-submit button:hover { background: #4a386a; }

.df-login-error {
    background: #fff0f0;
    color: #d63031;
    border: 1px solid #ffcccc;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

@media (min-width: 600px) {
    .df-login-main-row { flexDirection: row; }
    .df-login-field { flex-grow: 1; }
    .df-login-field.df-login-submit { flex-grow: 0; min-width: 100px; }
}

/* ==========================================================================
   8. AUTRES (PAGINATION, RELATED, RESPONSIVE)
   ========================================================================== */

.df-pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
.df-pagination-info { font-size: 0.9em; font-weight: 600; color: #555; }
.df-pagination-controls .button {
    padding: 0 10px;
    height: 32px; 
    line-height: 30px;
    font-size: 0.9em; 
    font-weight: 600; 
    cursor: pointer;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    color: #5e4682;
    transition: background-color 0.2s, border-color 0.2s;
}
.df-pagination-controls .button:hover { background-color: #f1f1f1; border-color: #999; }
.df-pagination-controls .button:disabled { background-color: #fdfdfd; border-color: #f0f0f0; color: #bbb; cursor: not-allowed; opacity: 0.7; }

.df-session-related-container { margin-top: 20px; }
.df-related-sessions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
}
.df-related-sessions a.df-related-session-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 60px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    overflow: hidden;
    transition: filter 0.2s;
}
.df-related-sessions a.df-related-session-item:hover { filter: brightness(1.15); }
.df-related-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #fff;
    background-color: #5e4682; /* Fallback */
}
.df-related-day { font-size: 1.4em; font-weight: 700; line-height: 1; }
.df-related-month { font-size: 0.8em; text-transform: uppercase; }

@media (max-width: 960px) { 
    .df-calendar-layout { grid-template-columns: 1fr; }
    .df-calendar-sidebar { position: static; margin-top: 20px; }
}

@media (max-width: 768px) {
    .df-calendar-wrapper { margin: 10px auto; }
    .df-calendar-toolbar { flex-direction: column; align-items: stretch; }
    .df-search-wrapper { order: -1; width: 100%; }
    .df-toolbar-item { justify-content: center; }
    .df-date-nav { justify-content: space-between; width: 100%; }
    .df-btn-filter { width: 100%; justify-content: center; }
    
    #df-calendar-grid, #df-calendar-current-month-title { display: none !important; }
    
    .df-calendar-day { min-height: 80px; font-size: 0.8em; }
    .df-session-item { font-size: 0.75em; padding: 3px 5px; height: 2.2em; } 
    .df-calendar-grid { grid-template-columns: 30px repeat(5, 1fr) 0.5fr 0.5fr; }
    .df-calendar-week-header, .df-calendar-week-number { 
        writing-mode: horizontal-tb; transform: none; padding: 5px 2px; font-size: 0.7em; 
    }
}

/* ==========================================================================
   WIDGET LOGIN SIDEBAR (Compact & Toggle)
   ========================================================================== */

.df-login-sidebar-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* Bouton Toggle (Titre) */
.df-login-toggle-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f9f9f9;
    border: none;
    border-bottom: 1px solid transparent;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s;
}
.df-login-toggle-btn:hover {
    background: #f0f0f0;
    color: #333;
}
.df-login-toggle-btn.active {
    background: #5e4682;
    color: #fff;
    border-bottom-color: #e0e0e0;
}
.df-login-toggle-btn span.dashicons:first-child {
    margin-right: 8px;
}
.df-login-toggle-btn .toggle-icon {
    font-size: 1.2em;
    transition: transform 0.2s;
}
.df-login-toggle-btn.active .toggle-icon {
    transform: rotate(180deg);
}

/* Contenu Tiroir */
.df-login-drawer-content {
    padding: 20px;
    background: #fff;
}

/* SSO Compact */
.df-login-sso-container-small {
    margin-bottom: 15px;
}
.df-login-sso-container-small a, 
.df-login-sso-container-small button {
    width: 100% !important;
    justify-content: center;
    background-color: #2f2f2f;
    color: #fff !important;
    padding: 10px !important;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    display: flex !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Séparateur */
.df-login-separator-small {
    text-align: center;
    margin: 15px 0;
    font-size: 0.75em;
    color: #999;
    font-weight: 600;
    position: relative;
}
.df-login-separator-small::before {
    content: ''; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px solid #eee; z-index: 0;
}
.df-login-separator-small span {
    background: #fff; padding: 0 8px; position: relative; z-index: 1;
}

/* Formulaire Compact */
.df-sidebar-login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.df-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
.df-submit-small {
    width: 100%;
    padding: 10px;
    background: #5e4682;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 5px;
}
.df-submit-small:hover {
    background: #4a386a;
}
.df-login-error-small {
    font-size: 0.85em;
    color: #d63031;
    background: #fff0f0;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    text-align: center;
}