/*
Theme Name: Pro-Dialogue
Theme URI: https://pro-dialogue-boutique.lovable.app/
Author: AI
Description: A 100% exact clone of the Lovable site's design for a WordPress blog theme.
Version: 1.0.0
Text Domain: pro-dialogue
*/

/* Core Theme Styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Nav Hover Colors Bypass */
.text-custom-navy {
    color: #151c37e6;
}

.hover-custom-green:hover {
    color: #1daf7e !important;
}

a.group:hover .group-hover-custom-green {
    color: #1daf7e !important;
}

.data-state-open-custom-green[data-state="open"] {
    color: #1daf7e !important;
}

/* Base WP Classes mappings useful to Lovable's utilities */
.aligncenter {
    display: block;
    margin: 0 auto;
}

.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

/* â”€â”€â”€ Mega Menu / Dropdown Visibility â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Hidden by default */
.menu-item.group>.megamenu-dropdown,
.menu-item.group>.sub-menu-dropdown {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.menu-item.group>.megamenu-dropdown {
    transform: translateX(-35%) translateY(8px);
}

.menu-item.group>.sub-menu-dropdown {
    transform: translateY(8px);
}

/* Visible on hover */
.menu-item.group:hover>.megamenu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-35%) translateY(0);
    pointer-events: auto;
}

.menu-item.group:hover>.sub-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Mega-menu sizing & positioning */
.megamenu-dropdown {
    left: 50%;
    width: 860px;
    max-width: 90vw;
    background-color: #ffffff;
}

/* Remove duplicate hover rule (now using a single combined one above) */

/* Ensure the main nav parent has a positioning context */
nav>ul,
#primary-navigation>ul,
.menu-primary-navigation-container>ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Sub-menu (standard) resets */
.sub-menu-dropdown {
    list-style: none;
    margin: 0;
    padding: 8px;
}

/* Each default column takes at least 155px */
.megamenu-dropdown .flex-1 {
    min-width: 155px;
}

/* Sidebar column: fixed width */
.megamenu-dropdown [class*="w-[240px]"] {
    width: 240px;
    flex-shrink: 0;
}

/* Remove default WP list styles nested inside mega menu */
.megamenu-dropdown ul,
.megamenu-dropdown li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Custom Logo Constraints */
.custom-logo-link img {
    max-height: 40px !important;
    width: auto !important;
    object-fit: contain;
}

/* ==========================================================================
   Elementor Form Widget Overrides (Matching Lovable Contact Form)
   ========================================================================== */

/* Form Wrapper */
.elementor-form:not(.dialog-widget-content):not(.elementor-search-form),
.elementor-widget-form .elementor-form {
    border-radius: 1rem !important;
    border: 1px solid hsl(var(--border) / 1) !important;
    background-color: hsl(var(--card) / 1) !important;
    padding: 2rem !important;
    box-sizing: border-box !important;
}

/* Field Group Spacing */
.elementor-form .elementor-field-group,
.elementor-widget-form .elementor-field-group {
    margin-bottom: 1.25rem !important;
}

.elementor-form .elementor-field-group:not(.elementor-field-type-submit),
.elementor-widget-form .elementor-field-group:not(.elementor-field-type-submit) {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}

/* Form Labels */
.elementor-form .elementor-field-group label,
.elementor-form .elementor-field-group label.elementor-field-label,
.elementor-widget-form .elementor-field-group label,
.elementor-widget-form .elementor-field-group label.elementor-field-label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    color: hsl(var(--foreground) / 1) !important;
    display: block !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* Form Inputs, Selects, and Textareas */
.elementor-widget-form .elementor-field-group input.elementor-field:not([type="button"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]),
.elementor-widget-form .elementor-field-group select.elementor-field,
.elementor-widget-form .elementor-field-group textarea.elementor-field {
    display: flex !important;
    width: 100% !important;
    border-radius: 0.375rem !important;
    border: 1px solid hsl(var(--input) / 1) !important;
    background-color: hsl(var(--background) / 1) !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    color: hsl(var(--foreground) / 1) !important;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none !important;
}

/* Input Focus States */
.elementor-widget-form .elementor-field-group input.elementor-field:not([type="button"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]):focus,
.elementor-widget-form .elementor-field-group select.elementor-field:focus,
.elementor-widget-form .elementor-field-group textarea.elementor-field:focus {
    outline: none !important;
    border-color: transparent !important;
    box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring)) !important;
}

/* Input Placeholders */
.elementor-widget-form .elementor-field-group input.elementor-field::placeholder,
.elementor-widget-form .elementor-field-group textarea.elementor-field::placeholder {
    color: hsl(var(--muted-foreground) / 1) !important;
    opacity: 1 !important;
}

/* Input Specifics */
.elementor-widget-form .elementor-field-group input.elementor-field:not([type="button"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]),
.elementor-widget-form .elementor-field-group select.elementor-field {
    height: 2.5rem !important;
}

/* Textarea Specifics */
.elementor-widget-form .elementor-field-group textarea.elementor-field {
    min-height: 80px !important;
}

/* Submit Button Wrapper */
.elementor-widget-form .elementor-field-type-submit {
    margin-top: 0.5rem !important;
}

/* Submit Button */
.elementor-widget-form .elementor-button,
.elementor-widget-form .elementor-button.elementor-size-sm,
.elementor-widget-form .elementor-button.elementor-size-md,
.elementor-widget-form .elementor-button.elementor-size-lg {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
    border-radius: 0.375rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    height: 2.5rem !important;
    padding: 0.5rem 1rem !important;
    width: 100% !important;
    background-color: hsl(var(--accent) / 1) !important;
    color: hsl(var(--accent-foreground) / 1) !important;
    border: none !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    font-family: inherit !important;
}

