/* Styles pour SG Historique */

/* ========================================================== */
/* STYLE POUR SG-HISTORIQUE - HISTORIQUE DE LA SEMAINE    */
/* ========================================================== */

/* Conteneur principal du widget de la semaine */
.sgh-current-week-summary {
    margin-bottom: 25px;
    padding: 25px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0f4f8, #e0e6ec);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}
.sgh-current-week-summary h4 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.6em;
    color: #2c3e50;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* La grille des 7 jours */
.sgh-week-days-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* Assure la même largeur pour chaque tuile */
    gap: 2px; /* Tout petit interstice entre chaque tuile */
}

/* Style de chaque "carré" représentant un jour */
.sgh-week-day-item {
    aspect-ratio: 1 / 1;
    width: 100%; /* S'assure que l'élément remplit l'espace de la colonne */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 5px;
    font-size: 0.8em;
    font-weight: 500;
    color: #777;
    background-color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    cursor: default;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.sgh-week-day-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    background-color: #f0f4f8;
}

/* Jour validé */
.sgh-week-day-item.is-validated {
    border-color: #d0d0d0;
}

/* Jour d'aujourd'hui */
.sgh-week-day-item.is-today {
    border-color: #007bff;
    box-shadow: 0 0 12px rgba(0, 123, 255, 0.4);
    transform: scale(1.05);
    z-index: 1;
}

/* Nom du jour (ex: Lun, Mar) */
.sgh-day-name {
    display: block;
    line-height: 1.2;
    text-transform: uppercase;
    font-size: 0.8em;
    font-weight: 600;
    color: #555;
    margin-bottom: 2px;
}

/* Numéro du jour */
.sgh-day-number {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-top: 0;
    margin-bottom: auto;
}

/* La pastille de validation */
.sgh-validation-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: auto;
    margin-bottom: 5px;
    overflow: hidden;
}

/* Pastille validée */
.sgh-week-day-item.is-validated .sgh-validation-dot {
    background-color: #143e89;
    transform: scale(1.1);
}

/* Le "check" de validation à l'intérieur de la pastille */
.sgh-day-status-icon {
    font-size: 1.2em;
    color: #fff;
    line-height: 1;
    font-weight: bold;
    display: block;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ======================================================== */
/* RESPONSIVITÉ : AFFICHER SUR 2 LIGNES SUR PETIT ÉCRAN   */
/* ======================================================== */

/* Pour les écrans de taille tablette et en dessous (ex: moins de 768px de large) */
@media (max-width: 768px) {
    .sgh-week-days-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
    }
    .sgh-week-day-item {
        max-width: 65px; /* Les tuiles diminuent en largeur */
        font-size: 0.75em;
        padding-top: 6px;
    }
    .sgh-day-number {
        font-size: 1.6em;
    }
    .sgh-day-name {
        font-size: 0.7em;
    }
    .sgh-validation-dot {
        width: 22px;
        height: 22px;
        margin-bottom: 4px;
    }
    .sgh-day-status-icon {
        font-size: 1.1em;
    }
}

/* Pour les écrans de taille mobile (ex: moins de 480px), on peut encore ajuster */
@media (max-width: 480px) {
    .sgh-week-days-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
    }
    .sgh-week-day-item {
        max-width: 55px; /* Les tuiles diminuent encore plus */
        font-size: 0.7em;
        padding-top: 5px;
    }
    .sgh-day-number {
        font-size: 1.5em;
    }
    .sgh-day-name {
        font-size: 0.65em;
    }
    .sgh-validation-dot {
        width: 20px;
        height: 20px;
        margin-bottom: 3px;
    }
    .sgh-day-status-icon {
        font-size: 1em;
    }
}

/* Shortcode Historique Complet - Keep previous improvements */
.sgh-full-history-wrapper {
    margin-top: 30px;
}
.sgh-full-history-wrapper h4 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.6em;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
}
.sgh-filters-sort-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8fafd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    justify-content: center;
}
.sgh-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sgh-filter-group label {
    font-size: 0.9em;
    font-weight: bold;
    color: #4a657c;
}
.sgh-filter-group select {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    min-width: 160px;
    background-color: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sgh-sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.sgh-session-tile {
    border: none;
    border-radius: 10px;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sgh-session-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.sgh-session-tile-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}
.sgh-session-date {
    font-size: 0.95em;
    color: #6c757d;
    font-weight: bold;
    display: block;
    text-align: center;
}
.sgh-session-tile-body p {
    margin: 0 0 10px 0;
    font-size: 0.95em;
    line-height: 1.6;
}
.sgh-session-tile-body p strong {
    color: #34495e;
}
.sgh-session-notes {
    font-style: italic;
    color: #5f7488;
    background-color: #fdfae6;
    border: 1px solid #ffeeba;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.88em;
}

.sgh-pagination-controls {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
}
.sgh-pagination-controls button {
    padding: 10px 20px;
    margin: 0 8px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.sgh-pagination-controls button:hover:not(:disabled) {
    background-color: #0056b3;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.sgh-pagination-controls button:disabled {
    background-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
}
#sgh-current-page-info {
    margin: 0 15px;
    font-size: 1em;
    color: #495057;
}
#sgh-no-results-message {
    text-align: center;
    padding: 20px;
    background-color: #ffe0b2;
    border: 1px solid #ffcc80;
    color: #6a4f00;
    border-radius: 8px;
    font-size: 1.1em;
}

.sgh-login-required {
    padding: 15px 20px;
    background-color: #fff3e0;
    border: 1px solid #ffd79b;
    color: #8c5d00;
    border-radius: 8px;
    font-size: 1.1em;
}
.sgh-login-required a {
    color: #7b4f00;
    font-weight: bold;
    text-decoration: underline;
}

/* Styles pour les icônes Dashicon des objectifs dans l'historique */
.sgh-objective-icon {
    font-size: 1.15em;
    vertical-align: middle;
    margin-right: 8px;
    color: #007bff;
}