/* ===========================
   Thème global – Guide CRI Invest (page PANORAMA)
   =========================== */

:root {
    --bg-body: #0b1120;
    --bg-main: #020617;
    --bg-card: #020617;
    --bg-card-soft: #020617;
    --bg-header: rgba(15, 23, 42, 0.96);
    --bg-tag: rgba(15, 118, 110, 0.12);

    --border-soft: rgba(148, 163, 184, 0.35);
    --border-strong: rgba(148, 163, 184, 0.5);

    --text-main: #e5e7eb;
    --text-muted: #94a3b8;
    --text-soft: #64748b;
    --text-strong: #f9fafb;
    --text-accent: #22c55e;

    --accent: #22c55e;
    --accent-soft: rgba(34, 197, 94, 0.08);
    --accent-strong: #22c55e;

    --radius-lg: 18px;
    --radius-xl: 22px;
    --shadow-soft:
        0 18px 45px rgba(15, 23, 42, 0.65),
        0 0 0 1px rgba(148, 163, 184, 0.2);
    --shadow-subtle:
        0 10px 30px rgba(15, 23, 42, 0.6),
        0 0 0 1px rgba(30, 64, 175, 0.4);
    --shadow-header:
        0 20px 40px rgba(15, 23, 42, 0.9);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

/* =========================================================
   HERO PRINCIPAL – PAGE PANORAMA
   ========================================================= */

.guide-hero {
    padding: 48px 16px 24px;
    text-align: center;
}

.guide-hero-logo {
    height: 85px;          /* taille parfaite, ni minuscule ni énorme */
    margin-bottom: 16px;
}

.guide-hero-subtitle {
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #e5e7eb;
    margin-bottom: 6px;
}

.guide-hero-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #C2A13E;   /* or CRI */
}

.guide-hero-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: #e5e7eb;
}

.guide-section-header h2 {
    color: #C2A13E !important;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* ===========================
   Layout général panorama
   =========================== */

.guide-body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at top left, #0f172a, #020617 50%, #000000 100%);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
                 "Segoe UI", sans-serif;
}

.guide-main {
    max-width: 1120px;
    margin: 140px auto 40px;  /* marge haute augmentée pour le header fixe */
    padding: 0 16px 40px;
}

/* Header du panorama */

.guide-header {
    background: radial-gradient(circle at top left, #0f172a, #020617 50%, #000000 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    padding: 20px 0 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

.guide-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.guide-header-logo img {
    max-height: 72px;     /* ajuste si tu le veux encore plus petit (ex : 64px) */
    height: auto;
    width: auto;
}

.guide-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.guide-header-subtitle {
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d1d5db;
}

.guide-header-title {
    margin: 0;
    font-size: 26px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #f9fafb;
}

.guide-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guide-logo-circle {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 0%, #4ade80, #16a34a 45%, #14532d 100%);
    color: #ecfdf5;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
    box-shadow:
        0 0 0 1px rgba(22, 163, 74, 0.4),
        0 10px 30px rgba(21, 128, 61, 0.8);
}

.guide-brand-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-strong);
}

.guide-brand-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

/* Sections rubriques + bulles procédures */

.guide-section {
    margin-bottom: 28px;
    padding: 18px 20px 18px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-soft);
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.95));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.guide-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.guide-section h2 {
    margin: 0;
    font-size: 17px;
    color: var(--text-strong);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.guide-section-count {
    font-size: 12px;
    color: var(--text-soft);
}

/* Grille de bulles */

.guide-procedure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.guide-procedure-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 14px 12px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.45);
    background:
        radial-gradient(circle at top left, rgba(30, 64, 175, 0.28), transparent 60%),
        radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.25), transparent 65%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
    text-decoration: none;
    color: var(--text-main);
    box-shadow: var(--shadow-subtle);
    transition:
        transform 0.16s ease-out,
        box-shadow 0.16s ease-out,
        border-color 0.16s ease-out,
        background 0.16s ease-out;
}

