/*
Theme Name: CYLMA Theme
Theme URI: https://cylma.com
Author: CYLMA
Description: قالب بسيط وسريع من تصميم Cylma.com
Version: 1.0
*/

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    background: #ffffff; 
    color: #184A7B; 
    line-height: 1; 
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.header { background: #111827; border-bottom: 1px solid #184A7B; }
.header-inner { max-width: 1240px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; }
.logo { text-decoration: none; font-size: 26px; font-weight: 800; color: #f9fafb; letter-spacing: -0.5px; }
.logo-dot { color: #f2B43B; font-weight: 400; }
.header-text { color: #f2B43B; font-size: 14px; font-weight: 400; }

/* Layout */
.container { display: grid; grid-template-columns: 1fr 320px; max-width: 1240px; margin: 0 auto; padding: 40px 24px; gap: 50px; }

/* Main 3-Column Grid for Clusters */
.main { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 35px; 
    align-items: start; 
}

/* Sidebar */
/* Sidebar - Version non sticky */
.sidebar { 
    display: flex; 
    flex-direction: column; 
    gap: 24px; 
    align-self: start; 
}
/* Clusters */
.cluster { scroll-margin-top: 20px; }
.cluster-title { 
    font-size: 16px; 
    font-weight: 700; 
    color: #111827; 
    margin-bottom: 12px; 
    padding-bottom: 8px; 
    border-bottom: 2px solid #f3f4f6; 
}

/* Links Grid & Tool Boxes */
.links-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 6px;
}
.link { 
    display: block; 
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    font-size: 14px; 
    font-weight: 600; 
    color: #111827;
    text-decoration: none; 
    border: 1px solid #374151;
    border-radius: 4px;
    padding: 9px 12px; 
    transition: background 0.2s ease;
}
.link:hover { 
    background-color: #f3f4f6;
}

/* Sidebar Elements */
.sb-section-title { 
    font-size: 13px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    color: #D31F4E; 
    margin-bottom: 12px; 
    padding-bottom: 8px; 
    border-bottom: 1px solid #e5e7eb; 
}

/* Elegant Table Styling */
.sb-table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0; 
    border: 2px solid #374151; 
    border-radius: 6px; 
    overflow: hidden; 
}
.sb-table td { 
    padding: 1px 16px; 
    border-bottom: 1px solid #374151; 
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; 
}
.sb-table tr:last-child td { border-bottom: none; }
.sb-table a { 
    color: #111827; 
    text-decoration: none; 
    font-size: 14.5px; 
    font-weight: 600; 
    font-family: inherit; 
    transition: background 0.2s ease;
    display: block; 
}
.sb-table a:hover { 
    background-color: #f3f4f6; 
    border-radius: 2px;
}

/* Footer */
.footer { background: #f9fafb; border-top: 1px solid #e5e7eb; margin-top: 20px; padding: 24px; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-bottom: 12px; }
.footer-links a { font-size: 14px; color: #D31F4E; text-decoration: none; }
.footer-links a:hover { color: #111827; }
.copyright { font-size: 13px; color: #9ca3af; }

/* Responsive */
@media (max-width: 1100px) {
    .main { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 850px) {
    .container { grid-template-columns: 1fr; }
    .sidebar { order: 2; position: static; max-height: none; }
    .main { grid-template-columns: 1fr; }
    .links-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .links-grid { grid-template-columns: 1fr; }
    .header-text { display: none; }
    .container { padding: 20px 16px; }
}
/* ===== Sidebar (Version non sticky) ===== */
.sidebar { 
    display: flex; 
    flex-direction: column; 
    gap: 24px; 
    align-self: start; 
}

/* ===== Titre de la section clusters ===== */
.sb-section-title { 
    font-size: 13px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    color: #D31F4E; 
    margin-bottom: 12px; 
    padding-bottom: 8px; 
    border-bottom: 1px solid #e5e7eb; 
}

/* ===== Tableau des clusters ===== */
.sb-table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0; 
    border: 2px solid #374151; 
    border-radius: 6px; 
    overflow: hidden; 
}
.sb-table td { 
    padding: 11px 16px; 
    border-bottom: 1px solid #374151; 
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; 
}
.sb-table tr:last-child td { border-bottom: none; }
.sb-table a { 
    color: #111827; 
    text-decoration: none; 
    font-size: 14.5px; 
    font-weight: 600; 
    font-family: inherit; 
    transition: background 0.2s ease;
    display: block; 
}
.sb-table a:hover { 
    background-color: #f3f4f6; 
    border-radius: 2px;
}

/* ===== Moteur de recherche style Cylma (UNIQUEMENT dans la sidebar) ===== */
/* ===== Moteur de recherche style Cylma (couleur #f2B43B) ===== */
.search-cylma {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    padding: 4px 4px 4px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Effet au focus (maintenant en orange) */
.search-cylma:focus-within {
    border-color: #D31F4E;
    box-shadow: 0 0 0 3px rgba(242, 180, 59, 0.35); /* Ombre orange */
}

.search-cylma form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.search-cylma input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 14px;
    background: transparent;
    color: #111827;
    min-width: 0;
    width: 100%;
}

.search-cylma input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Bouton de recherche en orange #D31F4E */
.search-cylma button {
    background: #D31F4E;        /* Nouvelle couleur */
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

/* Survol plus foncé (je te propose un assombrissement naturel) */
.search-cylma button:hover {
    background: #d99c2e;         /* Version plus foncée de #D31F4E */
}

.search-cylma button svg {
    stroke: #ffffff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}
/* Sidebar Outils */
.sidebar .sb-section-title {
    margin: 20px 0 10px 0;
    font-size: 16px;
    color: #374151;
}

.sidebar .cluster-parent {
    font-weight: 600;
    color: #1f2937;
}

.sidebar .subcluster-name {
    font-weight: 500;
    color: #4b5563;
    font-style: italic;
}

.sidebar .tools-list {
    margin: 6px 0 8px 18px;
    padding: 0;
    list-style: disc;
}

.sidebar .tools-list li {
    margin-bottom: 3px;
    font-size: 14px;
}

.sidebar .tools-list a {
    color: #2563eb;
    text-decoration: none;
}

.sidebar .tools-list a:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

.sidebar .sb-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #e5e7eb;
}