/* === STYLING DU SUIVI DE COURS PUBLIC === */

.gc-suivi {
    padding: 0 0 1rem 0;
    margin: 0 auto;
}

/* Filtrage (Nouveau Design GCC) */
.gcc-top-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.gcc-search-box {
    flex: 1 1 250px;
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 12px;
}

.gcc-search-box .dashicons {
    color: #999;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.gcc-search-box input {
    border: none !important;
    padding: 12px 10px !important;
    width: 100%;
    outline: none !important;
    font-size: 13px;
    background: transparent !important;
    color: #333;
    box-shadow: none !important;
}

.gcc-select {
    flex: 1 1 150px;
    padding: 12px 15px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gc-bleu-nuit);
    background-color: #fff !important;
    outline: none !important;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: none !important;
}

.gcc-select:focus {
    border-color: var(--gc-orange);
}

/* Sections de Semaines */
.gc-suivi-week-section {
    margin-bottom: 3rem;
}

.gc-suivi-week-title {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--gc-orange) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.gc-suivi-week-dates {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 400;
}

/* Grille de cartes (Masonry via CSS Grid + JS) */
.gc-suivi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    align-items: start;
}

.gc-suivi-grid.gc-masonry-active {
    grid-auto-rows: 10px;
    row-gap: 0;
    align-items: stretch;
}

/* Cartes de suivi */
.gc-suivi-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--gc-orange) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: visible;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease, z-index 0s;
}

.gc-suivi-grid.gc-masonry-active .gc-suivi-card {
    margin-bottom: 20px;
}

.gc-suivi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

/* En-tête des cartes */
.gc-suivi-card-header {
    background: #f8f9fa;
    padding: 0.5rem 0.75rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px 10px 0 0;
    position: relative;
}

.gc-suivi-card-time {
    font-size: 1rem;
    font-weight: 700;
    color: #414547;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 2px 0 !important;
}

.gc-suivi-card-title {
    font-size: 1.4rem;
    font-weight: 400 !important;
    color: var(--gc-bleu-nuit) !important;
    margin: 0 !important;
    line-height: 1.2;
    padding-bottom: 1px
}

.gc-suivi-card-animateurs {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    margin: 1px 0 0 0 !important;
    font-weight: 500;
}

.gc-suivi-card-badge {
    display: inline-block;
    font-size: 0.63rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
}

/* Corps des cartes */
.gc-suivi-card-body {
    padding: 0.5rem 0.75rem !important;
}

.gc-suivi-no-dance {
    color: #6c757d;
    font-style: italic;
    font-size: 0.85rem;
    text-align: center;
    margin: 0.75rem 0;
}

/* Liste des danses */
.gc-suivi-dance-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gc-suivi-dance-li {
    display: block !important;
    padding: 3px 0 !important;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08) !important;
    margin: 0 !important;
}

.gc-suivi-dance-li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.gc-suivi-dance-li:first-child {
    padding-top: 0;
}

.gc-suivi-dance-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    min-height: 20px;
}

.gc-suivi-dance-title-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    overflow: hidden;
}

.gc-suivi-dance-title-wrapper::before {
    content: "–";
    color: rgba(0, 0, 0, 0.3);
    font-size: 0.85rem;
    flex-shrink: 0;
    line-height: 1;
    margin-right: 6px;
}

.gc-suivi-dance-name {
    font-size: 0.95rem !important;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.gc-suivi-dance-note {
    font-size: 0.72rem !important;
    color: #2563eb;
    background: #eff6ff;
    padding: 1px 5px;
    border-radius: 3px;
    display: inline-block;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.15);
    white-space: nowrap;
}

/* Boutons de Médias (PDF & Vidéo) */
.gc-suivi-dance-media {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    justify-content: flex-end;
    margin-top: 1px;
}

.gc-media-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    padding: 0 !important;
    width: 56px !important;
    height: 22px !important;
    border-radius: 5px !important;
    border: none !important;
    cursor: pointer !important;
    transition: opacity 0.15s ease, transform 0.15s ease !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
    font-size: 9px !important;
    font-family: inherit !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.gc-media-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.gc-media-btn .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
    line-height: 12px;
    color: #fff !important;
}

.gc-pdf-btn {
    background-color: #2563eb;
}

.gc-demo-btn {
    background-color: #dc2626;
}

.gc-cours-btn {
    background-color: #d97706;
}

