/* ==========================================================================
   Styles pour le template "Modèle avec sommaire" (template 2)
   Harmonisation avec le style du template produit
   Conforme à la charte graphique Opquast
   ========================================================================== */

/* ==========================================================================
   VARIABLES CHARTE OPQUAST
   ========================================================================== */

/* Note: Les variables CSS sont désormais centralisées dans _variables.css */

/* ==========================================================================
   SIDEBAR SOMMAIRE - Style Card
   ========================================================================== */

/* Card container - fond blanc, structure en 3 parties */
.page-template-page-template-2-avec-sommaire .c-summary,
.c-opposite-toc .c-summary {
    background: var(--opq-bg-white);
    border: 1.5px solid var(--opq-border);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Header du sommaire - style identique au sticky produit */
.page-template-page-template-2-avec-sommaire .c-summary__title,
.c-opposite-toc .c-summary__title {
    display: block;
    padding: 24px 24px 20px 24px;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--opq-text-body);
    border-bottom: 1.5px solid var(--opq-border-light);
    background: var(--opq-bg-light);
    text-align: left;
}

/* CTA en bas du sommaire - fond blanc */
.page-template-page-template-2-avec-sommaire .c-summary .call-to-action,
.c-opposite-toc .c-summary .call-to-action {
    padding: 20px 24px;
    background: var(--opq-bg-white);
}

.page-template-page-template-2-avec-sommaire .c-summary__title .c-highlight,
.c-opposite-toc .c-summary__title .c-highlight {
    color: inherit;
    background: none;
    padding: 0;
}

/* ==========================================================================
   LIENS DU SOMMAIRE - Style interactif
   ========================================================================== */

/* Container des liens - fond blanc */
.page-template-page-template-2-avec-sommaire .c-summary ul,
.c-opposite-toc .c-summary ul {
    list-style: none;
    margin: 0;
    padding: 16px 0;
    background: var(--opq-bg-white);
}

.page-template-page-template-2-avec-sommaire .c-summary li,
.c-opposite-toc .c-summary li {
    margin: 0;
    padding: 0;
}

/* Liens du sommaire - Style sticky certification */
.page-template-page-template-2-avec-sommaire .c-summary__link,
.c-opposite-toc .c-summary__link {
    display: block;
    padding: 16px 24px 16px 64px;
    color: var(--opq-navy-light);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    transition: all 0.2s ease;
    position: relative;
    border-left: none !important;
}

/* Émoticône dans cercle coloré - Style sticky certification */
.page-template-page-template-2-avec-sommaire .c-summary__link::before,
.c-opposite-toc .c-summary__link::before {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--opq-turquoise-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

/* Émoticônes par position - DÉSACTIVÉ (remplacé par système de classes)
   Voir css/emoji-classes.css pour le nouveau système
.c-summary li:nth-child(1) .c-summary__link::before { content: "🎨"; }
.c-summary li:nth-child(2) .c-summary__link::before { content: "📚"; }
.c-summary li:nth-child(3) .c-summary__link::before { content: "🎓"; }
.c-summary li:nth-child(4) .c-summary__link::before { content: "🚀"; }
.c-summary li:nth-child(5) .c-summary__link::before { content: "🏁"; }
.c-summary li:nth-child(n+6) .c-summary__link::before { content: "📌"; }
*/

/* Emoji par défaut si aucune classe spécifique */
.c-summary__link::before { content: "📌"; }

/* Hover */
.page-template-page-template-2-avec-sommaire .c-summary__link:hover,
.c-opposite-toc .c-summary__link:hover {
    color: var(--opq-turquoise);
    border-left: none !important;
}

/* Lien actif */
.page-template-page-template-2-avec-sommaire .c-summary__link[aria-current="true"],
.page-template-page-template-2-avec-sommaire .c-summary__link.is-active,
.c-opposite-toc .c-summary__link[aria-current="true"],
.c-opposite-toc .c-summary__link.is-active {
    color: var(--opq-turquoise);
    font-weight: 700;
    background: transparent;
    border-left: none !important;
}

/* ==========================================================================
   CONTENU - Blocs et typographie
   ========================================================================== */

/* Blockquotes style unifié */
.page-template-page-template-2-avec-sommaire .s-cms blockquote,
.c-opposite-toc__content blockquote {
    background: var(--opq-gray-lighter);
    border-left: 4px solid var(--opq-turquoise, #1C9B9C);
    border-radius: 0 8px 8px 0;
    padding: 24px;
    margin: 24px 0;
    font-style: normal;
}

.page-template-page-template-2-avec-sommaire .s-cms blockquote p:last-child,
.c-opposite-toc__content blockquote p:last-child {
    margin-bottom: 0;
}

/* Page Assurance Qualité Web (ID: 7299) - Citations sans filet gauche */
.page-id-7299 .s-cms blockquote,
.page-id-7299 .c-opposite-toc__content blockquote,
.page-id-7299 blockquote {
    border-left: none !important;
    border-radius: 8px;
    background: var(--opq-gray-lighter);
}

/* Titres H2 - Style avec cercle + emoji */
/* Appliqué à tous les templates SAUF page produit */
body:not(.page-template-page-template-3-produit) .s-cms h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--opq-navy-light);
    line-height: 1.4;
    margin-top: 32px;
    margin-bottom: 12px;
}

