/* =========================
   PAGE REGLEMENTATION
========================= */

.reglementation-page {
    background: #f7f9fb;
    color: #222;
}

/* =========================
   HERO
========================= */

.reg-hero {
    min-height: 430px;
    background:
        linear-gradient(rgba(15, 35, 40, 0.68), rgba(15, 35, 40, 0.68)),
        url("../../images/reglementation-hero.png");
    background-size: cover;
    background-position: center;
}

.reg-hero-overlay {
    min-height: 430px;
    display: flex;
    align-items: center;
    padding: 0 8%;
}

.reg-hero-content {
    max-width: 660px;
    color: #fff;
}

.reg-small-title {
    display: inline-block;
    color: #dff5e6;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.reg-small-title::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--green, #2f9e44);
    border-radius: 50%;
    margin-right: 8px;
}

.reg-hero h1 {
    font-size: 52px;
    line-height: 1.08;
    margin-bottom: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.reg-hero h1 span {
    color: var(--green, #2f9e44);
    display: block;
}

.reg-hero p {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.86);
    margin-bottom: 28px;
    max-width: 580px;
}

.reg-btn {
    display: inline-block;
    background: var(--green, #2f9e44);
    color: #fff;
    padding: 13px 26px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.reg-btn:hover {
    background: var(--green-dark, #25853a);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(47, 158, 68, 0.25);
}

/* =========================
   TABLE SECTION
========================= */

.reg-section {
    width: 86%;
    max-width: 1180px;
    margin: 60px auto 70px;
}

.reg-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 24px;
}

.reg-section-header h2 {
    font-size: 30px;
    font-weight: 800;
    color: #222;
    margin-bottom: 6px;
}

.reg-section-header p {
    font-size: 14px;
    color: #6f6f6f;
}

.reg-search-box {
    width: 310px;
    height: 44px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.04);
}

.reg-search-box i {
    font-size: 13px;
    color: #9ca3af;
}

.reg-search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 13px;
    color: #333;
}

.reg-search-box input::placeholder {
    color: #9ca3af;
}

/* =========================
   TABLE
========================= */

.reg-table-wrapper {
    background: #fff;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border: 1px solid #ececec;
}

.reg-table {
    width: 100%;
    min-width: 1150px;
    border-collapse: collapse;
}

.reg-table th {
    background: var(--green, #2f9e44);
    color: #fff;
    padding: 14px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.reg-table td {
    padding: 18px 15px;
    border: 1px solid #ececec;
    vertical-align: middle;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    background: #fff;
}

.reg-table tr:hover td {
    background: #fbfdfb;
}

.ref-cell {
    color: var(--green, #2f9e44) !important;
    font-weight: 800;
    min-width: 155px;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-green {
    background: #e9f7ed;
    color: #21853a;
    border: 1px solid rgba(47, 158, 68, 0.35);
}

.status-orange {
    background: #fff7ed;
    color: #b45309;
    border: 1px solid #fed7aa;
}

.status-red {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.status-blue,
.status-default {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.pdf-link {
    display: inline-block;
    background: var(--green, #2f9e44);
    color: #fff;
    padding: 7px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.pdf-link:hover {
    background: var(--green-dark, #25853a);
    transform: translateY(-2px);
}

.no-pdf {
    color: #999;
    font-weight: 700;
}

.empty-table {
    text-align: center;
    padding: 28px !important;
    color: #777;
}

/* =========================
   ORGANISMES
========================= */

.reg-organismes {
    width: 86%;
    max-width: 1180px;
    margin: 0 auto 70px;
}

.reg-left h2 {
    font-size: 25px;
    font-weight: 800;
    color: #222;
    margin-bottom: 28px;
    border-left: 4px solid var(--green, #2f9e44);
    padding-left: 15px;
    max-width: 900px;
}

/* Desktop: cartes côte à côte */
.organismes-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 24px;
    align-items: stretch;
}

.organisme-card {
    width: 250px;
    min-height: 118px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.organisme-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.organisme-logo {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex: 0 0 48px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #ececec;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.organisme-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.organisme-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: #222;
    margin-bottom: 6px;
    line-height: 1.2;
}

.organisme-card p {
    color: #6f6f6f;
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 8px;
}

.organisme-card a {
    color: var(--green, #2f9e44);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.organisme-card a::after {
    content: " ↗";
    font-size: 11px;
}

.organisme-card a:hover {
    text-decoration: underline;
}

/* Tablette: تبقى côte à côte حتى 700px */
@media (max-width: 768px) {
    .organismes-grid {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }

    .organisme-card {
        width: 250px;
    }
}

/* Mobile فقط: وحدة تحت وحدة */
@media (max-width: 600px) {
    .organismes-grid {
        flex-direction: column;
    }

    .organisme-card {
        width: 100%;
    }
}

/* =========================
   CTA
========================= */

.reg-cta {
    background: var(--green, #2f9e44);
    color: #fff;
    text-align: center;
    padding: 38px 8%;
}

.reg-cta h2 {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 22px;
}

.reg-cta a {
    display: inline-block;
    background: #fff;
    color: var(--green, #2f9e44);
    padding: 11px 42px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    transition: all 0.3s ease;
}

.reg-cta a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.14);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
    .reg-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .reg-search-box {
        width: 100%;
    }

    .reg-hero h1 {
        font-size: 40px;
    }
}


@media (max-width: 600px) {
    .reg-hero,
    .reg-hero-overlay {
        min-height: 380px;
    }

    .reg-hero-overlay {
        padding: 0 6%;
    }

    .reg-hero h1 {
        font-size: 32px;
    }

    .reg-hero p {
        font-size: 14px;
    }

    .reg-section,
    .reg-organismes {
        width: 92%;
    }

    .reg-section {
        margin: 45px auto 55px;
    }

    .reg-left h2 {
        font-size: 21px;
    }

    .reg-cta h2 {
        font-size: 17px;
    }
}