/**
 * Letter Tabs Widget Styles - Version BIISE
 *
 * @package Astra Child Theme
 */

/* ==========================================================================
   Container Principal
   ========================================================================== */

.letter-tabs-widget {
    position: relative;
    width: 100%;
    overflow: visible;
    padding: 60px 0;
}

/* ==========================================================================
   Navigation des Lettres (BIISE) - Style image avec alternance noir/blanc
   ========================================================================== */

.letter-tabs-navigation {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    margin-bottom: -80px;
    position: relative;
    z-index: 100;
    flex-wrap: nowrap;
    padding-top: 100px;
}

.letter-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 181px;
    height: 181px;
    border: none;
    cursor: pointer;
    font-family: 'Belle de Mai', 'Bodoni Moda', 'Didot', serif;
    font-weight: 900;
    font-size: 90px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -5px;
    border-radius: 0;
    margin: 0;
    padding: 0;
    padding-bottom: 15px;
    background-color: #000000;
    color: #ffffff;
    flex-shrink: 0;
    z-index: 1;
    /* Animation au scroll comme les villes */
    transform: translateY(-120px);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(.4,1.5,.5,1), opacity 0.7s, box-shadow 0.3s;
    will-change: transform, opacity;
}

/* État visible après animation au scroll */
.letter-tab--visible {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

/* Barre verticale bleue pastel au-dessus de CHAQUE lettre */
.letter-tab::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100px;
    background-color: #C8DBE8;
    z-index: 0;
}

/* Décalage vertical pour chaque lettre - effet irrégulier */
.letter-tab:nth-child(1) {
    height: 181px;
    margin-top: 40px;
}

.letter-tab:nth-child(2) {
    height: 181px;
    margin-top: 80px;
}

.letter-tab:nth-child(3) {
    height: 181px;
    margin-top: 0px;
}

.letter-tab:nth-child(4) {
    height: 181px;
    margin-top: 50px;
}

.letter-tab:nth-child(5) {
    height: 181px;
    margin-top: 10px;
}

/* Effet hover - changement vers la couleur de l'onglet */
.letter-tab--visible:hover,
.letter-tab--visible.active {
    transform: translateY(-8px) scale(1.05) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.letter-tab--visible:hover {
    transform: translateY(-8px) scale(1.08) !important;
}

/* Animation d'entrée - désactivée au profit de l'animation au scroll */
/* L'animation est maintenant gérée par JavaScript avec la classe letter-tab--visible */

/* ==========================================================================
   Contenu des Onglets
   ========================================================================== */

.letter-tabs-content {
    position: relative;
    min-height: 600px;
}

.tab-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    z-index: 1;
}

.tab-content.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 10;
}

.tab-content-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 1255px;
    margin: 0 auto;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Grille Contenu (Image + Texte) - Style exactement comme l'image
   ========================================================================== */

.tab-content-grid {
    display: grid;
    grid-template-columns: 35% 65%;
    gap: 0;
    align-items: stretch;
    min-height: 550px;
    max-height: 1255px;
}