/* Dark mode - H2 en blanc */
:root[data-theme="dark"] body:not(.page-template-page-template-3-produit) .s-cms h2 {
    color: #fff;
}

/* Cercle avec emoji avant le H2 - Style de base */
body:not(.page-template-page-template-3-produit) .s-cms h2::before {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--opq-turquoise-light);
    border-radius: 50%;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Émoticônes par position - DÉSACTIVÉ (remplacé par système de classes)
   Voir css/emoji-classes.css pour le nouveau système
body:not(.page-template-page-template-3-produit) .s-cms h2:nth-of-type(1)::before { content: "🎨"; }
body:not(.page-template-page-template-3-produit) .s-cms h2:nth-of-type(2)::before { content: "📚"; }
body:not(.page-template-page-template-3-produit) .s-cms h2:nth-of-type(3)::before { content: "🎓"; }
body:not(.page-template-page-template-3-produit) .s-cms h2:nth-of-type(4)::before { content: "🚀"; }
body:not(.page-template-page-template-3-produit) .s-cms h2:nth-of-type(5)::before { content: "🏁"; }
body:not(.page-template-page-template-3-produit) .s-cms h2:nth-of-type(n+6)::before { content: "📌"; }
*/

/* Emoji par défaut pour H2 sans classe spécifique */
body:not(.page-template-page-template-3-produit) .s-cms h2:not([class*="c-emoji-"])::before { content: "📌"; }

body:not(.page-template-page-template-3-produit) .s-cms h2:first-child,
body:not(.page-template-page-template-3-produit) .s-cms .c-page-header + h2,
body:not(.page-template-page-template-3-produit) .s-cms header + h2,
body:not(.page-template-page-template-3-produit) .s-cms header + br + h2 {
    margin-top: 0;
}

/* Masquer les br parasites après le header */
body:not(.page-template-page-template-3-produit) .s-cms header + br {
    display: none;
}

/* Titres H3 */
body:not(.page-template-page-template-3-produit) .s-cms h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--opq-navy-light);
    margin-top: 24px;
    margin-bottom: 8px;
}

/* Listes à puces */
.page-template-page-template-2-avec-sommaire .s-cms ul:not([class]),
.c-opposite-toc__content ul:not([class]) {
    list-style: none;
    padding-left: 0;
    margin: 16px 0;
}

.page-template-page-template-2-avec-sommaire .s-cms ul:not([class]) li,
.c-opposite-toc__content ul:not([class]) li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
}

.page-template-page-template-2-avec-sommaire .s-cms ul:not([class]) li::before,
.c-opposite-toc__content ul:not([class]) li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--opq-turquoise, #1C9B9C);
    border-radius: 50%;
}

/* ==========================================================================
   EN-TÊTE DE PAGE (dans la colonne gauche)
   ========================================================================== */

/* Style Highlight Opquast - barre gauche turquoise + highlight texte */
/* Appliqué à tous les templates SAUF page produit */
body:not(.page-template-page-template-3-produit) .c-page-header {
    background: transparent !important;
    margin: 8px 0 0 0 !important;
    padding: 0 0 8px 20px !important;
    border-radius: 0 !important;
    border: none !important;
    position: relative !important;
}

body:not(.page-template-page-template-3-produit) .c-page-title,
body:not(.page-template-page-template-3-produit) .c-page-header h1 {
    display: inline !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: var(--opq-navy-light) !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 4px 0 0 !important;
    background: linear-gradient(to top, var(--opq-turquoise-light) 50%, transparent 50%) !important;
    border: none !important;
    box-decoration-break: clone !important;
    -webkit-box-decoration-break: clone !important;
}