.guide-procedure-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 22px 60px rgba(15, 23, 42, 0.95),
        0 0 0 1px rgba(34, 197, 94, 0.45);
    border-color: rgba(34, 197, 94, 0.7);
}

.guide-procedure-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-strong);
}

.guide-procedure-resume {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}

.guide-procedure-footer {
    display: flex;
    justify-content: flex-end;
}

.guide-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--accent-strong);
    text-decoration: none;
}

.guide-link::after {
    content: "→";
    font-size: 11px;
}

/* Footer */

.guide-footer {
    max-width: 1120px;
    margin: 0 auto 18px;
    padding: 6px 16px 0;
    border-top: 1px dashed rgba(51, 65, 85, 0.8);
    font-size: 11px;
    color: var(--text-soft);
    text-align: center;
}

/* Responsive panorama */

@media (max-width: 768px) {
    .guide-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .guide-main {
        max-width: 1120px;
        margin: 40px auto 40px;  /* au lieu de 96px auto 40px */
        padding: 0 16px 40px;
    }

    .guide-section {
        padding: 14px 14px 16px;
    }

    .guide-procedure-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

.app-body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #0f172a;
}

/* =========================================================
   HEADER
   ========================================================= */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.top-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-block {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: #0B5732;
    text-decoration: none;
}

.logo-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
}

.top-title-main {
    font-size: 16px;
    font-weight: 600;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.main-wrapper {
    padding: 24px 0 30px;  /* au lieu de 70px 0 30px */
}

.main-inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* =========================================================
   GUIDE LAYOUT
   ========================================================= */
.guide-procedure-layout {
    width: 100%;
    margin: 12px 0 32px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
}

/* === Bandeau haut fiche procédure === */
/* Bandeau haut de la procédure */
.procedure-hero {
    background: linear-gradient(135deg, #012026 0%, #00333D 50%, #004A2C 100%);
    padding: 20px 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.procedure-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;     /* vertical align */
    gap: 20px;
}

.procedure-hero-logo img {
    height: 60px;   /* propre, pas trop gros */
    width: auto;
}

.procedure-hero-text {
    color: white;
}

.procedure-hero-rubrique {
    font-size: 0.9rem;
    opacity: 0.85;
    letter-spacing: 0.1em;
}

.procedure-hero-title {
    font-size: 1.6rem;
    font-weight: 700;
}

/* =========================================================
   SIDEBAR – VERSION GLACE + STICKY
   ========================================================= */
.guide-sidebar {
    position: sticky;
    top: 90px;                 /* ajuste si besoin en fonction du bandeau vert */
    align-self: flex-start;
    padding: 0;
    border: none;
    background: transparent;
}

/* Carte contenant le titre + la liste des étapes */
.guide-sidebar-card {
    background: rgba(15, 23, 42, 0.60);           /* effet verre fumé */
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: 18px 16px 14px;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.55),
        0 0 0 1px rgba(15, 23, 42, 0.3);
}

/* Titre "GUIDE PAS À PAS" */
.guide-sidebar-title {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
    color: #C2A13E;            /* or doré, aligné avec la charte */
}

/* Liste des étapes */
.guide-step-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Bouton d’étape – style glace */
.guide-step-item {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border: 1px solid rgba(148, 163, 184, 0.40);
    font-size: 13px;
    color: #E5F4FF;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

/* Survol */
.guide-step-item:hover {
    background: rgba(34, 197, 94, 0.25); /* léger vert translucide */
    border-color: rgba(34, 197, 94, 0.60);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.45);
}

/* Étape active (celle en cours) */
.guide-step-item.is-active {
    background: linear-gradient(135deg, #0B5732, #16A34A);
    color: #FFFFFF;
    font-weight: 700;
    border-color: rgba(248, 250, 252, 0.85);
    box-shadow:
        0 10px 24px rgba(22, 163, 74, 0.55),
        0 0 0 1px rgba(15, 23, 42, 0.25);
}

/* =========================================================
   CONTENU D’UNE ÉTAPE
   ========================================================= */
.guide-main {}

.guide-article-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px 22px 26px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    border: 1px solid #e5e7eb;

    /* Ajout pour aérer un peu */
    margin-top: 8px;
}

.step-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
}

