/**
 * Styles pour le bloc Répertoire de preuves
 * Basé sur le design Figma avec les couleurs et polices Neos
 */

.block-repertoire-preuves {

    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

@media (max-width: 768px){
    .block-repertoire-preuves{
        width: 90vw!important;
        max-width: 90vw;
        margin-left: calc(50% - 45vw);
    }
}

/* Header du bloc */
.block-repertoire-preuves__header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.block-repertoire-preuves__title {
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1;
    color: #000000;
    text-transform: uppercase;
    margin: 0 0 1rem 0;
}

.block-repertoire-preuves__subtitle {
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.2;
    color: #1d1d1b;
    margin: 0;
    opacity: 0.8;
}

/* Container principal */
.repertoire-container {
    display: flex;
    height: 80vh;
    min-height: 600px;
    gap: 0.625rem;
    padding: 0 1.25rem;
    position: relative;
}

/* Colonnes */
.repertoire-colonne {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 6px 0px 55.6px 0px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Les trois premières colonnes prennent 50% de la largeur */
.repertoire-colonne:nth-child(1),
.repertoire-colonne:nth-child(2),
.repertoire-colonne:nth-child(3) {
    flex: 0 0 calc(50% / 3);
    min-width: 0;
}

.repertoire-colonne:nth-child(1){
    flex: 0 0 calc(40% / 3);
}

.repertoire-colonne:nth-child(2) .repertoire-item,
.repertoire-colonne:nth-child(1) .repertoire-item{
    border-radius: 14px;
    border: none;
    padding-top: 25px;
    padding-bottom: 25px;
}

.repertoire-colonne:nth-child(1) .repertoire-item{
    text-align: left;
    padding-left: 40px;

}

.repertoire-colonne:nth-child(2){
    flex: 0 0 calc(25% / 3);
}


/* La colonne de contenu prend 50% de la largeur */
.repertoire-colonne:nth-child(4) {
    flex: 0 0 50%;
    min-width: 0;
}



.repertoire-colonne:nth-child(1) { z-index: 4; }
.repertoire-colonne:nth-child(2) { z-index: 3; }
.repertoire-colonne:nth-child(3) { z-index: 2; }
.repertoire-colonne:nth-child(4) { z-index: 1; }

/* Contenu des colonnes */
.colonne-content {
    flex: 1;
    padding: 0.625rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* Messages par défaut et de chargement */
.default-message,
.loading-message {
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #1d1d1b;
    text-align: center;
    margin: 2rem auto;
    opacity: 0.7;
}

.loading-message {
    color: #31ad68;
}

/* Spinner de chargement */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(49, 173, 104, 0.1);
    border-top: 3px solid #31ad68;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-text {
    font-family: 'Figtree', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    color: #31ad68;
    text-align: center;
}

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

/* Items des colonnes */
.repertoire-item {
    background: rgba(29, 29, 27, 0.02);
    border: 0.5px solid rgba(100, 100, 100, 0.23);
    border-radius: 24px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Figtree', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: #1d1d1b;
    text-align: center;
}

.repertoire-item:hover {
    background: rgba(29, 29, 27, 0.05);
    border-color: rgba(100, 100, 100, 0.4);
    transform: translateY(-2px);
}

.repertoire-item.item-active {
    background: rgba(49, 173, 104, 0.05);
    border: none!important;
    color: #31ad68;
}

/* Items de preuves spécifiques */
.preuve-item {
    padding: 0.9375rem;
}

.preuve-content {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    align-items: flex-start;
}

.preuve-title {
    font-family: 'Figtree', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1;
    color: inherit;
    margin: 0;
    text-align: left;
}

.preuve-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.preuve-tag {
    background: #F6F6F1;
    color: #1d1d1b;
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.375rem 0.625rem;
    border-radius: 0.5rem;
    text-align: left;
}

.item-active .preuve-tag {
    background: #31ad68;
    color: #ffffff;
}

/* Détails de la preuve */
.preuve-detail {
    padding: 1rem;
}

/* Image à la une de la preuve */
.preuve-featured-image {
    margin-bottom: 1.5rem;
    text-align: center;
    max-height: 350px;
    overflow: hidden;
    border-radius: 25px;
}

.preuve-featured-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}



.preuve-detail-title {
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: 2.1875rem;
    line-height: 1;
    color: #000000;
    text-transform: uppercase;
    margin-top: 1rem;
    padding-bottom: 50px;
    border-bottom: 1px solid #1d1d1b;
}

.preuve-detail-content {
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.2;
    color: #1d1d1b;
    padding-top: 50px;
}

/* Footer de la preuve avec bouton de téléchargement */
.preuve-detail-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(100, 100, 100, 0.1);
    text-align: center;
}

/* Bouton de téléchargement inline */
.download-button-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #31ad68;
    color: white;
    text-decoration: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-family: 'Figtree', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(49, 173, 104, 0.3);
}

.download-button-inline:hover {
    background: #2a9d5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 173, 104, 0.4);
    color: white;
    text-decoration: none;
}

.download-button-inline .download-text {
    color: white;
    font-weight: 500;
}

.download-button-inline .download-icon {
    width: 18px;
    height: 18px;
    opacity: 1;
    filter: brightness(0) invert(1);
}

.preuve-detail-content p {
    margin: 0 0 1rem 0;
}

.preuve-detail-content p:last-child {
    margin-bottom: 0;
}

/* Bouton de téléchargement - Styles pour .btn.btn-primary */
.btn.btn-primary.download-button-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #31ad68;
    color: white;
    text-decoration: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-family: 'Figtree', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(49, 173, 104, 0.3);
    border: none;
    cursor: pointer;
}

.btn.btn-primary.download-button-inline:hover {
    background: #2a9d5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 173, 104, 0.4);
    color: white;
    text-decoration: none;
}

.btn.btn-primary.download-button-inline .download-text {
    color: white;
    font-weight: 500;
}



/* Messages d'erreur */
.error-message {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-family: 'Figtree', sans-serif;
    font-size: 0.875rem;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Scrollbar personnalisée */
.colonne-content::-webkit-scrollbar {
    width: 7px;
}

.colonne-content::-webkit-scrollbar-track {
    background: rgba(100, 100, 100, 0.05);
    border-radius: 91px;
}

.colonne-content::-webkit-scrollbar-thumb {
    background: rgba(29, 29, 27, 0.3);
    border-radius: 40px;
}

.colonne-content::-webkit-scrollbar-thumb:hover {
    background: rgba(29, 29, 27, 0.5);
}

.argument-subtitle{
    color: #31AD68;
    font-family: Figtree;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 100%; /* 24px */
    padding-bottom: 20px;
}

.pe_arguments-item{
    padding-bottom: 50px;
}

/* Responsive */
@media (max-width: 1200px) {
    .repertoire-container {
        height: 70vh;
        min-height: 500px;
    }
    
    .block-repertoire-preuves__title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .repertoire-container {
        flex-direction: column;
        height: auto;
        min-height: auto;
        gap: 1rem;
    }
    
    .repertoire-colonne {
        min-height: 200px;
    }
    
    .block-repertoire-preuves__title {
        font-size: 1.75rem;
    }
    
}

@media (max-width: 480px) {
    .repertoire-container {
        padding: 0 1rem;
    }
    
    .block-repertoire-preuves__header {
        padding: 0 1rem;
    }
    
    .block-repertoire-preuves__title {
        font-size: 1.5rem;
    }
    
    .preuve-detail-title {
        font-size: 1.75rem;
    }
}
