/* ============================================================
   🌿 STYLE AGRICOLE PREMIUM - Version 2.1
   PLEINE LARGEUR 100% - SANS LIMITE
   (nettoyé : menu/nav/brand retirés — voir menu.css)
   ============================================================ */

/* ===== IMPORTS POLICES ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;700;800;900&family=Tajawal:wght@300;400;500;700;800;900&family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Noto+Sans+Arabic:wght@300;400;500;700&display=swap');

:root {
    /* ============================================================
       COULEURS AGRICOLES
       ============================================================ */
    --agri-green-dark: #1a4d3a;
    --agri-green-deep: #795548;
    --agri-green: #40916c;
    --agri-green-light: #52b788;
    --agri-green-pale: #b7e4c7;
    --agri-green-mist: #ffffff;
    --agri-gold: #2c7b2f;
    --agri-gold-light: #e8d5a3;
    --agri-earth: #8b7355;
    --agri-earth-light: #b8a08a;
    --agri-white: #d2f3c44a;
    --agri-bg: #f5f7f2;
    --agri-text: #1e2f1e;
    --agri-text-light: #3d5a3d;
    --agri-text-muted: #6a7f6a;

    --agri-vert-fonce: #2e5d34;
    --agri-vert: #4a8b4f;
    --agri-vert-clair: #e8f3e9;
    --agri-terre: #8b5e3c;
    --agri-terre-clair: #f5ede4;
    --agri-texte: #2c2c2c;
    --agri-texte-doux: #5f6b5f;
    --agri-bordure: #d9e2d9;
    --agri-blanc: #ffffff;
    --agri-ombre: 0 4px 20px rgba(46, 93, 52, 0.08);

    /* ============================================================
       ALIAS
       ============================================================ */
    --primary-color: var(--agri-green-deep);
    --secondary-color: var(--agri-earth);
    --success-color: var(--agri-green);
    --danger-color: #c0392b;
    --warning-color: var(--agri-gold);
    --info-color: #17a2b8;
    --light-bg: var(--agri-green-mist);
    --dark-bg: var(--agri-text);
    --body-bg: var(--agri-bg);
    --text-color: var(--agri-text);
    --text-muted: var(--agri-text-muted);

    /* ============================================================
       OMBRES
       ============================================================ */
    --shadow-sm: 0 2px 8px rgba(26, 77, 58, 0.06);
    --shadow-md: 0 4px 24px rgba(26, 77, 58, 0.10);
    --shadow-lg: 0 12px 48px rgba(26, 77, 58, 0.14);

    /* ============================================================
       BORDURES
       ============================================================ */
    --border-radius-sm: 8px;
    --border-radius-md: 14px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
    --border-radius-full: 9999px;

    /* ============================================================
       ESPACEMENTS
       ============================================================ */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* ============================================================
       TYPOGRAPHIE
       ============================================================ */
    --font-body: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    --font-heading: 'Cairo', 'Plus Jakarta Sans', 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-arabic: 'Cairo', 'Noto Sans Arabic', 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'Cairo', 'JetBrains Mono', 'Cascadia Code', monospace;
    --font-display: var(--font-heading);
    --font-primary: var(--font-body);

    /* ============================================================
       TAILLES DE POLICE
       ============================================================ */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-md: 1.05rem;
    --text-lg: 1.15rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.50rem;
    --text-3xl: 1.75rem;
    --text-4xl: 2rem;

    /* ============================================================
       INTERLIGNES
       ============================================================ */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.6;
    --leading-relaxed: 1.75;
    --leading-loose: 2;

    /* ============================================================
       ESPACEMENT ENTRE LES LETTRES
       ============================================================ */
    --tracking-tight: -0.02rem;
    --tracking-normal: 0;
    --tracking-wide: 0.02rem;
    --tracking-wider: 0.04rem;

    /* ============================================================
       POIDS DES POLICES
       ============================================================ */
    --weight-light: 300;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;

    /* ============================================================
       TRANSITIONS
       ============================================================ */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* ============================================================
       TAILLE DE BASE
       ============================================================ */
    --font-size-base: 16px;
    --line-height-base: 1.6;
}

/* ============================================================
   RÉINITIALISATION COMPLÈTE - PLEINE LARGEUR
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    margin: 0.5em !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 780px;
    overflow-x: clip !important;
    overflow-y: visible !important;

    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    line-height: var(--leading-relaxed);
    color: var(--agri-text);
    background: var(--agri-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* SUPPRESSION DE TOUTES LES LIMITES DE LARGEUR */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl,
.site-grid,
.site-wrapper,
#main-content,
main,
.content,
[class*="container"] {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

[class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.com-content-article.item-page {
    margin: 1rem;
    padding: 1rem;
}

/* ============================================================
   POSITIONS - PLEINE LARGEUR 100%
   ============================================================ */

/* ----- TOP-BAR ----- */
.top-bar {
    background-color: var(--agri-green-mist);
    color: var(--agri-green-dark);
    padding: 6px 20px !important;
    min-height: 38px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
}

.top-bar a {
    padding: 4px 8px !important;
    font-size: 13px !important;
}

.top-bar .social-icons a {
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    font-size: 13px !important;
}

.top-bar .contact-info {
    gap: 12px !important;
}

.top-bar .contact-info span {
    padding: 2px 0 !important;
}

/* ----- HEADER ----- */
.header {
    background: linear-gradient(135deg, var(--agri-green-deep), var(--agri-green-dark));
    color: var(--agri-white);
    padding: 2rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.header::before {
    content: '🌾';
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 5rem;
    opacity: 0.08;
}

.header::after {
    content: '🌿';
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 5rem;
    opacity: 0.08;
}

.header h1 {
    font-family: var(--font-heading);
    font-weight: var(--weight-extrabold);
    font-size: var(--text-4xl);
    color: var(--agri-white);
    margin-bottom: 0.25rem;
    letter-spacing: var(--tracking-tight);
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.header .subtitle {
    font-size: var(--text-lg);
    font-weight: var(--weight-light);
    opacity: 0.85;
    color: var(--agri-white);
    letter-spacing: var(--tracking-wide);
}

/* ----- SEARCH ----- */
.search {
    background: var(--agri-white);
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--agri-green-pale);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.search input[type="text"],
.search .search-input {
    padding: 0.7rem 1.25rem;
    border: 2px solid var(--agri-green-pale);
    border-radius: var(--border-radius-full);
    background: var(--agri-bg);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--agri-text);
    transition: all var(--transition-base);
    width: 320px;
    max-width: 100%;
}

.search input[type="text"]:focus,
.search .search-input:focus {
    outline: none;
    border-color: var(--agri-green);
    box-shadow: 0 0 0 4px rgba(64, 145, 108, 0.12);
    background: var(--agri-white);
}

.search button,
.search .search-btn {
    padding: 0.7rem 1.75rem;
    background: linear-gradient(135deg, var(--agri-green-deep), var(--agri-green));
    color: var(--agri-white);
    border: none;
    border-radius: var(--border-radius-full);
    font-family: var(--font-body);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.search button::before {
    content: '🔍';
    font-size: 0.9rem;
}

.search button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--agri-green-dark), var(--agri-green-deep));
}

/* ----- BANNER ----- */
.banner {
    margin: 1rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 50px;
}

.banner h2 {
    font-family: var(--font-heading);
    font-weight: var(--weight-extrabold);
    font-size: var(--text-3xl);
    color: var(--agri-green-deep);
    margin-bottom: 0.5rem;
    position: relative;
}

.banner p {
    font-size: var(--text-lg);
    color: var(--agri-text-light);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.banner .banner-badge {
    display: inline-block;
    background: var(--agri-gold);
    color: var(--agri-text);
    padding: 0.25rem 1.25rem;
    border-radius: var(--border-radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    margin-bottom: 0.75rem;
}

/* ----- SLIDESHOW SECTION ----- */
.slideshow-section {
    margin: 3px 0;
    text-align: center;
    overflow: hidden;
    width: 100%;
}

.slideshow-section h2 {
    font-family: var(--font-heading, 'Tajawal', sans-serif);
    font-weight: var(--weight-extrabold, 800);
    font-size: var(--text-3xl, 1.75rem);
    color: var(--agri-green-deep, #2d6a4f);
    margin-bottom: 0.5rem;
    position: relative;
}

.slideshow-section p {
    font-size: var(--text-lg, 1.15rem);
    color: var(--agri-text-light, #3d5a3d);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.slideshow-section .banner-badge {
    display: inline-block;
    background: var(--agri-gold, #c9a84c);
    color: var(--agri-text, #1e2f1e);
    padding: 0.25rem 1.25rem;
    border-radius: var(--border-radius-full, 9999px);
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--weight-bold, 700);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider, 0.04em);
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .slideshow-section {
        padding: 3px;
    }
    .slideshow-section h2 {
        font-size: 1.5rem;
    }
    .slideshow-section p {
        font-size: 1rem;
    }
}

/* ----- SECTIONS ----- */
.section {
    display: flex;
    background: var(--agri-white);
    border-bottom: 1px solid var(--agri-green-pale);
    transition: all var(--transition-base);
    width: 100%;
}

.section:hover {
    background: var(--agri-bg);
}

.section-title {
    background: var(--agri-white);
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--text-xl);
    color: var(--agri-green-deep);
    border-bottom: 3px solid var(--agri-gold);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.section-title .title-icon {
    font-size: 1.5rem;
}

.section-left {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 1.75rem 2rem;
    background: var(--agri-green-mist);
    border-right: 1px solid var(--agri-green-pale);
}

.section-left h3,
.section-left .left-title {
    font-family: var(--font-heading);
    font-weight: var(--weight-semibold);
    font-size: var(--text-lg);
    color: var(--agri-green-deep);
    margin-bottom: 1rem;
}

.section-left ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-left ul li {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    cursor: default;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-left ul li::before {
    content: '🌱';
    font-size: 0.8rem;
    opacity: 0.6;
}

.section-left ul li:hover {
    background: var(--agri-green-pale);
    transform: translateX(4px);
}

.section-left ul li a {
    color: var(--agri-text);
    text-decoration: none;
    flex: 1;
}

.section-left ul li a:hover {
    color: var(--agri-green-deep);
    text-decoration: none;
}

.section-content {
    flex: 0 0 66.666666%;
    max-width: 66.666666%;
    padding: 1.75rem 2rem;
    background: var(--agri-white);
}

.section-content h2 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--text-2xl);
    color: var(--agri-text);
    margin-bottom: 0.75rem;
}

.section-content p {
    font-size: var(--text-md);
    line-height: var(--leading-relaxed);
    color: var(--agri-text-light);
    margin-bottom: 0.75rem;
}

.section-content .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--agri-green-deep);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.section-content .read-more::after {
    content: '→';
    transition: transform var(--transition-fast);
}

.section-content .read-more:hover::after {
    transform: translateX(6px);
}

.section-content .read-more:hover {
    color: var(--agri-gold);
    text-decoration: none;
}

/* Section 1 */
.section1-title {
    background: var(--agri-white);
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--text-xl);
    color: var(--agri-green-deep);
    border-bottom: 3px solid var(--agri-green);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.section1-title::before {
    content: '🌾';
    font-size: 1.5rem;
}

.section1-left {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 1.75rem 2rem;
    background: #f0f7f0;
    border-right: 1px solid var(--agri-green-pale);
}

.section1-content {
    flex: 0 0 66.666666%;
    max-width: 66.666666%;
    padding: 1.75rem 2rem;
    background: var(--agri-white);
}

/* Section 2 */
.section2-title {
    background: var(--agri-white);
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--text-xl);
    color: var(--agri-green-deep);
    border-bottom: 3px solid var(--agri-gold);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.section2-title::before {
    content: '🌿';
    font-size: 1.5rem;
}

.section2-left {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 1.75rem 2rem;
    background: #faf6ed;
    border-right: 1px solid var(--agri-green-pale);
}

.section2-content {
    flex: 0 0 66.666666%;
    max-width: 66.666666%;
    padding: 1.75rem 2rem;
    background: var(--agri-white);
}

/* Section 3 */
.section3-title {
    background: var(--agri-white);
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--text-xl);
    color: var(--agri-green-deep);
    border-bottom: 3px solid var(--agri-earth);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.section3-title::before {
    content: '🌻';
    font-size: 1.5rem;
}

.section3-left {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 1.75rem 2rem;
    background: #f5f0eb;
    border-right: 1px solid var(--agri-green-pale);
}

.section3-content {
    flex: 0 0 66.666666%;
    max-width: 66.666666%;
    padding: 1.75rem 2rem;
    background: var(--agri-white);
}

/* ----- COMPONENT ----- */
.front-page {
    width: 100%;
    height: 120px;
    background: url('../../../images/caw-Jijel-title-bg.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.component {
    background: var(--agri-white);
    padding: 1.75rem 2rem;
    margin: 1.5rem 2rem;
    border: 2px dashed var(--agri-green-pale);
    border-radius: var(--border-radius-lg);
    position: relative;
    transition: all var(--transition-base);
    width: calc(100% - 4rem);
}

.component::before {
    content: '🧩';
    position: absolute;
    top: -0.75rem;
    left: 1.5rem;
    background: var(--agri-white);
    padding: 0 0.5rem;
    font-size: 1.2rem;
}

.component:hover {
    border-color: var(--agri-green);
    background: var(--agri-bg);
    box-shadow: var(--shadow-md);
}

.component h3 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--text-lg);
    color: var(--agri-green-deep);
    margin-bottom: 0.75rem;
}

.component .component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.component .component-item {
    background: var(--agri-green-mist);
    padding: 1rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

.component .component-item:hover {
    border-color: var(--agri-green-pale);
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.component .component-item .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* ----- FOOTER ----- */
.footer {
    background: var(--agri-green-dark);
    color: var(--agri-white);
    padding: 2.5rem 2rem 1rem;
    display: flex;
    flex-wrap: wrap;
    margin-top: 2rem;
    border-top: 4px solid var(--agri-gold);
    width: 100%;
}

.footer-left {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0.5rem 1.5rem;
}

.footer-left h4,
.footer-center h4,
.footer-right h4 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--text-lg);
    color: var(--agri-gold-light);
    margin-bottom: 0.75rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-left h4::after,
.footer-center h4::after,
.footer-right h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--agri-gold);
}

.footer-left p,
.footer-center p,
.footer-right p {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: rgba(255,255,255,0.75);
    margin-bottom: 0.5rem;
}

.footer-left a,
.footer-center a,
.footer-right a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-left a:hover,
.footer-center a:hover,
.footer-right a:hover {
    color: var(--agri-gold-light);
    text-decoration: none;
}

.footer-center {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0.5rem 1.5rem;
    text-align: center;
}

.footer-center ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-center ul li {
    padding: 0.25rem 0;
}

.footer-right {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0.5rem 1.5rem;
    text-align: right;
}

.footer-right .social-links {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.footer-right .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--border-radius-full);
    transition: all var(--transition-base);
    font-size: 1rem;
}