/* --- Tooltip miniature au survol --- */
.chore-link-item {
    position: relative;
    z-index: 20;
}

.chore-preview-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 9999;
    padding: 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    width: max-content;
}

.chore-link-item:hover .chore-preview-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.chore-preview-tooltip img {
    width: 200px !important;
    max-width: none !important;
    height: auto !important;
    min-height: 112px !important;
    background-color: #f5f5f5;
    border-radius: 4px;
    display: block;
}

.chore-preview-tooltip img.gc-lazy-tooltip-img:not(.loaded) {
    background: #f5f5f5 url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M20 5A15 15 0 1 0 35 20" stroke="%23cccccc" stroke-width="3" fill="none"><animateTransform attributeName="transform" type="rotate" from="0 20 20" to="360 20 20" dur="1s" repeatCount="indefinite"/></path></svg>') no-repeat center center;
}

/* Flèche du tooltip */
.chore-preview-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #fff;
}

.chore-preview-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #ddd;
}

@media screen and (max-width: 768px) {

    /* Tooltip au survol : désactivé sur mobile */
    .chore-preview-tooltip {
        display: none !important;
        visibility: hidden !important;
    }
}

/* === LIGHTBOX COMPONENT === */
.gc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gc-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.gc-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gc-lightbox-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    z-index: 20;
    line-height: 1;
    transition: color 0.15s ease;
    padding: 0;
}

.gc-lightbox-close:hover {
    color: var(--gc-orange);
}

.gc-lightbox-iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* Ratio 16:9 */
    height: 0;
}

.gc-lightbox-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* === STYLE DES BADGES DE COURS === */
.gc-suivi-badge {
    font-size: 0.7rem !important;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    line-height: 1;
    display: inline-block;
    white-space: nowrap;
}



.gc-badge-new {
    background-color: #fffbeb !important;
    color: #d97706 !important;
    border: 1px solid rgba(217, 119, 6, 0.2) !important;
}

.gc-badge-rev {
    background-color: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid rgba(5, 150, 105, 0.2) !important;
}

/* === STYLE DES BANNIERES DE STATUT === */
.gc-suivi-status-banner {
    text-align: center;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.82rem;
}

.status-annule {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

.status-ferie {
    background-color: #fffbeb !important;
    color: #92400e !important;
    border: 1px solid #fde047 !important;
}

.status-vacances {
    background-color: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #93c5fd !important;
}

.status-evenement {
    background-color: #f3e8ff !important;
    color: #7e22ce !important;
    border: 1px solid #d8b4fe !important;
}

/* Cache pour les éléments cachés en public */
.gco-hidden {
    display: none !important;
}

/* === EN-TÊTE DU SUIVI === */
.gc-suivi-header {
    text-align: center;
    margin-bottom: 2rem;
}

.gc-suivi-main-title {
    color: var(--gc-bleu-nuit) !important;
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    margin: 0 0 0.5rem 0 !important;
}


/* --- TOP BAR FILTER STYLES --- */
.gpr-top-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.gpr-search-box {
    flex: 1 1 300px;
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--gc-btn-radius, 4px);
    padding: 0 12px;
    height: 42px;
    box-sizing: border-box;
}

.gpr-search-box .dashicons {
    color: #999;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.gpr-search-box input {
    border: none;
    padding: 0 10px;
    width: 100%;
    height: 100%;
    outline: none;
    font-size: 13px;
    background: transparent;
    box-sizing: border-box;
}

.gpr-select {
    flex: 1 1 150px;
    padding: 0 15px;
    height: 42px;
    border: 1px solid #ddd;
    border-radius: var(--gc-btn-radius, 4px);
    font-size: 12px;
    font-weight: 600;
    color: var(--gc-texte);
    background-color: #fff;
    outline: none;
    text-transform: uppercase;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

/* --- TABS --- */
.gpr-subheader {
    margin-top: 15px;
}

.gpr-filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 10px;
}

.gpr-tabs {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.gpr-tab {
    font-size: 12px;
    font-weight: 700;
    color: #777777;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.gpr-tab:hover {
    color: var(--gc-bleu-nuit);
}

.gpr-tab.active {
    color: var(--gc-bleu-nuit);
    border-bottom: 2px solid var(--gc-bleu-nuit);
    padding-bottom: 10px;
    margin-bottom: -12px;
}