/*
    ==========================================================
    PROJECT : SITE-GENERIQUE
    FILE    : css/sidebar-widget.css
    AUTH    : Renaud
    CREATED : 27 décembre 2025
    UPDATED : 07 mars 2026
    ==========================================================
*/

/**
*   @project        SITE-GENERIQUE
*   @description    Le "Moule" commun des widgets de la sidebar.
*                   Style Mousel Elec : ombre diagonale + angles arrondis.
*                   Gère le titre et la structure interne commune.
*   
*   @file           css/sidebar-widget.css
*
*   @see            css/sidebar-content.css
*   @see            css/color-semantic.css
*   @see            includes/sidebar-widget-*.php
*
*   @note           Les fichiers sidebar-widget-*.css (about, cta, card, etc.)
*                   gèrent uniquement le contenu spécifique de chaque widget.
*/


/* --- BLOCK : Sidebar Widget --- */
.sidebar-widget {
    /* PLACEMENT */
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    /* VISUEL : Style Mousel Elec + arrondis */
    background-color: var(--color-white);
    border: 1px solid var(--color-sidebar-border);
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--color-sidebar-shadow);
    /* EFFET */
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-widget:hover {
    /* VISUEL */
    border-color: var(--color-sidebar-accent);
    box-shadow: 0 4px 12px var(--color-sidebar-shadow);
    /* EFFET */
    transform: translateY(-3px);
}

.sidebar-widget:last-child {
    /* PLACEMENT */
    margin-bottom: 0;
}


/* --- ELEMENT : Titre du Widget --- */
.sidebar-widget__title {
    /* PLACEMENT */
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    /* VISUEL */
    border-bottom: 2px solid var(--color-sidebar-accent);
    /* TEXTE */
    font-family: var(--font-family-sans);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-sidebar);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* --- ELEMENTS : Structure Interne Commune --- */

/* Zone Visuelle (Avatar, Image produit, etc.) */
.sidebar-widget__visual {
    /* PLACEMENT */
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

/* Zone de Contenu (Bio, Description, Listes) */
.sidebar-widget__body {
    /* PLACEMENT */
    margin-bottom: 1.25rem;
}

.sidebar-widget__body:last-child {
    /* PLACEMENT */
    margin-bottom: 0;
}

/* Zone d'Action (Bouton CTA) */
.sidebar-widget__action {
    /* PLACEMENT */
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

/* Zone de Pied (Petites notes, mentions) */
.sidebar-widget__footer {
    /* PLACEMENT */
    margin-top: 1.25rem;
    /* TEXTE */
    font-family: var(--font-family-sans);
    font-size: 0.8rem;
    font-style: italic;
    color: var(--color-text-muted);
    text-align: center;
}


/* --- MODIFIER : Widget Highlight (Promo) --- */
.sidebar-widget--highlight {
    /* VISUEL */
    border: 1px solid var(--color-orange-180);
}


/* --- RESPONSIVE (Tablette < 1150px) --- */
@media (max-width: 1150px) {
    .sidebar-widget {
        /* PLACEMENT */
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .sidebar-widget__title {
        /* PLACEMENT */
        margin-bottom: 1rem;
        /* TEXTE */
        font-size: 0.95rem;
    }
}


/* --- RESPONSIVE (Mobile < 768px) --- */
@media (max-width: 768px) {
    .sidebar-widget {
        /* PLACEMENT */
        padding: 1rem;
        margin-bottom: 1rem;
        /* VISUEL */
        border-radius: 8px;
    }

    .sidebar-widget__title {
        /* PLACEMENT */
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        /* TEXTE */
        font-size: 0.9rem;
    }

    .sidebar-widget__visual,
    .sidebar-widget__body,
    .sidebar-widget__action {
        /* PLACEMENT */
        margin-bottom: 1rem;
    }
}


/* 
   ==========================================================================
   DEBUG (À retirer en production ou commenter)
   ========================================================================== 
*/

/* .sidebar-widget         { border: 2px dashed red; } */
/* .sidebar-widget__title  { border: 2px dotted orangered; } */
/* .sidebar-widget__visual { border: 2px dotted yellow; } */
/* .sidebar-widget__body   { border: 2px dotted greenyellow; } */
/* .sidebar-widget__action { border: 2px dotted green; } */
/* .sidebar-widget__footer { border: 2px dotted cyan; } */