.elementor-widget-form .elementor-button:hover,
.elementor-widget-form .elementor-button.elementor-size-sm:hover,
.elementor-widget-form .elementor-button.elementor-size-md:hover,
.elementor-widget-form .elementor-button.elementor-size-lg:hover {
    background-color: hsla(var(--accent), 0.9) !important;
}

.elementor-widget-form .elementor-button:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring)) !important;
}

/* Checkboxes and Radios styling */
.elementor-widget-form .elementor-field-type-checkbox .elementor-field-option,
.elementor-widget-form .elementor-field-type-radio .elementor-field-option {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.elementor-widget-form .elementor-field-type-checkbox input[type="checkbox"],
.elementor-widget-form .elementor-field-type-radio input[type="radio"] {
    width: 1rem !important;
    height: 1rem !important;
    border-radius: 0.25rem !important;
    border: 1px solid hsl(var(--input) / 1) !important;
    background-color: hsl(var(--background) / 1) !important;
    color: hsl(var(--accent) / 1) !important;
}

/* Fix Elementor's weird column margins */
.elementor-widget-form .elementor-form .elementor-field-group {
    padding-right: 10px !important;
    padding-left: 10px !important;
}

.elementor-widget-form .elementor-row {
    margin-right: -10px !important;
    margin-left: -10px !important;
}

/* ======================================================
   SINGLE POST – Guide Article Content Typography
   ====================================================== */

.guide-article-content {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: hsl(var(--foreground) / 0.9);
}

.guide-article-content h2 {
    font-family: var(--font-display, 'Inter', sans-serif);
    font-size: 1.625rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.guide-article-content h3 {
    font-family: var(--font-display, 'Inter', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    line-height: 1.35;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.guide-article-content h4 {
    font-family: var(--font-display, 'Inter', sans-serif);
    font-size: 1.0625rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.guide-article-content p {
    margin-top: 0;
    margin-bottom: 1.4rem;
    color: hsl(var(--muted-foreground));
}

.guide-article-content a {
    color: hsl(var(--accent));
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}
.guide-article-content a:hover {
    opacity: 0.8;
}

.guide-article-content ul,
.guide-article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.guide-article-content ul {
    list-style-type: disc;
}

.guide-article-content ol {
    list-style-type: decimal;
}

.guide-article-content li {
    margin-bottom: 0.5rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.75;
}

.guide-article-content li::marker {
    color: hsl(var(--accent));
}

.guide-article-content blockquote {
    border-left: 4px solid hsl(var(--accent));
    background: hsl(var(--accent) / 0.05);
    padding: 1rem 1.25rem;
    border-radius: 0 0.75rem 0.75rem 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: hsl(var(--foreground) / 0.8);
}

.guide-article-content blockquote p {
    margin-bottom: 0;
    color: inherit;
}

.guide-article-content code {
    background: hsl(var(--muted));
    color: hsl(var(--accent));
    padding: 0.15em 0.4em;
    border-radius: 0.3em;
    font-size: 0.875em;
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
}

.guide-article-content pre {
    background: hsl(var(--primary) / 0.07);
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.guide-article-content pre code {
    background: none;
    color: hsl(var(--foreground));
    padding: 0;
    font-size: 0.875rem;
}

.guide-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 1.5rem 0;
}

.guide-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.guide-article-content th {
    background: hsl(var(--muted) / 0.5);
    color: hsl(var(--foreground));
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid hsl(var(--border));
}

.guide-article-content td {
    padding: 0.65rem 1rem;
    border: 1px solid hsl(var(--border));
    color: hsl(var(--muted-foreground));
}

.guide-article-content tr:nth-child(even) td {
    background: hsl(var(--muted) / 0.2);
}

.guide-article-content hr {
    border: none;
    border-top: 1px solid hsl(var(--border));
    margin: 2.5rem 0;
}

/* First heading after the meta should not have a big top margin */
.guide-article-content > h2:first-child,
.guide-article-content > h3:first-child {
    margin-top: 0;
}


/* ======================================================
   SINGLE POST – Two-column layout (article + sidebar)
   ====================================================== */

@media (min-width: 1024px) {
    .guide-single-layout {
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 3.5rem !important;
    }

    .guide-single-layout article {
        min-width: 0;
        flex: 1 1 0%;
    }

    .guide-sidebar {
        display: block !important;
        width: 280px !important;
        flex-shrink: 0 !important;
    }
}

/* Smooth scrolling for TOC anchors */
html {
    scroll-behavior: smooth;
}

/* Ensure headings have offset when jumping from TOC */
h2[id], h3[id] {
    scroll-margin-top: 100px;
}

.article-sommaire a:hover span:last-child {
    text-decoration: underline;
}

/* ======================================================
   ARTICLE CONTENT - Tables
   ====================================================== */

.guide-article-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #f1f5f9; /* slate-100 */
    border-radius: 0.75rem; /* 12px / rounded-xl */
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); /* shadow-sm */
    text-align: left;
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem;
}

.guide-article-content thead {
    background-color: #1e293b; /* slate-800 */
    color: #ffffff;
}

.guide-article-content th {
    padding: 1rem 1.5rem; /* py-4 px-6 */
    font-weight: 600; /* font-semibold */
    border: none;
}

.guide-article-content td {
    padding: 1rem 1.5rem; /* py-4 px-6 */
    background-color: #ffffff;
    border-top: 1px solid #f1f5f9; /* divide-y / slate-100 */
    color: hsl(var(--foreground));
}

.guide-article-content tr:first-child td {
    border-top: none;
}
