/* ══════════════════════════════════════
   REMPLACEMENT PARC INFORMATIQUE — styles
══════════════════════════════════════ */

/* ── Hero ── */
.rpi-hero {
    background: linear-gradient(150deg, #0f172a 0%, #1e3a8a 100%);
    padding: 4.5rem 2rem 3.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.rpi-hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -100px;
    pointer-events: none;
}

.rpi-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
}

.rpi-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.rpi-hero__breadcrumb a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.rpi-hero__breadcrumb a:hover {
    color: white;
}

.rpi-hero__breadcrumb svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.rpi-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.92);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.1rem;
    backdrop-filter: blur(4px);
}

.rpi-hero__badge svg {
    width: 14px;
    height: 14px;
}

.rpi-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.rpi-hero__sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.7;
    max-width: 680px;
    margin-bottom: 1.75rem;
}

.rpi-hero__tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rpi-hero__tags span {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.9);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

/* ── Navigation retour ── */
.rpi-back-nav {
    max-width: 860px;
    margin: 1.75rem auto 0;
    padding: 0 1.5rem;
}

/* ── Conteneur ── */
.rpi-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Titres de section ── */
.rpi-section-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.rpi-section-title svg {
    width: 22px;
    height: 22px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.rpi-section-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

/* ── Grille périmètre ── */
.rpi-scope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.rpi-scope-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rpi-scope-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.09);
}

.rpi-scope-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.rpi-scope-icon svg {
    width: 18px;
    height: 18px;
}

.rpi-scope-item > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.rpi-scope-item strong {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rpi-scope-item span {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ══════════════════════════════════════
   TIMELINE
══════════════════════════════════════ */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.timeline__item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 1.25rem;
    position: relative;
}

.timeline__marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.timeline__step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), #3b82f6);
    color: white;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}

.timeline__step-num--final {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 4px 12px rgba(22,163,74,0.4);
}

.timeline__line {
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, #3b82f6 0%, var(--border-color) 100%);
    margin: 0.4rem 0;
    min-height: 2rem;
}

/* ── Carte ── */
.timeline__content {
    padding-bottom: 2.5rem;
}

.timeline__item--last .timeline__content {
    padding-bottom: 0;
}

.timeline__card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    transition: box-shadow 0.25s;
}

.timeline__card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}

.timeline__card--final {
    border-color: rgba(22, 163, 74, 0.35);
    background: linear-gradient(135deg,
        var(--bg-primary) 0%,
        color-mix(in srgb, var(--bg-primary) 94%, #16a34a) 100%
    );
}

.timeline__card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.timeline__icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.timeline__icon svg {
    width: 20px;
    height: 20px;
}

.timeline__card-header > div:nth-child(2) {
    flex: 1;
}

.timeline__phase {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.timeline__card-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

/* ── Badges état ── */
.timeline__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 2px;
}

.timeline__badge--done {
    background: rgba(22, 197, 94, 0.12);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

[data-theme="dark"] .timeline__badge--done {
    background: rgba(22, 197, 94, 0.1);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.25);
}

.timeline__badge--pending {
    background: rgba(251, 191, 36, 0.12);
    color: #b45309;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

[data-theme="dark"] .timeline__badge--pending {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.25);
}

/* ── Description ── */
.timeline__desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ── Checklist ── */
.timeline__checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline__checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.timeline__checklist li svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--border-color);
}

.timeline__checklist li.done svg {
    color: #22c55e;
}

.timeline__checklist li.done {
    color: var(--text-primary);
}

/* ── Sous-sections ── */
.timeline__sub-sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.timeline__sub {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 1rem 1.15rem;
}

.timeline__sub h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.timeline__sub h4 svg {
    width: 15px;
    height: 15px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

/* ── Liste matériel commandé ── */
.timeline__material-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.65rem;
}

.material-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--primary-blue);
}

.material-item svg {
    width: 15px;
    height: 15px;
    color: var(--primary-blue);
    flex-shrink: 0;
    margin-top: 2px;
}

.material-item > div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.material-item strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.material-item span {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ── Lien document cliquable ── */
.timeline__doc-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.timeline__doc-link:hover {
    background: color-mix(in srgb, var(--bg-secondary) 80%, #16a34a);
    border-color: rgba(22, 163, 74, 0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.timeline__doc-link > i:first-child {
    width: 20px;
    height: 20px;
    color: #16a34a;
    flex-shrink: 0;
}

.timeline__doc-link > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.timeline__doc-link strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline__doc-link span {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.tpl-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.timeline__doc-link:hover .tpl-arrow {
    transform: translateX(4px);
    color: #16a34a;
}

/* ── Galerie photos ── */
.timeline__photo-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tpg-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.tpg-header svg {
    width: 16px;
    height: 16px;
    color: var(--primary-blue);
}

.rpi-gallery {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.rpi-gallery__track {
    position: relative;
    height: 420px;
    background: #111827;
}

.rpi-gallery__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
}

.rpi-gallery__slide.active {
    opacity: 1;
}

.rpi-gallery__slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.rpi-gallery__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 1rem 0.6rem;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
    color: rgba(255,255,255,0.92);
    font-size: 0.82rem;
    text-align: center;
}

.rpi-gallery__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(0,0,0,0.45);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.rpi-gallery__btn:hover {
    background: rgba(0,0,0,0.72);
}

.rpi-gallery__btn--prev { left: 10px; }
.rpi-gallery__btn--next { right: 10px; }

.rpi-gallery__btn svg {
    width: 18px;
    height: 18px;
}

.rpi-gallery__dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 3;
}

.rpi-gallery__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.rpi-gallery__dot.active {
    background: white;
    transform: scale(1.3);
}

@media (max-width: 600px) {
    .rpi-gallery__track { height: 280px; }
}

/* ── Placeholder document / photo ── */
.timeline__doc-placeholder {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.1rem;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.timeline__doc-placeholder svg {
    width: 18px;
    height: 18px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.timeline__doc-placeholder em {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ── Notice confidentialité ── */
.timeline__doc-confidential {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.1rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.83rem;
    font-style: italic;
}

.timeline__doc-confidential svg {
    width: 16px;
    height: 16px;
    color: #ef4444;
    flex-shrink: 0;
}

[data-theme="dark"] .timeline__doc-confidential {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

/* ══════════════════════════════════════
   COMPÉTENCES MOBILISÉES
══════════════════════════════════════ */
.rpi-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.1rem;
    margin-top: 1.5rem;
}

.rpi-skill-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rpi-skill-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.09);
}

.rpi-skill-card svg {
    width: 28px;
    height: 28px;
}

.rpi-skill-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.rpi-skill-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .timeline__item {
        grid-template-columns: 36px 1fr;
        gap: 0.9rem;
    }

    .timeline__step-num {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .timeline__card {
        padding: 1.1rem;
    }

    .timeline__card-header {
        flex-wrap: wrap;
    }

    .timeline__material-list {
        grid-template-columns: 1fr;
    }

    .rpi-hero {
        padding: 3rem 1.25rem 2.5rem;
    }
}
