/**
 * OF Service Public - Frontend Styles
 * Plugin by Webmastering Assistance
 */

/* ========================================
   Container
   ======================================== */
.ofsp-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e1e1e;
    line-height: 1.6;
}

/* ========================================
   Breadcrumb
   ======================================== */
.ofsp-breadcrumb {
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #666;
    border-bottom: 1px solid #e5e7eb;
}

.ofsp-breadcrumb a {
    color: #000091;
    text-decoration: none;
}

.ofsp-breadcrumb a:hover {
    text-decoration: underline;
}

.ofsp-sep {
    margin: 0 0.4rem;
    color: #999;
}

/* ========================================
   Accueil - Grille thématique
   ======================================== */
.ofsp-titre-principal {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #000091;
}

.ofsp-themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.ofsp-theme-card {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ofsp-theme-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #000091;
}

.ofsp-theme-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.ofsp-theme-card h3 a {
    color: #000091;
    text-decoration: none;
}

.ofsp-theme-card h3 a:hover {
    text-decoration: underline;
}

.ofsp-sous-themes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ofsp-sous-themes li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.ofsp-sous-themes li:last-child {
    border-bottom: none;
}

.ofsp-sous-themes a {
    color: #333;
    text-decoration: none;
}

.ofsp-sous-themes a:hover {
    color: #000091;
    text-decoration: underline;
}

.ofsp-more a {
    color: #000091;
    font-weight: 500;
    font-size: 0.85rem;
}

/* ========================================
   Fiches
   ======================================== */
.ofsp-fiche-titre,
.ofsp-noeud-titre,
.ofsp-ressource-titre {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e1e1e;
    margin-bottom: 0.5rem;
}

.ofsp-date-verif {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.ofsp-introduction {
    background: #f0f4ff;
    border-left: 4px solid #000091;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 0 4px 4px 0;
}

.ofsp-chapitre-titre {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000091;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* ========================================
   Info blocks (À savoir, Attention, etc.)
   ======================================== */
.ofsp-asavoir,
.ofsp-anoter {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

.ofsp-attention {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

.ofsp-asavoir strong,
.ofsp-anoter strong,
.ofsp-attention strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ========================================
   Tabs (ListeSituations / BlocCas)
   ======================================== */
.ofsp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border-bottom: 2px solid #e5e7eb;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.ofsp-tab {
    padding: 0.6rem 1.2rem;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background: #f8f9fa;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ofsp-tab:hover {
    background: #eef;
}

.ofsp-tab-active {
    background: #fff;
    color: #000091;
    border-color: #000091;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
    font-weight: 600;
}

.ofsp-panel {
    display: none;
    padding: 1.25rem 0;
}

.ofsp-panel-active {
    display: block;
}

/* ========================================
   Lists and Noeuds
   ======================================== */
.ofsp-noeud-liste,
.ofsp-liste-fiches,
.ofsp-liste-services {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.ofsp-noeud-item {
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
}

.ofsp-noeud-item:last-child {
    border-bottom: none;
}

.ofsp-noeud-item a {
    color: #000091;
    text-decoration: none;
    font-weight: 500;
}

.ofsp-noeud-item a:hover {
    text-decoration: underline;
}

.ofsp-liste-fiches li,
.ofsp-liste-services li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.ofsp-liste-fiches a,
.ofsp-liste-services a {
    color: #000091;
    text-decoration: none;
}

.ofsp-liste-fiches a:hover,
.ofsp-liste-services a:hover {
    text-decoration: underline;
}

/* ========================================
   Badges & Buttons
   ======================================== */
.ofsp-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: #e3e3fd;
    color: #000091;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    vertical-align: middle;
    margin-left: 0.4rem;
}

.ofsp-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: #000091;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.15s ease;
}

.ofsp-btn:hover {
    background: #1212ff;
}

/* ========================================
   Tables
   ======================================== */
.ofsp-tableau-wrapper {
    overflow-x: auto;
    margin: 1rem 0;
}

.ofsp-tableau {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ofsp-tableau th,
.ofsp-tableau td {
    padding: 0.6rem 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
}

.ofsp-tableau th {
    background: #f0f4ff;
    font-weight: 600;
    color: #000091;
}

.ofsp-tableau tr:nth-child(even) {
    background: #fafafa;
}

/* ========================================
   Voir aussi / Pour en savoir plus
   ======================================== */
.ofsp-voir-aussi,
.ofsp-pour-en-savoir-plus,
.ofsp-services {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.ofsp-voir-aussi h3,
.ofsp-pour-en-savoir-plus h3,
.ofsp-services h3 {
    font-size: 1.1rem;
    color: #000091;
    margin-bottom: 0.75rem;
}

/* ========================================
   Footer / Source
   ======================================== */
.ofsp-footer {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.ofsp-source {
    font-size: 0.8rem;
    color: #666;
}

.ofsp-source a {
    color: #000091;
}

/* ========================================
   Error / Notice
   ======================================== */
.ofsp-error {
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #991b1b;
}

.ofsp-notice {
    padding: 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 4px;
    color: #92400e;
}

.ofsp-notice a {
    color: #000091;
    font-weight: 500;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .ofsp-themes-grid {
        grid-template-columns: 1fr;
    }

    .ofsp-tabs {
        flex-direction: column;
    }

    .ofsp-tab {
        border-radius: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .ofsp-tab-active {
        margin-bottom: 0;
        border-bottom: 2px solid #000091;
    }
}