/* IMAGE */
.step-image-wrapper img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* DESCRIPTION */
.step-description-block {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.step-description-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-description-body {
    font-size: 14px;
    color: #374151;
    line-height: 1.55;
}

.step-description-body ul {
    margin: 0;
    padding-left: 20px;
}

.step-description-body li {
    margin-bottom: 6px;
}

/* FOOTER */
.step-footer {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-nav {
    border: 1px solid #0B5732;
    padding: 6px 14px;
    border-radius: 999px;
    background: white;
    color: #0B5732;
    cursor: pointer;
    transition: 0.2s;
}

.btn-nav:hover {
    background: #0B5732;
    color: white;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .guide-procedure-layout {
        grid-template-columns: 1fr;
    }
}

/* === HERO PAGE PRINCIPALE === */

/* Conteneur global du haut (là où tu as le logo + texte) */
.guide-hero {
    padding: 24px 16px 28px;      /* pas de padding énorme en haut/bas */
    text-align: center;
}

/* Sous-titre "Centre Régional d’Investissement Souss-Massa" */
.guide-hero-subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    margin-top: 8px;
    margin-bottom: 6px;
    color: #e5e7eb;               /* gris clair */
}

/* Titre "GUIDE DES PROCÉDURES" en or */
.guide-hero-title {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #C2A13E;               /* OR CRI */
}

/* On évite un gros offset avant le contenu principal */
.main-wrapper,
.main-inner,
.guide-main {
    padding-top: 0;
    margin-top: 0;
}

/* === Mise en page de la fiche procédure : colonne étapes + contenu === */
.guide-procedure-layout {
    display: grid;
    grid-template-columns: 260px 1fr; /* 260px pour la colonne "GUIDE PAS À PAS" */
    gap: 24px;
    align-items: flex-start;
}

/* Colonne de gauche sticky (suit le scroll) */
.guide-sidebar {
    position: sticky;
    top: 20px;          /* distance par rapport au haut de la fenêtre */
}

/* Harmoniser guide-hero-block avec le style TPME */

.guide-hero-block {
    width: 100%;
    padding: 40px 16px 30px;
    text-align: center;
    margin: 0 auto 32px;
}

.guide-hero-block .guide-hero-logo {
    display: inline-block;
    padding: 12px 32px;
    background: rgba(3, 18, 24, 0.96);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow:
        0 0 40px rgba(15, 118, 110, 0.45),
        0 0 0 1px rgba(15, 23, 42, 0.8);
    margin-bottom: 18px;
}

.guide-hero-block .guide-hero-logo img {
    height: 40px;
}

.guide-hero-block .guide-hero-subtitle {
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.guide-hero-block .guide-hero-title {
    font-size: 30px;
    font-weight: 700;
    color: #C2A13E; /* OR */
    margin-bottom: 6px;
}

.guide-hero-block .guide-hero-tagline {
    font-size: 15px;
    color: #cbd5f5;
}

/* ===== INTRO PREMIUM ===== */

.guide-intro {
    max-width: 1100px;
    margin: 0 auto 40px;
    padding: 24px 0 10px;
    text-align: justify;
    color: #e5e7eb;
    line-height: 1.7;
    font-size: 15.5px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.guide-intro-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #C2A13E; /* OR CRI */
    margin-bottom: 18px;
    text-align: left;
}

.guide-intro p {
    margin-bottom: 14px;
    opacity: 0.96;
}

.guide-intro strong {
    color: #C2A13E;
    font-weight: 600;
}