/* Image à gauche */
.tab-content-image {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-content-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.tab-content.active .tab-content-image img {
    animation: zoomIn 0.8s ease-out both;
}

@keyframes zoomIn {
    from {
        transform: scale(1.05);
        opacity: 0.7;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================================================
   Texte à droite - Style conforme à l'image
   ========================================================================== */

.tab-content-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    padding: 180px 70px 80px 70px !important;
}

/* Lettre en filigrane (watermark) - très subtile */
.tab-content-letter {
    position: absolute;
    top: 250%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 550px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.03;
    font-family: 'Belle de Mai', serif;
    color: inherit;
    z-index: 0;
    pointer-events: none;
}

/* Titre avec barre verticale bleue */
.tab-content-title-wrapper {
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 30px;
}

/* Barre verticale bleue à gauche du titre */
.tab-content-title-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1àpx;
    background-color: #8B9DC3;
    z-index: 1;
}

.tab-content-title {
  color: var(--Noir, #000);

/* TITRE H1 */
font-family: "Belle de Mai" ;
font-size: 50px !important;
font-style: normal !important;
font-weight: 900 !important;
line-height: normal !important;
}

.tab-content.active .tab-content-title {
    animation: slideInRight 0.8s ease-out both;
    animation-delay: 0.2s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Contenu texte */
.tab-content-text {
    color: var(--Noir, #000);
    font-family: Degular;
    font-size: 40px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
}

.tab-content.active .tab-content-text {
    animation: slideInRight 0.8s ease-out both;
    animation-delay: 0.3s;
}

.tab-content-text p {
    margin-bottom: 18px;
}

.tab-content-text p:last-child {
    margin-bottom: 0;
}

/* Citation - style conforme à l'image */
.tab-content-quote {
    margin-top: 35px;
    padding: 35px 45px;
    border-radius: 8px;
    border-left: none;
    position: relative;
    z-index: 1;
}

.tab-content.active .tab-content-quote {
    animation: fadeIn 0.8s ease-out both;
    animation-delay: 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content-quote blockquote {
    margin: 0;
    padding: 0;
    width: 90%;
}

.tab-content-quote p {
    color: var(--Noir, #000);
    font-family: Degular;
    font-size: 40px;
    font-style: italic;
    font-weight: 200;
    line-height: normal;
}

.tab-content-quote cite {
    display: block;
color: var(--Noir, #000);
font-family: Degular;
font-size: 40px;
font-style: italic;
font-weight: 400;
line-height: normal;
text-align: right;
}


/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablettes (≤ 1024px) */
@media (max-width: 1024px) {
    .letter-tab {
        min-width: 100px;
        height: 100px;
        font-size: 60px;
    }

    .tab-content-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .tab-content-text-wrapper {
        padding: 50px 40px;
    }

    .tab-content-letter {
        font-size: 140px;
        top: 30px;
        left: 30px;
    }

    .tab-content-title {
        font-size: 36px;
    }

    .tab-content-text {
        font-size: 16px;
    }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
    .letter-tabs-widget {
        padding: 40px 0;
    }

    .letter-tabs-navigation {
        margin-bottom: 30px;
    }

    .letter-tab {
        min-width: 70px;
        height: 70px;
        font-size: 40px;
    }

    .tab-content-wrapper {
        border-radius: 15px;
    }

    .tab-content-grid {
        min-height: auto;
    }

    .tab-content-text-wrapper {
        padding: 40px 30px;
    }

    .tab-content-letter {
        font-size: 100px;
        top: 20px;
        left: 20px;
        opacity: 0.05;
    }

    .tab-content-title {
        font-size: 28px;
    }

    .tab-content-text {
        font-size: 15px;
        line-height: 1.6;
    }

    .tab-content-quote {
        padding: 20px 25px;
        margin-top: 20px;
    }

    .tab-content-quote p {
        font-size: 17px;
    }

    .tab-content-quote cite {
        font-size: 14px;
    }
}

/* Petit mobile (≤ 480px) */
@media (max-width: 480px) {
    .letter-tab {
        min-width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .tab-content-text-wrapper {
        padding: 30px 20px;
    }

    .tab-content-letter {
        font-size: 80px;
    }

    .tab-content-title {
        font-size: 24px;
    }

    .tab-content-text {
        font-size: 14px;
    }

    .tab-content-quote p {
        font-size: 15px;
    }
}

/* ==========================================================================
   Accessibilité
   ========================================================================== */

.letter-tab:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 3px;
}

.letter-tab:focus:not(:focus-visible) {
    outline: none;
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .tab-content-quote {
        border-left-color: rgba(255, 255, 255, 0.1);
    }
}

/* Réduction du mouvement */
@media (prefers-reduced-motion: reduce) {
    .letter-tab,
    .tab-content,
    .tab-content-title,
    .tab-content-text,
    .tab-content-quote,
    .tab-content-image img {
        animation: none !important;
        transition: none !important;
    }
}