body:not(.page-template-page-template-3-produit) .c-page-subtitle,
body:not(.page-template-page-template-3-produit) .c-page-header p {
    display: block !important;
    font-size: 1.1rem !important;
    color: var(--opq-text-muted) !important;
    margin: 8px 0 0 0 !important;
    line-height: 1.5 !important;
}

/* Exception pour la sidebar homepage - texte en blanc */
body:not(.page-template-page-template-3-produit) .c-page-header .c-homepage-sidebar p {
    color: var(--opq-bg-white) !important;
}

/* Sommaire aligné avec le haut du contenu */
.page-template-page-template-2-avec-sommaire .c-opposite-toc {
    align-items: flex-start;
}

/* Sommaire aligné avec le bloc H1 */
.page-template-page-template-2-avec-sommaire .c-opposite-toc__summary,
.page-template-page-template-2-avec-sommaire .c-summary,
.page-template-page-template-2-avec-sommaire .c-opposite-toc > nav {
    margin-top: 32px !important;
    position: relative !important;
    top: 0 !important;
}

/* ==========================================================================
   CALL-TO-ACTION OQ START - Bords arrondis
   ========================================================================== */

.c-cta-oq-start {
    border-radius: 16px !important;
    overflow: hidden;
    text-align: center;
}

.c-cta-oq-start,
.c-cta-oq-start p,
.c-cta-oq-start strong {
    color: var(--opq-bg-white) !important;
}

.c-cta-oq-start h3 {
    color: var(--opq-bg-white) !important;
}

.c-cta-oq-start .o-media__illustration {
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .page-template-page-template-2-avec-sommaire .c-summary,
    .c-opposite-toc .c-summary {
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {
    .page-template-page-template-2-avec-sommaire .c-page-title {
        font-size: 1.5rem;
    }

    .page-template-page-template-2-avec-sommaire .s-cms h2,
    .c-opposite-toc__content h2 {
        font-size: 1.25rem;
        margin-top: 32px;
    }
}

/* ==========================================================================
   TEMPLATE 21 - Modèle avec sticky personnalisé
   ========================================================================== */

/* Sticky perso - tous les templates */
.c-sticky-custom {
    margin-top: 32px !important;
    position: sticky;
    top: 24px;
}

/* Contenu du sticky perso */
.c-sticky-custom .c-summary__content {
    padding: 20px 24px;
    background: var(--opq-bg-white);
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.5;
}

.c-sticky-custom .c-summary__content p {
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.c-sticky-custom .c-summary__content p:last-child {
    margin-bottom: 0;
}

.c-sticky-custom .c-summary__content h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--opq-navy-light);
    margin: 0 0 8px 0;
}

.c-sticky-custom .c-summary__content hr {
    border: none;
    border-top: 1.5px solid var(--opq-border);
    margin: 16px 0;
}

/* HR dans le contenu éditorial */
.s-cms hr {
    border: none;
    border-top: 1px solid var(--opq-border);
    margin: 24px 0;
}

/* Hérite des styles du template 2 */
.page-template-page-template-21-avec-sticky .c-page-header {
    background: transparent !important;
    margin: 8px 0 0 0 !important;
    padding: 0 0 8px 20px !important;
    border-radius: 0 !important;
    border: none !important;
    border-left: 4px solid var(--opq-turquoise) !important;
    position: relative !important;
}

.page-template-page-template-21-avec-sticky .c-page-title,
.page-template-page-template-21-avec-sticky .c-page-header h1 {
    display: inline !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: var(--opq-navy-light) !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 4px 0 0 !important;
    background: linear-gradient(to top, var(--opq-turquoise-light) 50%, transparent 50%) !important;
    border: none !important;
    box-decoration-break: clone !important;
    -webkit-box-decoration-break: clone !important;
}

.page-template-page-template-21-avec-sticky .c-page-subtitle,
.page-template-page-template-21-avec-sticky .c-page-header p {
    display: block !important;
    font-size: 1.1rem !important;
    color: var(--opq-text-muted) !important;
    margin: 8px 0 0 0 !important;
    line-height: 1.5 !important;
}

/* Masquer les br parasites après le header */
.page-template-page-template-21-avec-sticky .s-cms header + br {
    display: none;
}