.footer-right .social-links a:hover {
    background: var(--agri-gold);
    color: var(--agri-text);
    transform: translateY(-3px);
}

.footer-bottom {
    flex: 0 0 100%;
    text-align: center;
    padding: 1rem 1rem 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 1.5rem;
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.5);
    width: 100%;
}

.footer-bottom .footer-leaf {
    display: inline-block;
    animation: spinLeaf 8s linear infinite;
}

@keyframes spinLeaf {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ----- DEBUG ----- */
.debug {
    background: rgba(255, 107, 107, 0.92);
    color: #fff;
    padding: 0.4rem 1rem;
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    border-radius: var(--border-radius-full);
    z-index: 9999;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
}

.debug::before {
    content: '🐞';
    font-size: 0.9rem;
}

/* ============================================================
   MODULES EXISTANTS
   ============================================================ */

.moduletable,
.module-container,
.card {
    /* background: var(--agri-white) !important; */
    /* border: 1px solid rgba(45, 106, 79, 0.08) !important; */
    /* border-radius: var(--border-radius-lg) !important; */
    /* padding: 0.75rem !important; */
    /* margin-bottom: 0.75rem !important; */
    /* box-shadow: var(--shadow-sm) !important; */
    /* transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important; */
    /* position: relative !important; */
    /* overflow: hidden !important; */
    /* width: 100% !important; */
    padding-bottom: 1rem;
}

.moduletable::before,
.module-container::before,
.card::before {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg,
        var(--agri-green-dark),
        var(--agri-green),
        var(--agri-gold),
        var(--agri-green-light),
        var(--agri-green-dark)
    ) !important;
    background-size: 200% 100% !important;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    animation: shimmerBorder 4s ease-in-out infinite !important;
}

@keyframes shimmerBorder {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

.moduletable::after,
.module-container::after,
.card::after {
    content: '🌿' !important;
    position: absolute !important;
    bottom: -20px !important;
    right: -10px !important;
    font-size: 6rem !important;
    opacity: 0.04 !important;
    pointer-events: none !important;
}

.moduletable:hover,
.module-container:hover,
.card:hover {
    /* box-shadow: var(--shadow-md) !important; */
    /* transform: translateY(-4px) !important; */
    /* border-color: rgba(45, 106, 79, 0.15) !important; */
}

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */

p {
    margin-bottom: 1.25rem;
    line-height: var(--leading-relaxed);
    font-family: var(--font-display);
    font-size: 1rem;
}

h1, .h1 {
    font-family: var(--font-heading);
    font-weight: var(--weight-extrabold);
    font-size: var(--text-4xl);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--agri-text);
    margin-bottom: 1.5rem;
}

h2, .h2 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--text-3xl);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--agri-green-deep);
    margin-bottom: 1.25rem;
}

h3, .h3 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--text-2xl);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
    color: var(--agri-green-deep);
    margin-bottom: 1rem;
}

h4, .h4 {
    font-family: var(--font-heading);
    font-weight: var(--weight-semibold);
    font-size: var(--text-xl);
    line-height: var(--leading-snug);
    color: var(--agri-text);
    margin-bottom: 0.75rem;
}

h5, .h5 {
    font-family: var(--font-heading);
    font-weight: var(--weight-semibold);
    font-size: var(--text-lg);
    line-height: var(--leading-snug);
    color: var(--agri-text);
    margin-bottom: 0.5rem;
}

