/**
 * Session Generator Frontend Styles
 * Version: 1.0.8 (Ajustements lightbox image et boutons)
 */

/* Styles Généraux et Utilitaires */
.sg-session-generator-wrapper { border: 1px solid #e0e0e0; padding: 20px; background-color: #fdfdfd; border-radius: 4px; box-shadow: 0 1px 1px rgba(0,0,0,.04); margin-bottom: 20px; }
.sg-feedback-message { padding: 10px 15px; margin-bottom: 15px; border-radius: 3px; border-width: 1px; border-style: solid; font-size: 0.9em; }
.sg-feedback-message.success { background-color: #d4edda; border-color: #c3e6cb; color: #155724; }
.sg-feedback-message.error, .sg-error-message { background-color: #f8d7da; border-color: #f5c6cb; color: #721c24; }
.sg-feedback-message.warning { background-color: #fff3cd; border-color: #ffeeba; color: #856404; }
.sg-feedback-message.loading { background-color: #e2e3e5; border-color: #d6d8db; color: #383d41; }
.sg-login-required { padding: 10px 15px; background-color: #fff3cd; border: 1px solid #ffeeba; color: #856404; border-radius: 3px; }

/* Styles du Formulaire */
.sg-form-row { margin-bottom: 15px; }
.sg-form-row label, .sg-form-row legend { display: block; font-weight: bold; margin-bottom: 5px; color: #333; font-size: 0.95em; }
.sg-form-row select, .sg-form-row input[type="text"] { width: 100%; padding: 8px 10px; border: 1px solid #8c8f94; border-radius: 3px; box-sizing: border-box; background-color: #fff; color: #32373c; font-size: 1em; line-height: 1.5; }
.sg-form-row select:focus, .sg-form-row input[type="text"]:focus { border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1; outline: 1px solid transparent; }
.sg-form-row fieldset { border: 1px solid #ddd; padding: 10px 15px; border-radius: 3px; margin-top: 5px; }
.sg-checkbox-list { list-style: none; padding: 0; margin: 0; }
.sg-checkbox-list li { margin-bottom: 8px; }
.sg-checkbox-list input[type="checkbox"] { margin-right: 8px; vertical-align: middle; }
.sg-checkbox-list label { font-weight: normal; display: inline; font-size: 0.9em; color: #444; }

/* Styles des Boutons */
.sg-button, button.sg-button { background-color: #2271b1; border-color: #2271b1; color: #fff; padding: 8px 16px; text-decoration: none; font-size: 1em; border-radius: 3px; cursor: pointer; border-style: solid; border-width: 1px; box-sizing: border-box; line-height: 1.5; transition: background-color 0.1s ease-in-out, border-color 0.1s ease-in-out; vertical-align: middle; }
.sg-button:hover, button.sg-button:hover { background-color: #135e96; border-color: #135e96; color: #fff; }
.sg-button:focus, button.sg-button:focus { border-color: #0a4b78; box-shadow: 0 0 0 1px #0a4b78; outline: 1px solid transparent; color: #fff; }
.sg-button:disabled, button.sg-button:disabled, .sg-button.is-loading, button.sg-button.is-loading { background-color: #d6d6d6 !important; border-color: #d6d6d6 !important; color: #777 !important; cursor: not-allowed !important; opacity: 0.7; }

/* Styles de l'Affichage de la Session */
.sg-session-display-container { border: 1px solid #e0e0e0; padding: 20px; margin-top: 20px; background-color: #fff; border-radius: 4px; }
.sg-session-title { margin-top: 0; color: #1d2327; font-size: 1.6em; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.sg-session-recap { background-color: #f6f7f7; padding: 12px 18px; border-radius: 3px; margin-bottom: 20px; border: 1px solid #e0e0e0; font-size: 0.9em; }
.sg-recap-title { margin-top: 0; margin-bottom: 8px; font-size: 1.1em; color: #1d2327; font-weight: 600; }
.sg-recap-list { list-style-type: disc; padding-left: 20px; margin-bottom: 0; }
.sg-recap-list li { margin-bottom: 5px; color: #444; }
.sg-recap-list li strong { color: #1d2327; }
.sg-timer-display { font-size: 1.8em; font-weight: bold; color: #2c3e50; text-align: center; margin: 25px 0; padding: 12px; background-color: #ecf0f1; border-radius: 3px; }

/* Galerie Principale (Slider) */
.sg-exercises-gallery { margin: 20px auto; text-align: center; position: relative; min-height: 250px; border: 1px solid #eee; padding: 15px; background: #fdfdfd; }
.sg-exercise-slide { padding: 10px; background-color: #fff; } 
.sg-exercise-title { font-size: 1.3em; margin-top: 0; margin-bottom: 15px; color: #333; font-weight: 600; }
.sg-exercise-image { max-width: 100%; max-height: 400px; height: auto; border: 1px solid #ddd; border-radius: 3px; display: block; margin: 0 auto 10px auto; box-shadow: 0 1px 2px rgba(0,0,0,0.07); }
img.sg-enlarge-custom-trigger { cursor: zoom-in; } 
.sg-no-image-message { color: #555d66; font-style: italic; padding: 20px; border: 1px dashed #ccd0d4; border-radius: 3px; background-color: #f6f7f7; min-height: 100px; display: flex; align-items: center; justify-content: center; text-align: center; }

/* Navigation de la Galerie Principale */
.sg-gallery-navigation { text-align: center; margin: 20px 0; }
.sg-nav-button { margin: 0 8px; padding: 8px 12px; font-size: 0.95em; }
.sg-slide-indicator { display: inline-block; margin: 0 15px; font-weight: bold; color: #555; vertical-align: middle; font-size: 0.95em; }

/* Actions de Session (Favoris, Terminer) */
.sg-session-actions { margin-top: 25px; text-align: right; padding-top: 15px; border-top: 1px solid #eee; }
.sg-favorite-button { background-color: #3ca569; border-color: #3ca569; }
.sg-favorite-button:hover { background-color: #328f5a; border-color: #328f5a; }
.sg-favorite-button:focus { border-color: #277749; box-shadow: 0 0 0 1px #277749; }
#sg-favorite-feedback { font-size: 0.85em; display: inline-block; margin-left: 10px; padding: 5px 10px; }

/* --- Styles pour la Lightbox Personnalisée (Nouvelle Version) --- */
body.sg-custom-lightbox-open { 
    overflow: hidden; 
}

.sg-custom-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    z-index: 99999;
    display: flex; /* Utilisé pour centrer */
    justify-content: center;
    align-items: center;
    opacity: 0; /* Géré par JS */
    transition: opacity 0.3s ease;
}

.sg-custom-lightbox-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.sg-custom-lightbox-image-container.scrollable {
    overflow-y: auto;
    align-items: flex-start;
    padding: 20px 0;
}

#sg-custom-lightbox-current-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

#sg-custom-lightbox-current-image.fit-height {
    width: auto;
    height: 90vh;
}

#sg-custom-lightbox-current-image.fit-width {
    width: 90vw;
    height: auto;
    max-height: none;
}

.sg-custom-lightbox-caption {
    position: absolute;
    bottom: 15px;
    color: #eee;
    text-align: center;
    font-size: 0.9em;
    padding: 5px 10px;
    background-color: rgba(0,0,0,0.7);
    border-radius: 4px;
    max-width: 90%;
    word-wrap: break-word;
    z-index: 10;
}

/* Barre d'outils */
.sg-custom-lightbox-toolbar {
    position: absolute;
    top: 50px;
    right: 15px;
    background: rgba(30, 30, 30, 0.7);
    border-radius: 5px;
    padding: 5px;
    display: flex;
    gap: 5px;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.sg-custom-lightbox-toolbar button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'dashicons';
    font-size: 22px;
}

.sg-custom-lightbox-toolbar button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sg-custom-lightbox-toolbar button.active {
    background-color: #0073aa;
    border-color: #0073aa;
}

/* Flèches de navigation */
.sg-custom-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 30, 30, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    font-size: 24px;
}

.sg-custom-lightbox-nav:hover {
    background: rgba(30, 30, 30, 0.8);
}

.sg-custom-lightbox-nav:disabled {
    opacity: 0.2;
    cursor: default;
}

.sg-custom-lightbox-nav.sg-custom-lightbox-prev {
    left: 20px;
}

.sg-custom-lightbox-nav.sg-custom-lightbox-next {
    right: 20px;
}

 .sg-premium-locked,
    .sg-premium-locked label,
    option.sg-premium-locked { /* Essayer de styler l'option, peut avoir un support limité */
        color: #999999 !important; /* Griser le texte */
        font-style: italic;
    }
    .sg-premium-locked input[type="checkbox"] {
        /* Peut être difficile à styler directement, mais le label grisé aide */
    }
    .sg-padlock {
        display: inline-block;
        margin-right: 5px;
        font-size: 0.9em; /* Ajustez la taille au besoin */
    }
    .sg-subscribe-prompt {
        background-color: #fff8e1; /* Jaune clair */
        border: 1px solid #ffecb3; /* Bordure jaune */
        padding: 10px 15px;
        margin-bottom: 20px;
        border-radius: 4px;
        text-align: center;
    }
    .sg-subscribe-prompt a {
        font-weight: bold;
    }

/* Styles pour le conseil de session aléatoire */
.sg-session-tip {
    background-color: #e7f3fe; /* Bleu très clair */
    border-left: 4px solid #2271b1; /* Bordure bleue WordPress */
    padding: 12px 18px;
    margin-bottom: 20px;
    display: inline-flex; /* Changé pour centrer le contenu */
    align-items: center;
    justify-content: center; /* Ajouté pour centrer */
    text-align: center; /* Ajouté pour centrer */
    max-width: 80%; /* Pour ne pas prendre toute la largeur */
    margin-left: auto; /* Pour centrer le bloc lui-même */
    margin-right: auto; /* Pour centrer le bloc lui-même */
    display: flex; /* Rétabli pour l'alignement icône/texte */
}

.sg-tip-icon {
    font-size: 1.5em;
    margin-right: 15px;
    line-height: 1;
}

.sg-tip-text {
    margin: 0;
    color: #3c434a;
    font-size: 0.9em;
    font-style: italic;
}