/**
 * AcyMailing Subscribe - Styles UIkit 3
 * Override pour la page d'abonnement aux newsletters
 * Grille 2x2 pour les sections CNU
 */

/* ============================================
   Container principal
   ============================================ */
#acymodifyform {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   Fieldsets et legendes
   ============================================ */
#acymodifyform .jl-fieldset {
    border: 1px solid #e5e5e5;
    padding: 20px;
    border-radius: 6px;
    background: #fafafa;
}

#acymodifyform .jl-legend {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f7173;
    padding: 0 10px;
    background: #fafafa;
}

/* ============================================
   Formulaire utilisateur
   ============================================ */
#acyuserinfo .acy_onefield {
    margin-bottom: 15px;
}

#acyuserinfo .jl-form-label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

#acyuserinfo .jl-input {
    width: 100%;
    max-width: 300px;
}

/* ============================================
   Container newsletters
   ============================================ */
#newslist2020 {
    margin-top: 15px;
}

/* ============================================
   Newsletters globales
   ============================================ */
.globalnews {
    background: linear-gradient(135deg, #0f7173 0%, #0d6163 100%);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.globalnews-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.globalnews-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.globalnews .abcard {
    flex: 1 1 calc(50% - 10px);
    min-width: 200px;
    background: rgba(255,255,255,0.95);
    border-radius: 6px;
    padding: 12px 15px;
}

.globalnews .abcard:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============================================
   Sections CNU - Grille 2x2
   ============================================ */
.cnu-section-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.cnu-section-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.cnu-section-title {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: 0;
    padding: 12px 15px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #0f7173;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cnu-bullet {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #0f7173;
    border-radius: 2px;
}

.cnu-section-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 350px;
    overflow-y: auto;
}

/* Scrollbar personnalisee */
.cnu-section-content::-webkit-scrollbar {
    width: 6px;
}

.cnu-section-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cnu-section-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.cnu-section-content::-webkit-scrollbar-thumb:hover {
    background: #0f7173;
}

/* ============================================
   Cartes de newsletters (abcard)
   ============================================ */
.cnu-section-content .abcard {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    padding: 0;
    transition: all 0.15s ease;
}

.cnu-section-content .abcard:hover {
    background: #fff;
    border-color: #0f7173;
    box-shadow: 0 2px 6px rgba(15, 113, 115, 0.12);
}

/* ============================================
   Checkbox personnalisee avec label
   ============================================ */
.cardcont {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 10px 12px 10px 38px;
    min-height: 20px;
    margin: 0;
    width: 100%;
}

.cardcont input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 3px;
    transition: all 0.15s ease;
}

.cardcont:hover .checkmark {
    border-color: #0f7173;
}

.cardcont input:checked ~ .checkmark {
    background-color: #0f7173;
    border-color: #0f7173;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.cardcont input:checked ~ .checkmark:after {
    display: block;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Nom de la newsletter */
.subname {
    font-size: 0.82rem;
    line-height: 1.3;
    color: #444;
    font-weight: 500;
}

.cardcont:hover .subname {
    color: #0f7173;
}

/* ============================================
   Bouton de soumission
   ============================================ */
#acymodifyform .jl-button-primary {
    background: linear-gradient(135deg, #0f7173 0%, #0d6163 100%);
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #fff;
}

#acymodifyform .jl-button-primary:hover {
    background: linear-gradient(135deg, #0d6163 0%, #0a5052 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(15, 113, 115, 0.35);
}

/* ============================================
   Alertes et messages
   ============================================ */
#acymodifyform .jl-alert-primary {
    background: #e8f4f5;
    border-left: 4px solid #0f7173;
    color: #333;
    padding: 15px 20px;
    border-radius: 0 6px 6px 0;
}

#acymodifyform .jl-alert-success {
    background: #e8f8e8;
    border-left: 4px solid #32a852;
    color: #333;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 959px) {
    .globalnews .abcard {
        flex: 1 1 100%;
    }

    .cnu-section-content {
        max-height: 280px;
    }
}

@media (max-width: 639px) {
    #acymodifyform {
        padding: 10px;
    }

    #acymodifyform .jl-fieldset {
        padding: 15px;
    }

    .globalnews {
        padding: 15px;
    }

    .cnu-section-title {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    .cnu-section-content {
        padding: 12px;
        max-height: 250px;
    }

    .subname {
        font-size: 0.8rem;
    }

    .cardcont {
        padding: 8px 10px 8px 34px;
    }

    .checkmark {
        height: 16px;
        width: 16px;
        left: 8px;
    }

    .cardcont input:checked ~ .checkmark:after {
        left: 4px;
        top: 1px;
        width: 4px;
        height: 8px;
    }
}

/* ============================================
   Tooltips UIkit 3
   ============================================ */
.jl-tooltip {
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ============================================
   Page de desinscription
   ============================================ */
#unsubpage {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

#unsubpage .unsubdiv {
    margin-bottom: 15px;
    padding: 10px;
    background: #fafafa;
    border-radius: 4px;
}

#unsubpage .unsubsurvey {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

#unsubpage .unsubsurveytext {
    font-weight: 500;
    margin-bottom: 10px;
    color: #0f7173;
}

#unsubpage textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-family: inherit;
}

#unsubpage .acymailing_button_grey {
    display: inline-block;
    padding: 10px 20px;
    background: #666;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

#unsubpage .acymailing_button_grey:hover {
    background: #444;
}

/* ============================================
   Etats des newsletters (indicateur visuel)
   ============================================ */
.abcard.subscribed {
    border-left: 3px solid #0f7173;
}

/* Animation au changement d'etat */
.abcard {
    transition: all 0.2s ease;
}

.cardcont input:checked ~ .subname {
    color: #0f7173;
    font-weight: 600;
}