h6, .h6 {
    font-family: var(--font-heading);
    font-weight: var(--weight-semibold);
    font-size: var(--text-md);
    line-height: var(--leading-snug);
    color: var(--agri-text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

a {
    color: var(--agri-green-deep);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    color: var(--agri-gold);
}

.sitename span {
	font-size: 2rem;
}
.sitename img {
	width: 60px;
}
/* ============================================================
   SUPPORT RTL (ARABE)
   ============================================================ */

html[dir="rtl"] body {
    font-family: var(--font-arabic);
    letter-spacing: 0;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
    font-family: var(--font-arabic);
    letter-spacing: 0;
}

html[dir="rtl"] .section-left,
html[dir="rtl"] .section1-left,
html[dir="rtl"] .section2-left,
html[dir="rtl"] .section3-left {
    border-right: none;
    border-left: 1px solid var(--agri-green-pale);
}

html[dir="rtl"] .top-bar::after {
    right: auto;
    left: 80px;
}

html[dir="rtl"] .footer-right {
    text-align: left;
}

html[dir="rtl"] .footer-right .social-links {
    justify-content: flex-start;
}

html[dir="rtl"] .footer-left h4::after,
html[dir="rtl"] .footer-center h4::after,
html[dir="rtl"] .footer-right h4::after {
    left: auto;
    right: 0;
}

html[dir="rtl"] .search {
    justify-content: flex-start;
}

html[dir="rtl"] .debug {
    right: auto;
    left: 1rem;
}

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

@media (max-width: 992px) {
    :root {
        --text-4xl: 2.5rem;
        --text-3xl: 2rem;
        --text-2xl: 1.625rem;
        --text-xl: 1.375rem;
        --text-lg: 1.125rem;
        --text-base: 0.95rem;
    }

    .section,
    .section1,
    .section2,
    .section3 {
        flex-direction: column;
        width: 100%;
    }

    .section-left,
    .section1-left,
    .section2-left,
    .section3-left {
        flex: 0 0 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--agri-green-pale);
    }

    .section-content,
    .section1-content,
    .section2-content,
    .section3-content {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .header h1 {
        font-size: var(--text-3xl);
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
    }

    .top-bar .social-icons {
        justify-content: center;
    }

    .search {
        justify-content: center;
        flex-direction: column;
        padding: 1rem;
    }

    .search input[type="text"] {
        width: 100%;
    }

    .footer {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem 0.5rem;
    }

    .footer-left,
    .footer-center,
    .footer-right {
        text-align: center;
        padding: 0.5rem 0;
        flex: 0 0 100%;
    }

    .footer-left h4::after,
    .footer-center h4::after,
    .footer-right h4::after {
        left: 50% !important;
        transform: translateX(-50%);
    }

    .footer-right .social-links {
        justify-content: center;
    }

    .header::before,
    .header::after {
        font-size: 3rem;
    }

    .header {
        padding: 1.5rem 1rem;
    }

    .component {
        margin: 1rem;
        padding: 1.25rem;
        width: calc(100% - 2rem);
    }

    .component .component-grid {
        grid-template-columns: 1fr 1fr;
    }

    .banner {
        padding: 1.5rem 1rem;
    }

    .section-left,
    .section1-left,
    .section2-left,
    .section3-left,
    .section-content,
    .section1-content,
    .section2-content,
    .section3-content {
        padding: 1rem 1.25rem;
    }

    .section-title,
    .section1-title,
    .section2-title,
    .section3-title {
        padding: 0.75rem 1.25rem;
        font-size: var(--text-lg);
    }

    .debug {
        font-size: 0.65rem;
        padding: 0.3rem 0.75rem;
        bottom: 0.5rem;
        right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: var(--text-2xl);
    }

    .banner h2 {
        font-size: var(--text-xl);
    }

    .top-bar {
        font-size: var(--text-xs);
        padding: 0.35rem 0.5rem;
    }

    .section-title,
    .section1-title,
    .section2-title,
    .section3-title {
        font-size: var(--text-base);
        padding: 0.5rem 0.75rem;
    }

    .component .component-grid {
        grid-template-columns: 1fr;
    }

    .component {
        padding: 1rem;
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }

    .section-left,
    .section1-left,
    .section2-left,
    .section3-left,
    .section-content,
    .section1-content,
    .section2-content,
    .section3-content {
        padding: 0.75rem 1rem;
    }
}

/* ============================================================
   ACCESSIBILITÉ & RÉDUCTION DE MOUVEMENT
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .moduletable::before,
    .module-container::before,
    .card::before {
        animation: none !important;
    }
}

:focus-visible {
    outline: 2px solid var(--agri-gold);
    outline-offset: 2px;
}

::selection {
    background: var(--agri-gold);
    color: var(--agri-text);
}

::-moz-selection {
    background: var(--agri-gold);
    color: var(--agri-text);
}

/* ==========================================
   SUPPRESSION DÉFINITIVE
   ========================================== */

.notification-container,
.notification-container:empty,
.debug-container,
.debug-section,
#debug-container {
    display: none !important;
}

/* ============================================
   TABLEAUX
   ============================================ */

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 1.5rem 0;
    font-size: 14px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

table thead th {
    background: #198754;
    color: #fff;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #146c43;
    font-size: 14px;
    letter-spacing: 0.5px;
}

table td,
table th {
    padding: 10px 16px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

table tbody tr:hover {
    background: #e8f5e9;
    transition: background 0.25s ease;
}

table tbody tr:last-child td {
    border-bottom: none;
}

table.bordered,
table.table-bordered {
    border: 1px solid #dee2e6;
}

table.bordered td,
table.bordered th,
table.table-bordered td,
table.table-bordered th {
    border: 1px solid #dee2e6;
}

table.striped tbody tr:nth-child(odd) {
    background: #f8f9fa;
}

table.striped tbody tr:nth-child(even) {
    background: #ffffff;
}

table.compact td,
table.compact th {
    padding: 6px 10px;
    font-size: 13px;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.table-responsive table {
    margin: 0;
    box-shadow: none;
    border-radius: 0;
    min-width: 600px;
}

table.agri-table {
    border-left: 4px solid #198754;
}

table.agri-table thead th {
    background: #1a4d3a;
}

.content table,
.article-content table,
.item-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 14px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.content table thead th,
.article-content table thead th,
.item-page table thead th {
    background: #198754;
    color: #fff;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
}

.content table td,
.content table th,
.article-content table td,
.article-content table th,
.item-page table td,
.item-page table th {
    padding: 10px 16px;
    border-bottom: 1px solid #e9ecef;
}

.content table tbody tr:nth-child(even),
.article-content table tbody tr:nth-child(even),
.item-page table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.content table tbody tr:hover,
.article-content table tbody tr:hover,
.item-page table tbody tr:hover {
    background: #e8f5e9;
}

@media (max-width: 768px) {
    table,
    .content table,
    .article-content table,
    .item-page table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table thead th,
    table td,
    table th,
    .content table thead th,
    .content table td,
    .content table th,
    .article-content table thead th,
    .article-content table td,
    .article-content table th,
    .item-page table thead th,
    .item-page table td,
    .item-page table th {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    table,
    .content table,
    .article-content table,
    .item-page table {
        font-size: 12px;
        border-radius: 4px;
    }

    table thead th,
    table td,
    table th,
    .content table thead th,
    .content table td,
    .content table th,
    .article-content table thead th,
    .article-content table td,
    .article-content table th,
    .item-page table thead th,
    .item-page table td,
    .item-page table th {
        padding: 6px 8px;
    }
}

/* Variantes couleurs */
table.green thead th { background: #2d6a4f; }
table.gold thead th  { background: #c9a84c; color: #1e2f1e; }
table.blue thead th  { background: #1a5276; }

/* Utilitaires */
table td.center,
table th.center { text-align: center; }

table td.right,
table th.right { text-align: right; }

table td.highlight,
table th.highlight {
    background: #fff3cd;
    font-weight: 600;
}

.py-5 {
    padding-top: 0rem !important;
    padding-bottom: 0rem !important;
}

/* ============================================
   BLOCKQUOTE
   ============================================ */

blockquote {
    position: relative;
    padding: 0.5rem 1rem 0.5rem 3rem;
    margin: 2rem 0;
    font-family: 'Tajawal', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.8;
    color: #1e2f1e;
    background: linear-gradient(135deg, #d4db8c, #f0ffdf);
    border-radius: 16px;
    border-left: 5px solid #198754;
    box-shadow: 0 4px 20px rgba(26, 77, 58, 0.08);
    transition: all 0.3s ease;
    animation: fadeInBlockquote 0.6s ease-out;
}

blockquote::before {
    content: '\201C';
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 3.5rem;
    font-family: Georgia, serif;
    color: #198754;
    opacity: 0.3;
    line-height: 1;
}

blockquote:hover {
    box-shadow: 0 8px 35px rgba(26, 77, 58, 0.15);
    transform: translateY(-2px);
}

blockquote footer,
blockquote cite,
blockquote .source {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d6a4f;
    font-style: normal;
    text-align: right;
}

blockquote footer::before,
blockquote cite::before,
blockquote .source::before {
    content: '— ';
    color: #c9a84c;
}

blockquote.green  { border-left-color: #198754; background: linear-gradient(135deg, #f0f7f0, #e8f3e8); }
blockquote.green::before { color: #198754; }

blockquote.gold   { border-left-color: #c9a84c; background: linear-gradient(135deg, #fdf8ee, #faf3e0); }
blockquote.gold::before  { color: #c9a84c; }
blockquote.gold footer,
blockquote.gold cite,
blockquote.gold .source  { color: #8b7355; }

blockquote.blue   { border-left-color: #1a5276; background: linear-gradient(135deg, #eaf2f8, #dce8f2); }
blockquote.blue::before  { color: #1a5276; }
blockquote.blue footer,
blockquote.blue cite,
blockquote.blue .source  { color: #1a5276; }

blockquote.purple { border-left-color: #6c3483; background: linear-gradient(135deg, #f4ecf7, #ebe3f0); }
blockquote.purple::before { color: #6c3483; }

blockquote.rose   { border-left-color: #c0392b; background: linear-gradient(135deg, #fdedec, #f8d7da); }
blockquote.rose::before  { color: #c0392b; }

blockquote.rounded {
    border-radius: 20px;
    border-left: none;
    border-top: 4px solid #198754;
    background: linear-gradient(135deg, #f8faf7, #ffffff);
    padding: 2rem 2.5rem;
}
blockquote.rounded::before { left: 1.5rem; }

blockquote.minimal {
    background: transparent;
    box-shadow: none;
    border-left: 4px solid #198754;
    padding: 0.5rem 1.5rem 0.5rem 2.5rem;
}
blockquote.minimal::before {
    font-size: 2.5rem;
    top: -0.2rem;
    left: 0.5rem;
}
blockquote.minimal:hover { transform: none; box-shadow: none; }

blockquote.elegant {
    background: #ffffff;
    border-left: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    padding: 2rem 3rem;
    text-align: center;
}
blockquote.elegant::before {
    content: '\201C';
    position: relative;
    display: block;
    font-size: 4rem;
    color: #c9a84c;
    opacity: 0.5;
    text-align: center;
    top: 0;
    left: 0;
}
blockquote.elegant footer,
blockquote.elegant cite { text-align: center; }

blockquote .quote-icon {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 1.2rem;
    color: #c9a84c;
}

@keyframes fadeInBlockquote {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

[dir="rtl"] blockquote {
    border-left: none;
    border-right: 5px solid #198754;
    padding: 1.5rem 3.5rem 1.5rem 2rem;
}
[dir="rtl"] blockquote::before {
    content: '\201D';
    left: auto;
    right: 1rem;
}
[dir="rtl"] blockquote footer,
[dir="rtl"] blockquote cite,
[dir="rtl"] blockquote .source { text-align: left; }
[dir="rtl"] blockquote.gold { border-right-color: #c9a84c; }
[dir="rtl"] blockquote.blue { border-right-color: #1a5276; }
[dir="rtl"] blockquote .quote-icon {
    margin-right: 0;
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    blockquote {
        padding: 1.25rem 1.5rem 1.25rem 2.5rem;
        font-size: 1rem;
        border-radius: 12px;
    }
    blockquote::before { font-size: 2.5rem; left: 0.75rem; }
    blockquote.elegant { padding: 1.5rem 1.5rem; }
    blockquote.elegant::before { font-size: 3rem; }
    blockquote.rounded { padding: 1.5rem; }
    [dir="rtl"] blockquote { padding: 1.25rem 2.5rem 1.25rem 1.5rem; }
    [dir="rtl"] blockquote::before { right: 0.75rem; }
}

@media (max-width: 480px) {
    blockquote { padding: 1rem 1rem 1rem 2rem; font-size: 0.95rem; }
    blockquote::before { font-size: 2rem; }
    blockquote.elegant { padding: 1rem; }
    [dir="rtl"] blockquote { padding: 1rem 2rem 1rem 1rem; }
}

/* Force le sens de lecture RTL quand la langue est l'arabe */
html[lang="ar-AA"],
html[dir="rtl"] {
    direction: rtl !important;
}

/* ============================================
   FORMULAIRE DE CONTACT
   ============================================ */

.com-contact__container,
.com-contact__form {
    padding: 2rem;
    background: var(--agri-blanc);
    border-radius: 16px;
    box-shadow: var(--agri-ombre);
    border: 1px solid var(--agri-bordure);
}

.com-contact h2 {
    color: var(--agri-vert-fonce);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--agri-vert-clair);
    position: relative;
}

.com-contact h2::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--agri-vert);
    border-radius: 3px;
}

.com-contact__thumbnail {
    text-align: center;
    margin-bottom: 1.5rem;
}

.com-contact__thumbnail img {
    border-radius: 50%;
    border: 4px solid var(--agri-vert-clair);
    padding: 4px;
    background: var(--agri-blanc);
    box-shadow: 0 4px 12px rgba(74, 139, 79, 0.15);
    transition: transform 0.3s ease;
}

.com-contact__thumbnail img:hover {
    transform: scale(1.05);
}

.com-contact__info {
    background: var(--agri-vert-clair);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--agri-vert);
}

.com-contact__address dt {
    color: var(--agri-vert-fonce);
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.com-contact__address dt:first-child {
    margin-top: 0;
}

.com-contact__address dd {
    color: var(--agri-texte-doux);
    margin-left: 1.5rem;
    margin-bottom: 0.25rem;
    line-height: 1.6;
}

.com-contact__address a {
    color: var(--agri-terre);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.com-contact__address a:hover {
    color: var(--agri-vert);
    text-decoration: underline;
}

.com-contact__form form {
    margin-top: 1.5rem;
}

.com-contact__form fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.com-contact__form legend {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--agri-terre);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--agri-bordure);
    width: 100%;
}

.control-group {
    margin-bottom: 1.25rem;
}

.control-label label {
    display: block;
    font-weight: 600;
    color: var(--agri-vert-fonce);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.control-label .star,
.control-label .red {
    color: #c0392b;
    font-weight: 700;
}

.field-spacer .text label {
    font-size: 0.85rem;
    color: var(--agri-texte-doux);
    font-weight: 400;
    font-style: italic;
}

.com-contact__form .form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    color: var(--agri-texte);
    background: var(--agri-blanc);
    border: 2px solid var(--agri-bordure);
    border-radius: 10px;
    transition: all 0.25s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.com-contact__form .form-control:focus {
    outline: none;
    border-color: var(--agri-vert);
    box-shadow: 0 0 0 4px rgba(74, 139, 79, 0.15);
    background: #fbfdfb;
}

.com-contact__form .form-control::placeholder {
    color: #a8b3a8;
    font-style: italic;
}

.com-contact__form textarea.form-control {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

altcha-widget {
    display: block;
    background: var(--agri-terre-clair);
    border: 2px solid var(--agri-bordure);
    border-radius: 10px;
    padding: 1rem;
    transition: border-color 0.25s ease;
}

altcha-widget:hover {
    border-color: var(--agri-vert);
}

.altcha-label {
    color: var(--agri-vert-fonce);
    font-weight: 500;
}

.com-contact__form .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--agri-vert) 0%, var(--agri-vert-fonce) 100%);
    color: var(--agri-blanc);
    border: none;
    padding: 0.9rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 93, 52, 0.25);
    letter-spacing: 0.5px;
}

.com-contact__form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 93, 52, 0.35);
    background: linear-gradient(135deg, var(--agri-vert-fonce) 0%, var(--agri-terre) 100%);
}

.com-contact__form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(46, 93, 52, 0.3);
}

#main-content > div.com-contact.contact h1 {
    font-size: 2em;
}

@media (max-width: 768px) {
    .com-contact__container,
    .com-contact__form {
        padding: 1.25rem;
        margin: 1rem;
        border-radius: 12px;
    }

    .com-contact__info {
        padding: 1rem;
    }

    .com-contact__form .btn-primary {
        width: 100%;
        padding: 1rem;
    }

    .com-contact__address dd {
        margin-left: 0.75rem;
    }
}

/* Grille contact */
.agri-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    align-items: stretch;
}

.agri-contact-card {
    background: var(--agri-blanc, #ffffff);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(46, 93, 52, 0.08);
    border: 1px solid var(--agri-bordure, #d9e2d9);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.agri-contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(46, 93, 52, 0.15);
}

.agri-contact-card--info {
    background: linear-gradient(135deg, #ffffff 0%, #f4faf4 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
}

.agri-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.agri-contact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--agri-vert-clair, #e8f3e9);
    border-radius: 50%;
    border: 2px solid var(--agri-vert, #4a8b4f);
}

.agri-contact-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--agri-texte-doux, #5f6b5f);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.agri-contact-value {
    display: block;
    font-size: 1.05rem;
    color: var(--agri-vert-fonce, #2e5d34);
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.2s ease;
}

a.agri-contact-value:hover {
    color: var(--agri-terre, #8b5e3c);
    text-decoration: underline;
}

.agri-contact-card--map {
    padding: 0;
    overflow: hidden;
}

.agri-map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.agri-map-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 768px) {
    .agri-contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .agri-contact-card {
        padding: 1.5rem;
    }

    .agri-map-wrapper {
        min-height: 300px;
    }

    .agri-contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .agri-contact-value {
        font-size: 0.95rem;
    }
}

#main-content > section.section-1 {
    background: #1987541f;
    border-radius: 20px;
    margin-top: 1rem;
}

/* Masquer tous les compteurs de pagination Joomla */
.com-content-category-blog__counter,
.com-content-featured__counter,
.counter.float-md-end {
    display: none !important;
}

footer [class*="col-"] {
    padding: 5px !important;
}

.readmore a .icon-chevron-right,
.readmore a [class^="icon-"],
.readmore a [class*=" icon-"] {
    display: none !important;
}

/* ============================================================
   BOUTONS — Lire la suite vs Action
   ============================================================ */

/* --- Bouton standard (Lire la suite) --- */
.readmore .btn-secondary,
.readmore .btn:not(.btn-action) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    padding: 0.55rem 1.4rem !important;
    background: linear-gradient(135deg, #2c7b2f 0%, #40916c 100%) !important;
    color: #ffffff !important;
    font-family: var(--font-body, 'Inter', sans-serif) !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 9999px !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(44, 123, 47, 0.25) !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
}

.readmore .btn-secondary:hover,
.readmore .btn:not(.btn-action):hover {
    background: linear-gradient(135deg, #40916c 0%, #1a4d3a 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 16px rgba(44, 123, 47, 0.35) !important;
}

/* --- Bouton ACTION (Demande Formation, Inscription, etc.) --- */
.readmore .btn-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    padding: 0.55rem 1.4rem !important;
    background: linear-gradient(135deg, #c9a84c 0%, #e8d5a3 100%) !important;
    color: #1e2f1e !important;
    font-family: var(--font-body, 'Inter', sans-serif) !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border-radius: 9999px !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(201, 168, 76, 0.4) !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
}

.readmore .btn-action:hover {
    background: linear-gradient(135deg, #b8973a 0%, #d4c18a 100%) !important;
    color: #1e2f1e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.55) !important;
}

/* --- Masquer le chevron (optionnel) --- */
.readmore .btn .icon-chevron-right,
.readmore .btn .icon-chevron-left {
    display: none !important;
}

/* ============================================================
   FORMULAIRE — Cellule d'écoute et d'orientation
   ============================================================ */

.agri-form-wrapper {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.agri-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(46, 93, 52, 0.08);
    border: 1px solid var(--agri-bordure, #d9e2d9);
}

.agri-form-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.agri-form-fieldset legend {
    display: block;
    width: 100%;
    font-family: var(--font-heading, 'Cairo', sans-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--agri-vert-fonce, #2e5d34);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--agri-vert-clair, #e8f3e9);
}

.agri-form-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.agri-form-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.agri-form-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.agri-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.agri-form-row label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--agri-vert-fonce, #2e5d34);
    display: flex;
    /* justify-content: space-between; */
    align-items: center;
    gap: 0.5rem;
}

.agri-form-row label .required {
    color: #c0392b;
    font-weight: 700;
}

.agri-form-counter {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--agri-texte-doux, #5f6b5f);
    font-style: italic;
}

.agri-form-counter.is-warning {
    color: #e67e22;
}

.agri-form-row input[type="text"],
.agri-form-row input[type="email"],
.agri-form-row input[type="tel"],
.agri-form-row input[type="date"],
.agri-form-row select,
.agri-form-row textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--agri-texte, #2c2c2c);
    background: #ffffff;
    border: 2px solid var(--agri-bordure, #d9e2d9);
    border-radius: 10px;
    transition: all 0.25s ease;
}

.agri-form-row input:focus,
.agri-form-row select:focus,
.agri-form-row textarea:focus {
    outline: none;
    border-color: var(--agri-vert, #4a8b4f);
    box-shadow: 0 0 0 4px rgba(74, 139, 79, 0.15);
}

.agri-form-row textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.agri-form-row input::placeholder,
.agri-form-row textarea::placeholder {
    color: #a8b3a8;
    font-style: italic;
}

/* Radio group */
.agri-form-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.agri-form-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--agri-vert-clair, #e8f3e9);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.agri-form-radio:hover {
    background: #d8e8d9;
}

.agri-form-radio input[type="radio"] {
    accent-color: var(--agri-vert, #4a8b4f);
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.agri-form-radio input[type="radio"]:checked + span {
    color: var(--agri-vert-fonce, #2e5d34);
    font-weight: 700;
}

/* Honeypot (caché) */
.agri-form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Bouton d'envoi */
.agri-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.agri-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.agri-btn-primary {
    background: linear-gradient(135deg, var(--agri-vert, #4a8b4f) 0%, var(--agri-vert-fonce, #2e5d34) 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(46, 93, 52, 0.25);
}

.agri-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 93, 52, 0.35);
}

.agri-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Message de retour */
.agri-form-message {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    margin-bottom: 1rem;
    border-left: 5px solid;
}

.agri-form-message--success {
    background: #e8f5e9;
    color: #1b5e20;
    border-color: #4caf50;
}

.agri-form-message--error {
    background: #fdecea;
    color: #b71c1c;
    border-color: #e53935;
}

/* Responsive */
@media (max-width: 768px) {
    .agri-form {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .agri-form-grid--2,
    .agri-form-grid--3 {
        grid-template-columns: 1fr;
    }

    .agri-form-actions {
        justify-content: stretch;
    }

    .agri-btn {
        width: 100%;
    }
}

/* RTL */
[dir="rtl"] .agri-form-fieldset legend,
[dir="rtl"] .agri-form-row label {
    text-align: right;
}

[dir="rtl"] .agri-form-message {
    border-left: none;
    border-right: 5px solid;
}

/* Neutraliser les marges cumulées à l'intérieur des fieldsets */
.agri-form-fieldset .agri-form-grid {
    margin-bottom: 0;
}

.agri-form-fieldset .agri-form-row {
    margin-bottom: 0;
}

/* Mais garder un espacement entre les lignes internes */
.agri-form-fieldset .agri-form-grid + .agri-form-grid,
.agri-form-fieldset .agri-form-grid + .agri-form-row,
.agri-form-fieldset .agri-form-row + .agri-form-grid,
.agri-form-fieldset .agri-form-row + .agri-form-row {
    margin-top: 1rem;       /* ← espace vertical entre les lignes */
}

/* ============================================================
   CAPTCHA — Preuve de travail
   ============================================================ */
.agri-form-row .captcha {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--agri-vert-clair, #e8f3e9);
    border: 2px solid var(--agri-bordure, #d9e2d9);
    border-radius: 10px;
}

/* Le widget Altcha lui-même */
.agri-form-row .altcha {
    font-family: inherit;
}

.agri-form-row .altcha-checkbox input[type="checkbox"] {
    accent-color: var(--agri-vert, #4a8b4f);
    width: 20px;
    height: 20px;
}

.agri-form-row .altcha-label {
    font-size: 0.9rem;
    color: var(--agri-vert-fonce, #2e5d34);
    margin-left: 0.5rem;
    cursor: pointer;
}

/* ============================================================
   CHECKBOX GROUP — Grille multi-colonnes
   ============================================================ */

.agri-form-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.4rem 1rem;
    margin-top: 0.5rem;
}

.agri-form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.9rem;
    line-height: 1.3;
}

.agri-form-checkbox:hover {
    background: var(--agri-vert-clair, #e8f3e9);
}

.agri-form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--agri-vert, #4a8b4f);
    cursor: pointer;
    flex-shrink: 0;
}

.agri-form-checkbox span {
    color: var(--agri-texte, #2c2c2c);
}

/* Responsive */
@media (max-width: 768px) {
    .agri-form-checkbox-group {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
}

.mod-languages {
    float: inline-end;
}
.nav-language {
    position: absolute;
    right: 0;
    top: 0;
}

[dir="rtl"] .nav-language {
	left: 0;
	right: unset;
}

/* ============================================================
   LAYOUT 2 COLONNES — Sidebar + Contenu
   ============================================================ */

.content-layout {
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: 2rem;
    width: 100%;
    margin: 0 auto;
}

.content-sidebar {
    width: 100%;
}

.content-main {
    width: 100%;
    min-width: 0;
}

/* Si la sidebar existe, appliquer 2 colonnes */
.content-layout:has(.content-sidebar) {
    grid-template-columns: 20% 1fr;
}

/* Sinon, contenu pleine largeur */
.content-layout:not(:has(.content-sidebar)) {
    grid-template-columns: 1fr;
}

.content-sidebar {
    width: 100%;
}

.content-main {
    width: 100%;
    min-width: 0;                       /* Évite le débordement */
}

aside.content-sidebar {
    overflow: hidden;
}

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

/* Tablette : 25% / 75% */
@media (max-width: 1200px) {
    .content-layout {
        grid-template-columns: 25% 1fr;
        gap: 1.5rem;
    }
}

/* Petite tablette : 1 colonne (sidebar au-dessus) */
@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .content-sidebar {
        order: -1;                      /* La sidebar passe au-dessus */
    }
}

/* Mobile : tout empilé */
@media (max-width: 768px) {
    .content-layout {
        gap: 1rem;
    }
}

/* ============================================================
   SIDEBAR — Cachée sur mobile
   ============================================================ */

@media (max-width: 992px) {
    .content-sidebar {
        display: none !important;
    }
    
    .content-layout {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
}

/* ============================================================
   TOP-BAR — Icônes réseaux sociaux
   ============================================================ */

.top-bar .social-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.top-bar .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--agri-vert-clair, #e8f3e9);
    color: var(--agri-vert-fonce, #2e5d34);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.top-bar .social-icons a:hover {
    background: var(--agri-vert, #4a8b4f);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(74, 139, 79, 0.3);
}

/* Couleurs spécifiques au survol (optionnel) */
.top-bar .social-icons a[href*="facebook"]:hover   { background: #1877f2; }
.top-bar .social-icons a[href*="x.com"]:hover,
.top-bar .social-icons a[href*="twitter"]:hover    { background: #000000; }
.top-bar .social-icons a[href*="instagram"]:hover  { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.top-bar .social-icons a[href*="youtube"]:hover    { background: #ff0000; }
.top-bar .social-icons a[href*="linkedin"]:hover   { background: #0077b5; }
.top-bar .social-icons a[href*="wa.me"]:hover      { background: #25d366; }

/* Responsive : cacher les icônes sur mobile */
@media (max-width: 576px) {
    .top-bar .social-icons {
        display: none;
    }
}

/* RTL */
[dir="rtl"] .top-bar .social-icons a:hover {
    transform: translateY(-2px);
}

/* ============================================================
   SIDEBAR — Cartes articles (version finale robuste)
   ============================================================ */

/* --- Conteneur du module --- */
.content-sidebar .moduletable {
    background: #ffffff;
    border-radius: 12px;
    padding: 0.85rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--agri-bordure, #d9e2d9);
    margin-bottom: 1.5rem;
    overflow: hidden;                       /* ← empêche le débordement */
}

.content-sidebar .moduletable > h3 {
    font-family: var(--font-heading, 'Cairo', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--agri-vert-fonce, #2e5d34);
    margin: 0 0 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--agri-vert-clair, #e8f3e9);
}

/* ============================================================
   CARTE ARTICLE — Simplifiée
   ============================================================ */

.content-sidebar .mod-articles-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    gap: 0;
    background: #00bcd42e;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(26, 77, 58, 0.06);
    margin-bottom: 0.85rem;
    padding: 0;
    width: 100% !important;                 /* ← largeur contrainte */
    max-width: 100%;
    min-height: 90px;
    box-sizing: border-box;
	height: 200px;
}

.content-sidebar .mod-articles-item:last-child {
    margin-bottom: 0;
}

/* ============================================================
   IMAGE
   ============================================================ */

.content-sidebar .mod-articles-image {
    flex: 0 0 80px !important;
    width: 100% !important;
    height: auto;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    background: #f0f7f0;
    order: -1;
    align-self: stretch;
}

.content-sidebar .mod-articles-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.content-sidebar .mod-articles-image img {
    width: 100% !important;
    height: 100% !important;
    min-height: 90px;
    object-fit: cover;
    display: block;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* ============================================================
   CONTENU À DROITE (titre + bouton) — dans un wrapper
   ============================================================ */

.content-sidebar .mod-articles-item-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;                /* ← CRUCIAL */
    justify-content: space-between;
    gap: 0.3rem;
    box-sizing: border-box;
    overflow: hidden;
}

/* ============================================================
   TITRE
   ============================================================ */

.content-sidebar .mod-articles-title {
    display: block;
    font-family: var(--font-heading, 'Cairo', sans-serif);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--agri-vert-fonce, #2e5d34);
    margin: 0;
    padding: 0;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.6em;
}

.content-sidebar .mod-articles-title a {
    color: inherit;
    text-decoration: none;
}

/* ============================================================
   BOUTON — En bas
   ============================================================ */

.content-sidebar .readmore {
    margin: 0;
    padding: 0;
    align-self: flex-start;
}

.content-sidebar .readmore .btn {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: linear-gradient(135deg, #c9a84c, #e8d5a3);
    color: #1e2f1e !important;
    font-size: 0.62rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.25s ease;
    white-space: nowrap;
    border: none;
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.content-sidebar .readmore .btn:hover {
    background: linear-gradient(135deg, #b8973a, #d4c18a);
    transform: translateY(-1px);
}

/* Masquer le chevron Joomla */
.content-sidebar .readmore .btn .icon-chevron-right,
.content-sidebar .readmore .btn .icon-chevron-left {
    display: none !important;
}

/* Flèche CSS */
.content-sidebar .readmore .btn::after {
    content: ' →';
}

/* ============================================================
   MASQUER LE TEXTE LONG (le `<p>` non-readmore)
   ============================================================ */

.content-sidebar .mod-articles-item-content > p:not(.readmore) {
    display: none !important;
}

/* ============================================================
   RTL
   ============================================================ */

[dir="rtl"] .content-sidebar .mod-articles-image {
    order: 1;
}

[dir="rtl"] .content-sidebar .readmore .btn::after {
    content: ' ←';
}

ul.mod-articles-items.mod-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.mod-articles-items.mod-list li {
    margin-bottom: 1rem;
}

/* ============================================================
   RTL — Ajustements sidebar
   ============================================================ */

/* Mais si vous préférez à GAUCHE */
[dir="rtl"] .content-sidebar .readmore {
    align-self: flex-end;
    margin-left: 0;
    margin-right: auto;
}

/* ============================================================
   RTL — Même ordre (image en haut)
   ============================================================ */

[dir="rtl"] .content-sidebar .mod-articles-image {
    order: -1;                              /* ← reste en premier */
}

[dir="rtl"] .content-sidebar .mod-articles-title {
    order: 0;
}

[dir="rtl"] .content-sidebar .readmore {
    order: 1;
}

/* Flèche inversée en RTL */
[dir="rtl"] .content-sidebar .readmore .btn::after {
    content: ' ←';
}

/* ============================================================
   BOUTON RETOUR EN HAUT — Version corrigée
   ============================================================ */

#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a8b4f, #2e5d34);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(46, 93, 52, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;              /* ← Augmenté */
    display: flex;              /* ← Pour centrer l'icône */
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* ✅ Classe visible — à ajouter via JS */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(46, 93, 52, 0.4);
    background: linear-gradient(135deg, #2e5d34, #4a8b4f);
}

#back-to-top i {
    color: #fff;
    font-size: 1.1rem;
}

/* ===== Barre de navigation : alignement horizontal ===== */
.menu-wrapper .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

/* Menu principal (prend l'espace disponible) */
.nav-collapse {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
}

/* Zone droite : recherche + langue */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Barre de recherche compacte */

.nav-search form {
    display: flex;
    align-items: center;
    margin: 0;
    gap: 6px;
}

.nav-search input[type="search"],
.nav-search input[type="text"] {
    width: 180px;
    padding: 6px 14px;
    border: 1px solid #ced4da;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: width 0.3s ease, border-color 0.3s ease;
}

.nav-search input[type="search"]:focus,
.nav-search input[type="text"]:focus {
    width: 240px;
    border-color: #198754;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25,135,84,0.15);
}

.nav-search button {
    background: #198754;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nav-search button:hover {
    background: #146c43;
}

/* Langue */
.nav-language {
    display: flex;
    align-items: center;
}

.nav-language select,
.nav-language .mod-languages {
    margin: 0;
}

/* ===== Responsive : empilement sur mobile ===== */
@media (max-width: 991px) {
    .menu-wrapper .container {
        flex-direction: column;
        align-items: stretch;
		gap: 0;
    }
    
    .nav-right {
        justify-content: space-between;
        width: 100%;
        padding: 8px 0;
    }
    
    .nav-search input[type="search"] {
        width: 100%;
    }
    .nav-search input[type="search"]:focus {
        width: 100%;
    }
}

/* Zone droite : recherche + langue */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    margin-left: auto;      /* pousse tout à droite */
    padding-left: 15px;
    border-left: 1px solid rgba(25, 135, 84, 0.15); /* séparateur visuel */
}

[dir="rtl"] .nav-right {
    padding-left: auto;
    border-left: auto;
    margin-right: auto;      /* pousse tout à droite */
    padding-right: 15px;
    border-right: 1px solid rgba(25, 135, 84, 0.15); /* séparateur visuel */
}

/* Recherche */
.nav-search {
    display: flex;
    align-items: center;
    margin-right: 6rem;
}

[dir="rtl"] .nav-search {
    margin-right: 0;
    margin-left: 6rem;
}

.nav-search form,
.nav-search .mod-search {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.nav-search label {
    display: none;          /* cache le label "Rechercher" */
}

.nav-search input[type="search"],
.nav-search input[type="text"] {
    width: 200px;
    height: 36px;
    padding: 6px 16px;
    border: 1px solid #ced4da;
    border-radius: 25px;
    font-size: 0.9rem;
    background: #fff;
    transition: width 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-search input[type="search"]:focus,
.nav-search input[type="text"]:focus {
    width: 260px;
    border-color: #198754;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

.nav-search button,
.nav-search .btn {
    height: 36px;
    padding: 0 14px;
    background: #198754;
    color: #fff;
    border: none;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nav-search button:hover,
.nav-search .btn:hover {
    background: #146c43;
}

/* Langue */
.nav-language {
    display: flex;
    align-items: center;
    margin: 0;
}

.nav-language .mod-languages,
.nav-language .mod-languages ul,
.nav-language .mod-languages li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-language a,
.nav-language img {
    display: inline-block;
    vertical-align: middle;
}

/* ===== Page de résultats de recherche (com_finder) ===== */
.com-finder,
.com-search {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Titre "Termes de la recherche" */
.com-finder .finder__heading,
.com-search .searchintro {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Formulaire de recherche : aligné proprement */
.com-finder form,
.com-search form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.com-finder input[type="search"],
.com-finder input[type="text"],
.com-search input[type="search"],
.com-search input[type="text"] {
    flex: 1 1 300px;
    height: 42px;
    padding: 8px 18px;
    border: 1px solid #ced4da;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.com-finder input[type="search"]:focus,
.com-search input[type="search"]:focus {
    border-color: #198754;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

.com-finder button,
.com-search button {
    height: 42px;
    padding: 0 24px;
    background: #198754;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.com-finder button:hover,
.com-search button:hover {
    background: #146c43;
}

/* Intro résultats */
.com-finder .finder__intro,
.com-search .result__intro {
    color: #495057;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.com-finder .finder__intro strong,
.com-search .result__intro strong {
    color: #198754;
    background: rgba(25, 135, 84, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Liste des résultats */
.com-finder .finder__results,
.com-search .search-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.com-finder .finder__result,
.com-search .result {
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.com-finder .finder__result:last-child,
.com-search .result:last-child {
    border-bottom: none;
}

/* URL : masquée par défaut, visible en petit au survol */
.com-finder .finder__result-url,
.com-search .result__url {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    text-decoration: none;
    margin-bottom: 6px;
    word-break: break-all;
}

.com-finder .finder__result-url:hover,
.com-search .result__url:hover {
    color: #198754;
    text-decoration: underline;
}

/* Titre du résultat */
.com-finder .finder__result-title,
.com-search .result__title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.com-finder .finder__result-title a,
.com-search .result__title a {
    color: #198754;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.com-finder .finder__result-title a:hover,
.com-search .result__title a:hover {
    color: #146c43;
    text-decoration: underline;
}

/* Extrait / description */
.com-finder .finder__result-description,
.com-search .result__description {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.com-finder .finder__result-description mark,
.com-search .result__description mark {
    background: #fff3cd;
    color: #664d03;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Meta (Type, Auteur, Catégorie, Langue) */
.com-finder .finder__result-meta,
.com-search .result__meta {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.com-finder .finder__result-meta span,
.com-search .result__meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.com-finder .finder__result-meta span::before,
.com-search .result__meta span::before {
    content: "•";
    color: #adb5bd;
    margin-right: 4px;
}

.com-finder .finder__result-meta span:first-child::before,
.com-search .result__meta span:first-child::before {
    display: none;
}

/* ============================================================
   RÉSULTATS DE RECHERCHE - STYLE MARK / TITRE / LIEN
   ============================================================ */

/* ---------- 1. SURLIGNAGE DU TERME RECHERCHÉ (<mark>) ---------- */
.com-finder mark,
.com-search mark,
.result mark,
.finder__result mark,
mark {
    background: linear-gradient(180deg, transparent 55%, #ffe28a 55%);
    color: #1a1a1a;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
    /* Alternative : surlignage jaune classique */
    /* background-color: #fff3cd; color: #664d03; */
}

/* ---------- 2. TITRE DU RÉSULTAT ---------- */
.com-finder .finder__result-title,
.com-search .result__title,
.result-title,
.result__title {
    margin: 0 0 10px 0;
    font-size: 1.35rem;
    line-height: 1.35;
    font-weight: 700;
    color: #198754;               /* vert agriculture */
    letter-spacing: -0.01em;
}

.com-finder .finder__result-title a,
.com-search .result__title a,
.result-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.com-finder .finder__result-title a:hover,
.com-search .result__title a:hover,
.result-title a:hover {
    color: #146c43;
    border-bottom-color: #198754;
}

/* ---------- 3. LIEN URL DU RÉSULTAT ---------- */
.com-finder .finder__result-url,
.com-search .result__url,
.result-url,
.result__url,
.result__link {
    display: inline-block;
    font-size: 0.82rem;
    color: #6c757d;
    text-decoration: none;
    margin-bottom: 8px;
    padding: 2px 8px;
    background: #f1f3f5;
    border-radius: 4px;
    word-break: break-all;
    transition: background 0.2s ease, color 0.2s ease;
}

.com-finder .finder__result-url:hover,
.com-search .result__url:hover,
.result-url:hover {
    background: #e9ecef;
    color: #198754;
    text-decoration: underline;
}

/* ---------- 4. LIEN DANS LA DESCRIPTION ---------- */
.com-finder .finder__result-description a,
.com-search .result__description a,
.result__description a {
    color: #198754;
    text-decoration: none;
    border-bottom: 1px dotted #198754;
}

.com-finder .finder__result-description a:hover,
.com-search .result__description a:hover {
    color: #146c43;
    border-bottom-style: solid;
}

/* ---------- 5. META (Type, Auteur, Catégorie, Langue) ---------- */
.com-finder .finder__result-meta,
.com-search .result__meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.com-finder .finder__result-meta span,
.com-search .result__meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.com-finder .finder__result-meta span:not(:last-child)::after,
.com-search .result__meta span:not(:last-child)::after {
    content: "•";
    color: #ced4da;
    margin-left: 14px;
}

/* ---------- 6. SÉPARATEUR ENTRE RÉSULTATS ---------- */
.com-finder .finder__result,
.com-search .result {
    padding: 22px 0;
    border-bottom: 1px solid #e9ecef;
}

.com-finder .finder__result:last-child,
.com-search .result:last-child {
    border-bottom: none;
}

/* ============================================================
   DATE DU RÉSULTAT DE RECHERCHE (.result__date)
   ============================================================ */

.result__date,
.finder__result-date,
.result-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #6c757d;
    background: #f1f3f5;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

/* Icône calendrier (si tu utilises FontAwesome) */
.result__date::before {
    content: "\f073";              /* fa-calendar */
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    color: #198754;
    font-size: 0.8rem;
}

/* Hover discret */
.result__date:hover {
    background: #e9ecef;
    color: #198754;
}

/* ===== Variante sans fond (plus sobre) ===== */

.result__date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 6px;
}
.result__date::before {
    content: "📅";
    font-style: normal;
}

/* ============================================================
   MASQUER L'URL DANS LES RÉSULTATS DE RECHERCHE
   ============================================================ */

/* Méthode 1 : cibler directement la classe */
.result__title-url,
.result__url,
.finder__result-url,
.result-url {
    display: none !important;
}

/* Méthode 2 : cibler aussi le lien dans le titre si besoin */
.result__link {
    display: none !important;
}

.finder__result-title a::after,
.result__title a::after {
    content: " →";
    color: #adb5bd;
    font-weight: 400;
    transition: transform 0.2s, color 0.2s;
    display: inline-block;
}

.finder__result-title a:hover::after,
.result__title a:hover::after {
    color: #198754;
    transform: translateX(4px);
}

/* Désactiver le clic sur le widget forecast7 */
.weatherInfo, 
.weatherwidget-io {
    pointer-events: none;
    cursor: default;
}

/* ============================================================
   WIDGET MÉTÉO AGRICOLE
   ============================================================ */
.weather-card {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    font-family: 'Inter', sans-serif;
    color: #1b5e20;
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(25,135,84,0.15);
}
.weather-header h3 { margin: 0; font-size: 1.3rem; }
.weather-updated { 
	/* font-size: 0.75rem;  */
	color: #555; }

/* Bloc actuel */
.weather-current {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.weather-main { text-align: center; flex: 1 1 200px; }
.weather-icon-big { font-size: 3rem; }
.weather-temp-big { font-size: 2.5rem; font-weight: 700; color: #1b5e20; }
.weather-desc { color: #2e7d32; font-weight: 500; margin: 4px 0; }
.weather-feels { 
	/* font-size: 0.9rem;  */
	color: #555; }

.weather-details {
    flex: 1 1 250px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 15px;
    align-content: center;
}
.weather-detail { 
	/* font-size: 0.88rem;  */
	color: #333; }
.weather-detail strong { color: #1b5e20; }

/* Bloc agricole */
.weather-agri {
    background: rgba(255,255,255,0.6);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}
.weather-agri h4 {
    margin: 0 0 12px 0;
    /* font-size: 1.05rem; */
    color: #1b5e20;
    border-bottom: 1px dashed rgba(25,135,84,0.3);
    padding-bottom: 6px;
}
.agri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}
.agri-item {
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-left: 3px solid #198754;
}
.agri-icon { 
	font-size: 4.2rem; }
.agri-label { 
	/* font-size: 0.78rem;  */
	color: #666; text-transform: uppercase; letter-spacing: 0.3px; }
.agri-value { 
	/* font-size: 1.1rem;  */
	font-weight: 700; color: #1b5e20; }
.agri-hint { 
	/* font-size: 0.75rem;  */
	color: #2e7d32; font-style: italic; }

/* Prévisions */
.weather-forecast h4 {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    color: #1b5e20;
}
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 6px;
}
.weather-day {
    text-align: center;
    padding: 8px 4px;
    border-radius: 10px;
    background: rgba(255,255,255,0.5);
    transition: background 0.2s;
}
.weather-day.today { background: #fff; box-shadow: 0 2px 8px rgba(25,135,84,0.15); }
.weather-day:hover { background: #fff; }
.day-name { 
	/* font-size: 0.78rem;  */
	font-weight: 600; color: #2e7d32; }
.day-icon { 
	font-size: 4.3rem; 
	margin: 4px 0; }
.day-temps { 
	font-size: 1.3rem; 
}
.day-temps .max { font-weight: 700; color: #1b5e20; }
.day-temps .min { color: #777; }
.day-rain { 
	/* font-size: 0.72rem;  */
	color: #1976d2; margin-top: 2px; }
.day-prob { 
	/* font-size: 0.7rem;  */
	color: #888; }

/* Crédit */
.weather-credit {
    display: flex;
    text-align: right;
    /* font-size: 0.72rem; */
    color: #888;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.05);
    flex-direction: row;
    justify-content: space-between;
}
.weather-credit a { color: #2e7d32; text-decoration: none; }

/* Responsive */
@media (max-width: 768px) {
    .forecast-grid { grid-template-columns: repeat(4, 1fr); }
    .weather-details { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .forecast-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   WIDGET MÉTÉO — VERSION RTL (ARABE)
   ============================================================ */
.weather-card.weather-rtl {
    direction: rtl;
    font-family: 'Tajawal', 'Noto Sans Arabic', 'Inter', sans-serif;
}

.weather-rtl .weather-header h3 {
    /* font-size: 1.35rem; */
}

.weather-rtl .agri-item {
    border-left: none;
    border-right: 3px solid #198754;
}

.weather-rtl .weather-credit {
    text-align: left;
}

.weather-rtl .weather-detail {
    /* font-size: 0.9rem; */
}

/* Ajustement de la grille de prévisions en RTL */
.weather-rtl .forecast-grid {
    direction: rtl;
}

/* Numéros en chiffres arabes (optionnel) */
.weather-rtl .weather-temp-big,
.weather-rtl .agri-value,
.weather-rtl .day-temps {
    font-variant-numeric: normal;
}

/* ============================================================
   DATE DANS LES PRÉVISIONS MÉTÉO
   ============================================================ */
.weather-day .day-date {
    /* font-size: 0.72rem; */
    color: #6c757d;
    font-weight: 500;
    margin-top: -2px;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

/* Aujourd'hui : date plus visible */
.weather-day.today .day-date {
    color: #198754;
    font-weight: 700;
}

/* Version RTL (arabe) */
[dir="rtl"] .weather-day .day-date {
    font-family: 'Tajawal', 'Noto Sans Arabic', sans-serif;
    direction: ltr;       /* Garder les chiffres en LTR pour la lisibilité */
    display: inline-block;
}

/* Ajustement responsive */
@media (max-width: 576px) {
    .weather-day .day-date {
        font-size: 0.65rem;
    }
}

/* ============================================================
   CRÉDIT DU WIDGET MÉTÉO
   ============================================================ */
.weather-credit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.75rem;
    color: #888;
}

.weather-credit__source {
    color: #888;
}

.weather-credit__source a {
    color: #2e7d32;
    text-decoration: none;
}

.weather-credit__source a:hover {
    text-decoration: underline;
}

/* Signature de la Chambre */
.weather-credit__signature {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #1b5e20;
    font-weight: 600;
    padding: 4px 10px;
    background: rgba(25, 135, 84, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(25, 135, 84, 0.15);
}

.weather-credit__by {
    font-weight: 400;
    color: #6c757d;
    font-size: 0.72rem;
}

.weather-credit__link {
    color: #198754;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.weather-credit__link:hover {
    color: #146c43;
    text-decoration: underline;
}

/* RTL (arabe) */
[dir="rtl"] .weather-credit {
    flex-direction: row-reverse;
}

[dir="rtl"] .weather-credit__signature {
    font-family: 'Tajawal', 'Noto Sans Arabic', sans-serif;
}

/* Responsive */
@media (max-width: 576px) {
    .weather-credit {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .weather-credit__signature {
        font-size: 0.72rem;
    }
}

/* ============================================================
   BANDEAU COOKIES
   ============================================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    border-top: 3px solid #198754;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transform: translateY(0);
    transition: transform 0.4s ease, opacity 0.4s ease;
    font-family: 'Inter', 'Tajawal', sans-serif;
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner.cookie-banner--hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.cookie-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    flex-wrap: wrap;
}

.cookie-banner__text {
    flex: 1 1 500px;
}

.cookie-banner__title {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    color: #1b5e20;
    font-weight: 700;
}

.cookie-banner__message {
    margin: 0;
    font-size: 0.92rem;
    color: #333;
    line-height: 1.5;
}

.cookie-banner__link {
    color: #198754;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-banner__link:hover {
    color: #146c43;
}

.cookie-banner__actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 22px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn--accept {
    background: #198754;
    color: #fff;
    border-color: #198754;
}

.cookie-btn--accept:hover {
    background: #146c43;
    border-color: #146c43;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.cookie-btn--refuse {
    background: transparent;
    color: #6c757d;
    border-color: #ced4da;
}

.cookie-btn--refuse:hover {
    background: #f8f9fa;
    border-color: #6c757d;
    color: #495057;
}

.cookie-btn:focus-visible {
    outline: 3px solid #ffc107;
    outline-offset: 2px;
}

/* ===== RTL (arabe) ===== */
[dir="rtl"] .cookie-banner {
    font-family: 'Tajawal', 'Noto Sans Arabic', sans-serif;
}

[dir="rtl"] .cookie-banner__actions {
    flex-direction: row-reverse;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 15px;
    }
    .cookie-banner__content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .cookie-banner__actions {
        flex-direction: column-reverse;
    }
    .cookie-btn {
        width: 100%;
        padding: 12px;
    }
}

/* ===== Skip link (accessibilité) ===== */
.skip-link {
    position: absolute;
    top: -60px;
    left: 10px;
    background: #198754;
    color: #fff;
    padding: 12px 20px;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #ffc107;
    outline-offset: 2px;
}
[dir="rtl"] .skip-link {
    left: auto;
    right: 10px;
}

/* ===== Focus visible partout ===== */
*:focus-visible {
    outline: 3px solid #ffc107;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Sur fond sombre */
.bg-dark *:focus-visible,
footer *:focus-visible {
    outline-color: #ffd54f;
}

/* Retirer l'outline par défaut moche mais garder focus-visible */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Boutons et liens : focus bien visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #ffc107;
    outline-offset: 2px;
}

/* ============================================================
   MODULE DATE & HEURE (mod_datetime)
   ============================================================ */
.mod-datetime {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', 'Tajawal', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #198754;
    background: rgba(25, 135, 84, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(25, 135, 84, 0.15);
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1.4;
}

/* Icône horloge avant la date */
.mod-datetime::before {
    content: "🕐";
    font-size: 0.95rem;
    display: inline-block;
    line-height: 1;
}

/* Effet au survol */
.mod-datetime:hover {
    background: rgba(25, 135, 84, 0.12);
    border-color: rgba(25, 135, 84, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.15);
}

/* ===== Version RTL (arabe) ===== */
[dir="rtl"] .mod-datetime {
    font-family: 'Tajawal', 'Noto Sans Arabic', sans-serif;
    flex-direction: row-reverse;
}

[dir="rtl"] .mod-datetime::before {
    content: "🕐";
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .mod-datetime {
        font-size: 0.78rem;
        padding: 4px 10px;
    }
    
    .mod-datetime::before {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .mod-datetime {
        font-size: 0.72rem;
        padding: 3px 8px;
    }
}

/* ===== Version discrète (sans fond, sans bordure) ===== */
/*
.mod-datetime {
    font-size: 0.85rem;
    color: #6c757d;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
}
.mod-datetime::before {
    content: "🕐 ";
    margin-right: 4px;
}
.mod-datetime:hover {
    color: #198754;
    transform: none;
    box-shadow: none;
}
*/

.moduletable.fade-in h3 {
    font-size: 2rem;
    margin: 0;
    margin-bottom: 1rem;
    padding: 0.25rem 0 0.25rem 0;
    text-align: center;
    color: #198754;
    border-bottom: 1px dashed orange;
}

.blog-featured:before {
    /* content: "À la une"; */
    font-size: 2rem;
    display: block;
    text-align: center;
    font-weight: 700;
    padding: 0.25rem 0 0 0;
    color: #198754;
    border-bottom: 1px dashed orange;
    margin-bottom: 1rem;
}

[dir="rtl"] .blog-featured:before {
    /* content: "الصفحة الأولى"; */
}

/* ============================================================
   ANNUAIRE — CHAMBRE D'AGRICULTURE
   ============================================================ */

.annuaire-jijel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* En-tête */
.article-header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 12px;
    margin-bottom: 25px;
}
.article-header h2 {
    color: #1b5e20;
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}

/* Sommaire */
.annuaire-toc {
    background: #f8f9fa;
    border-left: 5px solid #198754;
    padding: 20px 25px;
    border-radius: 8px;
    margin: 25px 0;
}
.annuaire-toc h3 {
    margin: 0 0 15px 0;
    color: #1b5e20;
    font-size: 1.1rem;
}
.annuaire-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 5px 20px;
}
.annuaire-toc a {
    color: #198754;
    text-decoration: none;
    padding: 4px 0;
    display: inline-block;
    transition: color 0.2s;
    font-size: 0.92rem;
}
.annuaire-toc a:hover {
    color: #0a3622;
    text-decoration: underline;
    padding-left: 5px;
}

/* Sections */
.annuaire-jijel section {
    margin: 30px 0;
    scroll-margin-top: 100px;
}
.annuaire-jijel section h3 {
    color: #1b5e20;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5e9;
}
.annuaire-jijel section h4 {
    color: #198754;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 15px 0 10px 0;
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
    box-shadow: 0 4px 12px rgba(25,135,84,0.1);
    transform: translateY(-2px);
}
.card h4 {
    color: #1b5e20;
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 700;
}
.card p {
    margin: 5px 0;
    font-size: 0.9rem;
}

/* Téléphone */
.phone {
    font-family: 'Courier New', monospace;
    color: #198754;
    font-weight: 500;
    font-size: 0.9rem;
}

.address { color: #495057; font-size: 0.9rem; }
.text-muted { color: #6c757d; font-size: 0.85rem; font-style: italic; }
.green-number {
    color: #198754;
    font-weight: 700;
    font-size: 1rem;
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

/* Subdivisions */
.subdivision-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}
.subdivision-list li {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #198754;
    font-size: 0.9rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}
.annuaire-jijel table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.9rem;
}
.annuaire-jijel thead th {
    background: #198754;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
}
.annuaire-jijel tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #e9ecef;
}
.annuaire-jijel tbody tr:nth-child(even) {
    background: #f8f9fa;
}
.annuaire-jijel tbody tr:hover {
    background: #e8f5e9;
}

/* Pied de page article */
.article-footer {
    text-align: center;
    padding: 25px 20px;
    background: #f8f9fa;
    margin-top: 40px;
    border-radius: 8px;
    border-top: 3px solid #198754;
}
.article-footer p {
    margin: 5px 0;
    color: #495057;
}

/* Responsive */
@media (max-width: 768px) {
    .annuaire-jijel { padding: 10px; }
    .annuaire-toc ul { columns: 1; }
    .annuaire-jijel section h3 { font-size: 1.15rem; }
    .card { padding: 12px; }
    .subdivision-list { grid-template-columns: 1fr; }
}

/* ============================================================
   BRAND TEXT — TAILLE RESPONSIVE
   ============================================================ */
.brand-text {
    font-size: clamp(0.85rem, 2.5vw, 2rem) !important;
	text-wrap: auto;
}

/* ============================================================
   MODAL EMAIL NATIF (sans Bootstrap)
   ============================================================ */
.email-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.email-modal.is-open {
    display: flex;
}

.email-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.email-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: emailModalIn 0.25s ease-out;
}

@keyframes emailModalIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.email-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #198754;
    color: #fff;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
}

.email-modal__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.email-modal__close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    padding: 0 8px;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s;
    font-weight: 300;
}

.email-modal__close:hover {
    opacity: 1;
}

.email-modal__body {
    padding: 20px;
}

.email-modal__form-group {
    margin-bottom: 15px;
}

.email-modal__label {
    display: block;
    font-weight: 600;
    color: #1b5e20;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.email-modal__input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.email-modal__input:focus {
    border-color: #198754;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

.email-modal__help {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #6c757d;
}

.email-modal__footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.email-modal__btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.email-modal__btn--cancel {
    background: #e9ecef;
    color: #495057;
}

.email-modal__btn--cancel:hover {
    background: #dee2e6;
}

.email-modal__btn--send {
    background: #198754;
    color: #fff;
}

.email-modal__btn--send:hover {
    background: #146c43;
}

.email-modal__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile */
@media (max-width: 576px) {
    .email-modal__footer {
        flex-direction: column-reverse;
    }
    .email-modal__btn {
        width: 100%;
    }
    .email-modal__dialog {
        max-height: 95vh;
    }
}

.weather-widget-cawjijel {
    background: #f8f9fa; /* Un fond très clair comme sur votre page détails */
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Tajawal', sans-serif; /* Votre police */
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.weather-widget__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.weather-widget__location {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a4d3a; /* Votre vert foncé */
}

.weather-widget__current {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.weather-widget__temp {
    font-size: 3rem;
    font-weight: 300;
    color: #1a4d3a;
}

.weather-widget__condition {
    font-size: 1rem;
    color: #6c757d;
}

.weather-widget__forecast {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
}

.weather-widget__day {
    text-align: center;
    font-size: 0.9rem;
}

.weather-widget__day-name {
    font-weight: 700;
    color: #495057;
}

/* ============================================================
   BANDE À PROPOS
   ============================================================ */
.about-bar {
    background-color: #1a1a1a;
    color: #e8e8e8;
    padding: 0.65rem 0;
    font-family: 'Inter', 'Tajawal', sans-serif;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.about-bar__logo {
    height: 32px;
    width: auto;
    filter: invert(1); /* force le logo en blanc si besoin */
}

.about-bar__text {
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.2px;
    font-style: italic;
}

.about-bar__links a {
    color: #e8e8e8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    position: relative;
    padding-inline-start: 0.75rem;
}

/* Petite puce verte devant chaque lien */
.about-bar__links li + li a::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #7ab55c;
}

.about-bar__links a:hover,
.about-bar__links a:focus {
    color: #7ab55c;
    text-decoration: underline;
}

/* Support RTL */
[dir="rtl"] .about-bar__links li + li a {
    padding-inline-start: 0;
    padding-inline-end: 0.75rem;
}
[dir="rtl"] .about-bar__links li + li a::before {
    inset-inline-start: -10px;
    inset-inline-end: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .about-bar {
        padding: 0.5rem 0;
        font-size: 0.8rem;
    }
    .about-bar__logo {
        height: 26px;
    }
    .about-bar__links {
        flex-wrap: wrap;
        gap: 0.75rem !important;
    }
    .about-bar__links li + li a::before {
        display: none;
    }
}

/* ============================================================
   JUSTIFICATION DES PARAGRAPHES (site entier)
   ============================================================ */
p,
.article-content p,
.content-main p,
.moduletable p {
    text-align: justify;
    text-justify: inter-word;        /* justifie entre les mots (pas entre les lettres) */
    hyphens: auto;                    /* coupe les mots longs en fin de ligne */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    word-spacing: -0.5px;             /* resserre légèrement les mots */
    letter-spacing: normal;
    text-wrap: pretty;                /* évite les lignes orphelines (support moderne) */
}

/* Activation de la césure selon la langue */
html[lang^="fr"] p {
    hyphens: auto;
    -webkit-hyphens: auto;
}

html[lang^="ar"] p {
    hyphens: none;                    /* l'arabe ne se coupe pas */
    word-spacing: normal;
    text-align: justify;
    text-justify: inter-word;
}

/* Accessibilité : respect des préférences */
@media (prefers-reduced-motion: reduce) {
    /* rien à faire ici, mais on garde la cohérence */
}

/* ============================================================
   MODULE DE CONNEXION (mod_login) — Style Moderne
   ============================================================ */

/* Conteneur global du module (la carte) */
.mod-login,
.login-form {
    background: #ffffff;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(26, 77, 58, 0.08);
    border: 1px solid rgba(26, 77, 58, 0.05);
    max-width: 420px;
    margin: 0 auto;
}

/* Légende / Titre du formulaire */
.mod-login legend,
.login-form legend {
    font-family: var(--font-heading, 'Cairo', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--agri-green-dark, #1a4d3a);
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: none;
}

/* Groupes de champs */
.mod-login .form-group,
.login-form .form-group,
.mod-login .mb-3 {
    margin-bottom: 1.25rem;
}

/* Labels */
.mod-login label,
.login-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--agri-green-dark, #1a4d3a);
    margin-bottom: 0.5rem;
}

/* Champs de saisie (Text & Password) */
.mod-login input[type="text"],
.mod-login input[type="password"],
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: #333;
    background-color: #f9fbf9;
    border: 1px solid #d1e0d1;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Effet au clic (Focus) */
.mod-login input:focus,
.login-form input:focus {
    outline: none;
    border-color: var(--agri-green, #2c7b2f);
    box-shadow: 0 0 0 3px rgba(44, 123, 47, 0.15);
    background-color: #ffffff;
}

/* Checkbox "Se souvenir de moi" */
.mod-login .form-check,
.login-form .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mod-login .form-check input,
.login-form .form-check input {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--agri-green, #2c7b2f);
    cursor: pointer;
}

.mod-login .form-check label,
.login-form .form-check label {
    margin-bottom: 0;
    font-weight: 400;
    color: #555;
    cursor: pointer;
}

/* Bouton de connexion */
.mod-login button[type="submit"],
.login-form button[type="submit"],
.mod-login .btn-primary {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--agri-green, #2c7b2f), var(--agri-green-dark, #1a4d3a));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(26, 77, 58, 0.2);
}

.mod-login button[type="submit"]:hover,
.login-form button[type="submit"]:hover,
.mod-login .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 77, 58, 0.3);
}

/* Liens en bas (Mot de passe oublié, Créer un compte) */
.mod-login__post-actions,
.login-form ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    border-top: 1px dashed #d1e0d1;
    padding-top: 1rem;
}

.mod-login__post-actions a,
.login-form ul li a {
    color: var(--agri-green, #2c7b2f);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mod-login__post-actions a:hover,
.login-form ul li a:hover {
    color: var(--agri-green-dark, #1a4d3a);
    text-decoration: underline;
}

/* ============================================================
   Support RTL (Arabe)
   ============================================================ */
[dir="rtl"] .mod-login label,
[dir="rtl"] .login-form label {
    text-align: right;
}

[dir="rtl"] .mod-login .form-check,
[dir="rtl"] .login-form .form-check {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

[dir="rtl"] .mod-login__post-actions,
[dir="rtl"] .login-form ul {
    text-align: center; /* On garde le centre pour l'équilibre */
}

/* --- Ajustements pour les inputs Joomla --- */
.login-card .input-group {
    border: 1px solid #d1e0d1;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fbf9;
    transition: all 0.2s ease;
}

.login-card .input-group:focus-within {
    border-color: var(--agri-green, #2c7b2f);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(44, 123, 47, 0.1);
}

.login-card .input-group .form-control {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.login-card .input-group .btn {
    border: none !important;
}

/* On enlève la flèche par défaut du bouton dropdown pour faire plus propre */
.btn-login-trigger::after {
    display: none !important;
}

/* Lien vers l'inscription en évidence */
.login-card .mod-login__options a {
    color: var(--agri-green, #2c7b2f);
    text-decoration: none;
    font-weight: 500;
}
.login-card .mod-login__options a:hover {
    text-decoration: underline;
}

/* ============================================================
   CORRECTION DU DROPDOWN DE CONNEXION (Z-index & Fond)
   ============================================================ */

/* 1. Conteneur parent : s'assurer qu'il ne cache pas le menu */
.header-login-dropdown {
    position: relative;
    z-index: 1050; /* Passe au-dessus du reste du header */
}

/* 2. Le bouton déclencheur (icône) */
.btn-login-trigger {
    background: transparent !important;
    border: 1px solid #d1e0d1;
    border-radius: 8px !important;
    padding: 0.4rem 0.8rem !important;
    color: var(--agri-green-dark, #1a4d3a) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease !important;
}

.btn-login-trigger:hover,
.btn-login-trigger:focus,
.btn-login-trigger[aria-expanded="true"] {
    background: #f4f8f4;
    border-color: var(--agri-green, #2c7b2f);
    color: var(--agri-green, #2c7b2f);
}

/* 3. LA CARTE (On force le fond blanc et l'ombre) */
.login-card.dropdown-menu {
    background-color: #ffffff !important; /* Force le fond blanc opaque */
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    padding: 0.3rem !important;
    min-width: 320px !important;
    z-index: 1051 !important;
    margin-top: 10px !important;
    opacity: 1 !important; /* Empêche la transparence */
}

/* 4. Les champs de saisie (Inputs) */
.login-card .input-group {
    background-color: #f1f3f4 !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    overflow: hidden;
    transition: all 0.2s ease;
}

.login-card .input-group:focus-within {
    background-color: #ffffff !important;
    border-color: var(--agri-green, #2c7b2f) !important;
    box-shadow: 0 0 0 2px rgba(44, 123, 47, 0.1) !important;
}

.login-card .input-group .form-control {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.6rem 1rem !important;
    height: auto !important;
}

/* L'icône à l'intérieur du champ (User, Eye) */
.login-card .input-group .input-group-text,
.login-card .input-group .btn {
    background: transparent !important;
    border: none !important;
    color: #6a7f6a !important;
}

/* 5. Le bouton "Connexion" (et "Déconnexion") */
.btn-compact-submit {
    background: linear-gradient(135deg, var(--agri-green, #2c7b2f), var(--agri-green-dark, #1a4d3a)) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 0.7rem !important;
    font-weight: 600 !important;
    border: none !important;
    width: 100%;
    box-shadow: 0 4px 10px rgba(44, 123, 47, 0.2);
}

.btn-compact-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(44, 123, 47, 0.3);
}

/* 6. Le bloc Déconnexion (Image 1) */
.login-card .mod-login-logout__login-greeting {
    background: #f4f8f4;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--agri-green-dark, #1a4d3a) !important;
}

.login-card .btn-outline-danger {
    border-radius: 8px;
    font-weight: 600;
}

/* 7. Cache la petite flèche (caret) par défaut de Bootstrap sur le bouton */
.btn-login-trigger::after {
    display: none !important;
}

/* ============================================================
   CORRECTION FINALE : INPUTS ET AUTOCOMPLÉTION
   ============================================================ */

/* 1. Réparer l'alignement du champ + l'icône (Flexbox) */
.login-card .input-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    background-color: #f1f3f4 !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    overflow: hidden;
    transition: all 0.2s ease;
}

/* Forcer le champ texte à prendre tout l'espace disponible */
.login-card .input-group .form-control {
    flex: 1 1 auto !important;
    width: 1% !important; /* Astuce Flexbox pour bien calculer la largeur */
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.6rem 1rem !important;
    height: auto !important;
}

/* Forcer l'icône à rester à droite et à se centrer verticalement */
.login-card .input-group .input-group-text,
.login-card .input-group .btn {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    color: #6a7f6a !important;
    padding: 0 1rem !important;
}

/* 2. Effet au clic (Focus) */
.login-card .input-group:focus-within {
    background-color: #ffffff !important;
    border-color: var(--agri-green, #2c7b2f) !important;
    box-shadow: 0 0 0 2px rgba(44, 123, 47, 0.1) !important;
}

/* 3. Neutraliser le fond bleu de l'autocomplétion (Chrome/Edge) */
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover, 
.login-card input:-webkit-autofill:focus, 
.login-card input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #f1f3f4 inset !important;
    transition: background-color 5000s ease-in-out 0s;
    font-family: inherit !important;
}

/* 4. Corriger la taille de la case "Maintenir la connexion" */
.login-card .form-check-input {
    width: 1.1em !important;
    height: 1.1em !important;
    margin-top: 0.2em !important;
    border: 1px solid #d1e0d1 !important;
    border-radius: 4px !important;
    cursor: pointer;
}

.login-card .form-check-input:checked {
    background-color: var(--agri-green, #2c7b2f) !important;
    border-color: var(--agri-green, #2c7b2f) !important;
}

/* 5. Un peu d'espacement entre la case et le texte */
.login-card .form-check-label {
    margin-left: 0.4rem;
    cursor: pointer;
}

[dir="rtl"] .login-card .form-check-label {
    margin-left: 0;
    margin-right: 0.4rem;
}

/* ============================================================
   DASHBOARD PROFIL UTILISATEUR (Joomla 6 Compatible)
   ============================================================ */

.profile-dashboard {
    max-width: 1000px;
    margin: 0 auto;
    font-family: var(--font-body, 'Inter', sans-serif);
}

/* Titre de la page */
.profile-title {
    font-family: var(--font-heading, 'Cairo', sans-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--agri-green-dark, #1a4d3a);
}

/* Bouton Modifier */
.btn-edit-profile {
    background: linear-gradient(135deg, var(--agri-gold, #2c7b2f), var(--agri-green, #40916c));
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 10px rgba(44, 123, 47, 0.2);
    transition: all 0.2s ease;
    border: none;
}

.btn-edit-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(44, 123, 47, 0.3);
    color: white;
}

/* Les Cartes */
.profile-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(26, 77, 58, 0.08);
    border: 1px solid rgba(26, 77, 58, 0.05);
    padding: 2rem;
}

.profile-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6a7f6a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed #d1e0d1;
    padding-bottom: 0.8rem;
}

/* ============================================================
   TRANSFORMATION DES <dl> JOOMLA EN GRILLE DE CARTES
   ============================================================ */

/* On transforme le conteneur en grille */
.profile-card dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 0;
}

/* Les Labels (dt) */
.profile-card dt {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
    grid-column: 1 / -1; /* Force le label au-dessus de la valeur */
}

/* Les Valeurs (dd) */
.profile-card dd {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    background: #f9fbf9;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    border-left: 3px solid var(--agri-green, #2c7b2f);
    margin-bottom: 1rem; /* Espace sous la valeur */
    word-break: break-word;
}

/* RTL */
[dir="rtl"] .profile-card dd {
    border-left: none;
    border-right: 3px solid var(--agri-green, #2c7b2f);
}

/* Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    .profile-card {
        padding: 1.5rem;
    }
}

/* ============================================================
   FORMULAIRE D'ÉDITION DU PROFIL (Joomla 6 Compatible)
   ============================================================ */

.profile-edit-dashboard {
    max-width: 900px;
    margin: 0 auto;
}

/* Grille pour les champs (2 colonnes sur PC, 1 sur mobile) */
.profile-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Style des groupes de champs Joomla */
.profile-card .control-group {
    margin-bottom: 0;
}

/* Labels */
.profile-card .control-label {
    font-weight: 600;
    color: var(--agri-green-dark, #1a4d3a);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    text-align: left;
}

/* Champs de saisie, Select, Textarea */
.profile-card .form-control,
.profile-card .form-select {
    width: 100% !important;
    padding: 0.6rem 1rem;
    border: 1px solid #d1e0d1;
    border-radius: 8px;
    background-color: #f9fbf9;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: #333;
}

.profile-card .form-control:focus,
.profile-card .form-select:focus {
    background-color: #ffffff;
    border-color: var(--agri-green, #2c7b2f);
    box-shadow: 0 0 0 3px rgba(44, 123, 47, 0.15);
    outline: none;
}

/* Messages d'aide (ex: "Exigences minimales") */
.profile-card .form-text {
    font-size: 0.8rem;
    color: #6a7f6a;
    margin-top: 0.4rem;
    display: block;
}

/* Style des boutons d'action */
.btn-save-profile {
    background: linear-gradient(135deg, var(--agri-green, #2c7b2f), var(--agri-green-dark, #1a4d3a)) !important;
    color: white !important;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 10px rgba(44, 123, 47, 0.2);
    transition: all 0.2s ease;
}

.btn-save-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(44, 123, 47, 0.3);
}

.btn-cancel-profile {
    background: #fff;
    color: #c0392b;
    border: 1px solid #c0392b;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-cancel-profile:hover {
    background: #c0392b;
    color: #fff;
}

/* Style spécifique pour l'authentification multifacteur (MFA) */
.profile-card .com-users-profile__multifactor .card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: none;
    margin-bottom: 1rem;
    background: #f9fbf9;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-fields-grid {
        grid-template-columns: 1fr;
    }
    .profile-card .control-label {
        text-align: left;
    }
}

/* RTL */
[dir="rtl"] .profile-card .control-label {
    text-align: right;
}

/* ============================================================
   CORRECTIONS FORMULAIRE D'ÉDITION (CONFLITS TEMPLATE)
   ============================================================ */

/* 1. Réparer les champs Mot de passe (Input Group) */
.profile-fields-grid .input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    background-color: #f9fbf9 !important;
    border: 1px solid #d1e0d1 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: all 0.2s ease;
}

/* Le champ texte prend tout l'espace */
.profile-fields-grid .input-group .form-control {
    flex: 1 1 auto !important;
    width: 1% !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.6rem 1rem !important;
}

/* Le bouton de l'œil (Eye) */
.profile-fields-grid .input-group .btn {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    color: #6a7f6a !important;
    padding: 0 1rem !important;
}

/* Effet focus sur le groupe */
.profile-fields-grid .input-group:focus-within {
    background-color: #ffffff !important;
    border-color: var(--agri-green, #2c7b2f) !important;
    box-shadow: 0 0 0 3px rgba(44, 123, 47, 0.15) !important;
}

/* 2. Masquer le bouton "Remove item" du Fuseau horaire */
.profile-fields-grid .form-select + .btn-outline-danger,
.profile-fields-grid .form-select ~ .btn-outline-danger {
    display: none !important;
}

/* 3. Corriger la lisibilité de la section MFA (Multifacteur) */
.profile-card .com-users-profile__multifactor .card {
    background-color: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: none !important;
    border-radius: 12px !important;
}

/* Forcer le texte des cartes MFA à être foncé */
.profile-card .com-users-profile__multifactor .card-header,
.profile-card .com-users-profile__multifactor .card-title,
.profile-card .com-users-profile__multifactor h3,
.profile-card .com-users-profile__multifactor h4,
.profile-card .com-users-profile__multifactor strong {
    color: var(--agri-green-dark, #1a4d3a) !important;
    font-weight: 600 !important;
    background-color: transparent !important;
}

/* Le texte de description dans les cartes MFA */
.profile-card .com-users-profile__multifactor .card-body p {
    color: #555 !important;
    font-size: 0.9rem;
}

/* 4. Corriger l'alignement des boutons Enregistrer / Annuler */
.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    align-items: center;
}

.btn-save-profile,
.btn-cancel-profile {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
}

/* 5. Ajustement de la couleur des champs normaux (Nom, Identifiant, Email) */
.profile-fields-grid .form-control {
    background-color: #f9fbf9 !important;
    border: 1px solid #d1e0d1 !important;
}
.profile-fields-grid .form-control:focus {
    background-color: #ffffff !important;
    border-color: var(--agri-green, #2c7b2f) !important;
    box-shadow: 0 0 0 3px rgba(44, 123, 47, 0.15) !important;
}

/* ============================================================
   MENU UTILISATEUR ENRICHI (DROPDOWN CONNECTÉ)
   ============================================================ */

/* On agrandit un peu la carte pour faire de la place aux liens */
.user-menu-card {
    min-width: 280px !important;
    padding: 1rem !important;
}

/* La zone "Bonjour, test" */
.user-menu-greeting {
    background: #f4f8f4;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: var(--agri-green-dark, #1a4d3a);
    margin-bottom: 1rem;
}

/* La liste des liens */
.user-menu-links {
    margin: 0;
    padding: 0;
}

.user-menu-links li {
    margin-bottom: 0.2rem;
}

/* Style des liens du menu */
.user-menu-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: #444 !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-menu-links a:hover {
    background: #f0f7f0;
    color: var(--agri-green, #2c7b2f) !important;
    padding-left: 1.2rem; /* Petit effet de glissement */
}

/* Icônes */
.user-menu-links a span[class^="icon-"] {
    color: var(--agri-green, #2c7b2f);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Bouton de déconnexion */
.btn-logout {
    background: #fff;
    color: #c0392b;
    border: 1px solid #c0392b;
    padding: 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    background: #c0392b;
    color: #fff;
}

/* RTL */
[dir="rtl"] .user-menu-links a {
    text-align: right;
}
[dir="rtl"] .user-menu-links a:hover {
    padding-left: 1rem;
    padding-right: 1.2rem;
}

/* ============================================================
   MENU UTILISATEUR ENRICHI (DROPDOWN CONNECTÉ)
   ============================================================ */

/* On agrandit un peu la carte */
.user-menu-card {
    min-width: 320px !important;
    padding: 1rem !important;
}

/* La zone "Bonjour, Nom" */
.user-menu-greeting {
    background: #f4f8f4;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: var(--agri-green-dark, #1a4d3a);
    margin-bottom: 1rem;
}

/* La liste des liens */
.user-menu-links {
    margin: 0;
    padding: 0;
}

.user-menu-links li {
    margin-bottom: 0.2rem;
}

/* Style des liens */
.user-menu-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: #444 !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-menu-links a:hover {
    background: #f0f7f0;
    color: var(--agri-green, #2c7b2f) !important;
    padding-left: 1.2rem; /* Effet de glissement */
}

/* Les icônes FontAwesome */
.user-menu-links a i {
    color: var(--agri-green, #2c7b2f);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Le bouton de déconnexion */
.btn-logout {
    background: #fff;
    color: #c0392b;
    border: 1px solid #c0392b;
    padding: 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-logout:hover {
    background: #c0392b;
    color: #fff;
}

/* Espacement RTL */
[dir="rtl"] .user-menu-links a {
    text-align: right;
}
[dir="rtl"] .user-menu-links a:hover {
    padding-left: 1rem;
    padding-right: 1.2rem;
}

/* ============================================================
   BOUTON D'ÉDITION FRONTEND DISCRET (Correction)
   ============================================================ */

/* 1. On cible le conteneur du bouton, sans le sortir du flux */
.com-content-article .icons,
.com-content-article .btn-toolbar,
.blog-item .icons,
.blog-featured .icons,
.com-content-category-blog__item .icons {
    opacity: 0.3; /* Très discret au repos */
    transition: opacity 0.3s ease;
    display: inline-flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
    width: 100%; /* Pour l'aligner à droite */
}

/* 2. Devient visible au survol */
.com-content-article .icons:hover,
.com-content-article .btn-toolbar:hover,
.blog-item .icons:hover,
.blog-featured .icons:hover,
.com-content-category-blog__item .icons:hover {
    opacity: 1;
}

/* 3. Style de la puce/bouton (plus petit et plus propre) */
.icons .btn,
.btn-toolbar .btn,
a[href*="task=article.edit"] {
    border-radius: 20px !important;
    padding: 0.25rem 0.6rem !important;
    font-size: 0.75rem !important;
    box-shadow: none !important;
    background: #f4f8f4 !important;
    color: var(--agri-green-dark, #1a4d3a) !important;
    border: 1px solid #d1e0d1 !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.icons .btn:hover,
.btn-toolbar .btn:hover,
a[href*="task=article.edit"]:hover {
    background: var(--agri-green, #2c7b2f) !important;
    color: #ffffff !important;
    border-color: var(--agri-green, #2c7b2f) !important;
}

/* ============================================================
   CONTRÔLES DE TAILLE DE POLICE SUR MOBILE (FIX)
   ============================================================ */
@media (max-width: 991px) {
    .font-size-controls {
        position: fixed !important;
        top: 30% !important;
        height: 125px;
        /* bottom: 85px !important; */ /* Remonté pour ne pas toucher le bouton "Retour en haut" */
        right: 10px !important;
        left: auto !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important; /* On garde l'affichage vertical comme sur votre capture */
        z-index: 1060 !important; /* Au-dessus du menu mobile et du bouton retour */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
        border-radius: 8px 0 0 8px !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: #198754bd !important;
    }

    /* Version Arabe (RTL) */
    [dir="rtl"] .font-size-controls {
        right: auto !important;
        left: 10px !important;
        border-radius: 0 8px 8px 0 !important;
    }

    /* Ajustement de la taille des boutons pour les doigts sur mobile */
    .font-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.9rem !important;
    }
}

/* Corriger l'apparence du bouton Passkey (WebAuthn) sur la page de connexion */
.plg_system_webauthn_login_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Espace entre l'icône et le texte */
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Forcer la taille de l'icône SVG (qui est gigantesque par défaut) */
.plg_system_webauthn_login_button svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor;
    flex-shrink: 0;
}