/**
 * 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;
    }
}

/* ============================================
   STYLES POUR LA POPUP DE TÉLÉCHARGEMENT
   ============================================ */

/* Popup container */
.block-repertoire-preuves-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.block-repertoire-preuves-popup__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.block-repertoire-preuves-popup__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease-out;
}

.block-repertoire-preuves-popup__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.block-repertoire-preuves-popup__close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.block-repertoire-preuves-popup__close svg {
    width: 20px;
    height: 20px;
    color: #1D1D1B;
}

.block-repertoire-preuves-popup__form {
    margin-top: 20px;
}

.block-repertoire-preuves-popup__form h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1D1D1B;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 50px;
}

.block-repertoire-preuves-popup__form .wpcf7-form {
    margin-bottom: 0;
}

/* Message de succès */
.block-repertoire-preuves-popup__success {
    text-align: center;
    padding: 20px 0;
}

.block-repertoire-preuves-popup__success-icon {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.block-repertoire-preuves-popup__success-icon svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(76, 175, 80, 0.3));
}

.block-repertoire-preuves-popup__success-title {
    font-family: 'Figtree', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #1D1D1B;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.block-repertoire-preuves-popup__success-text {
    font-family: 'Figtree', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #666;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.block-repertoire-preuves-popup__success-link {
    display: inline-block;
    background: #31ad68;
    color: white !important;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: 'Figtree', sans-serif;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(49, 173, 104, 0.3);
}

.block-repertoire-preuves-popup__success-link:hover {
    background: #2a9d5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 173, 104, 0.4);
    color: white !important;
    text-decoration: none;
}

/* Animation d'entrée de la popup */
@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsive pour la popup */
@media (max-width: 768px) {
    .block-repertoire-preuves-popup__content {
        padding: 30px 20px;
        width: 95%;
        max-height: 95vh;
    }
    
    .block-repertoire-preuves-popup__close {
        top: 15px;
        right: 15px;
    }
    
    .block-repertoire-preuves-popup__form h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .block-repertoire-preuves-popup__success-title {
        font-size: 20px;
    }
    
    .block-repertoire-preuves-popup__success-text {
        font-size: 14px;
    }
    
    .block-repertoire-preuves-popup__success-link {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .block-repertoire-preuves-popup__content {
        padding: 25px 15px;
        border-radius: 12px;
    }
    
    .block-repertoire-preuves-popup__close {
        top: 10px;
        right: 10px;
    }
    
    .block-repertoire-preuves-popup__form h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .block-repertoire-preuves-popup__success {
        padding: 15px 0;
    }
    
    .block-repertoire-preuves-popup__success-icon {
        margin-bottom: 20px;
    }
    
    .block-repertoire-preuves-popup__success-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .block-repertoire-preuves-popup__success-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .block-repertoire-preuves-popup__success-text {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .block-repertoire-preuves-popup__success-link {
        padding: 8px 16px;
        font-size: 13px;
    }
}
