/**
 * Styles Frontend pour À Retenir
 * Intégration au design Lebrief.ma
 *
 * @package A_Retenir
 */

/* Container */
.a-retenir-wrapper {
    margin: 25px 0;
    border: 1px solid #e6e6e6;
    border-radius: 3px;
    background: #fff;
    font-family: 'Lato', Arial, sans-serif;
    overflow: hidden;
}

/* Header / Bouton toggle */
.a-retenir-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 20px;
    background: #f1f1f1;
    border: none;
    border-bottom: 3px solid #ffcd00;
    cursor: pointer;
    transition: all 300ms ease;
    text-align: left;
    font-family: inherit;
}

.a-retenir-header:hover {
    background: #e9e9e9;
}

.a-retenir-header:focus {
    outline: 2px solid #ffcd00;
    outline-offset: -2px;
}

/* Titre */
.a-retenir-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #030303;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Icône titre */
.a-retenir-icon {
    fill: none;
    stroke: #ffcd00;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* Flèche toggle */
.a-retenir-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: transform 300ms ease;
    flex-shrink: 0;
}

.a-retenir-toggle svg {
    fill: none;
    stroke: #030303;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* État ouvert - rotation de la flèche */
.a-retenir-wrapper.is-open .a-retenir-toggle {
    transform: rotate(180deg);
}

/* Contenu (caché par défaut) */
.a-retenir-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
}

.a-retenir-wrapper.is-open .a-retenir-content {
    max-height: 600px;
}

/* Liste */
.a-retenir-list {
    margin: 0;
    padding: 20px;
    list-style: none;
}

/* Item */
.a-retenir-item {
    position: relative;
    padding: 12px 0 12px 28px;
    font-size: 15px;
    line-height: 1.6;
    color: #030303;
    border-bottom: 1px solid #e6e6e6;
    list-style: none !important;
}

.a-retenir-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.a-retenir-item:first-child {
    padding-top: 0;
}

/* Puce jaune */
.a-retenir-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 10px;
    height: 10px;
    background: #ffcd00;
    border-radius: 50%;
}

.a-retenir-item:first-child::before {
    top: 6px;
}

/* Responsive Mobile */
@media screen and (max-width: 768px) {
    .a-retenir-wrapper {
        margin: 20px 0;
    }

    .a-retenir-header {
        padding: 12px 15px;
    }

    .a-retenir-title {
        font-size: 14px;
        gap: 8px;
    }

    .a-retenir-icon {
        width: 18px;
        height: 18px;
    }

    .a-retenir-list {
        padding: 15px;
    }

    .a-retenir-item {
        font-size: 14px;
        padding: 10px 0 10px 24px;
    }

    .a-retenir-item::before {
        width: 8px;
        height: 8px;
        top: 16px;
    }

    .a-retenir-item:first-child::before {
        top: 6px;
    }
}

/* Animation d'entrée pour le contenu */
.a-retenir-wrapper.is-open .a-retenir-item {
    animation: fadeInUp 300ms ease forwards;
    opacity: 0;
}

.a-retenir-wrapper.is-open .a-retenir-item:nth-child(1) { animation-delay: 50ms; }
.a-retenir-wrapper.is-open .a-retenir-item:nth-child(2) { animation-delay: 100ms; }
.a-retenir-wrapper.is-open .a-retenir-item:nth-child(3) { animation-delay: 150ms; }
.a-retenir-wrapper.is-open .a-retenir-item:nth-child(4) { animation-delay: 200ms; }

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

/* Print */
@media print {
    .a-retenir-wrapper {
        border: 1px solid #000;
        page-break-inside: avoid;
    }

    .a-retenir-content {
        max-height: none !important;
    }

    .a-retenir-toggle {
        display: none;
    }

    .a-retenir-header {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
