/* ================================================================
   detail_shared.css — Styles communs à toutes les pages de détail
   (stages & APs / projets)
   ================================================================ */

/* ---- Conteneur principal ---- */
.ap-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

/* ---- Lien retour ---- */
.back-link {
    display: inline-block;
    background: linear-gradient(135deg, #0057B7 0%, #1E90FF 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 87, 183, 0.3);
}
.back-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 87, 183, 0.4);
    color: white;
}
.back-link:focus,
.back-link:active,
.back-link:visited { color: white; text-decoration: none; }

/* ---- Hero / en-tête de page ---- */
.ap-hero {
    background: linear-gradient(90deg, #2c3e50, #3498db);
    color: #fff;
    border-radius: 15px;
    padding: 2.2rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.ap-hero::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.ap-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 3px 14px;
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}
.ap-hero h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0 0 1rem;
    text-shadow: none;
    text-align: left;
    color: #fff;
}
.ap-hero h1::after { display: none; }
.ap-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.88rem;
    opacity: 0.9;
}
.ap-meta span { display: flex; align-items: center; gap: 5px; }

/* ---- Carte de contenu ---- */
.ap-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 1.8rem 2rem;
    margin-bottom: 1.5rem;
}
.ap-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}
.ap-card h2::after { display: none; }
.ap-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.8rem;
}
.ap-card p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}
.ap-card p:last-child { margin-bottom: 0; }

/* ---- Highlight box ---- */
.highlight-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e7ff 100%);
    border-left: 4px solid #3498db;
    border-radius: 0 10px 10px 0;
    padding: 1.4rem 1.8rem;
    margin-bottom: 1.5rem;
}
.highlight-box h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.7rem;
}
.highlight-box p, .highlight-box li {
    color: #555;
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

/* ---- Tags technos ---- */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.tech-tag {
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e7ff 100%);
    border: 1px solid #d0e0f7;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.85rem;
    color: #2c3e50;
    font-weight: 600;
}

/* ---- Tags compétences ---- */
.comp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.comp-tag {
    background: #fff;
    border: 1px solid #d0e8f7;
    color: #2980b9;
    border-radius: 50px;
    padding: 5px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: 0.3s;
}
.comp-tag:hover {
    background: #3498db;
    color: #fff;
    transform: translateY(-2px);
}

/* ---- Badge état ---- */
.etat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eafaf1;
    border: 1px solid #a9dfbf;
    color: #1e8449;
    border-radius: 50px;
    padding: 4px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
}

/* ---- Listes contrib / contraintes ---- */
.contrib-list,
.contraintes-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.contrib-list li {
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e7ff 100%);
    border-left: 4px solid #3498db;
    border-radius: 0 10px 10px 0;
    padding: 0.9rem 1.2rem;
    font-size: 0.92rem;
    color: #333;
    line-height: 1.65;
}
.contraintes-list li {
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e7ff 100%);
    border-left: 4px solid #3498db;
    border-radius: 0 10px 10px 0;
    padding: 0.7rem 1.1rem;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
}
.contrib-list li strong,
.contraintes-list li strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 2px;
}

/* ---- Liste arborescence ---- */
.arbo-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.arbo-list li {
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e7ff 100%);
    border: 1px solid #d0e0f7;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.88rem;
    color: #2c3e50;
    font-weight: 600;
}

/* ---- Liste propre (stages) ---- */
.clean-list {
    list-style: none;
    padding: 0; margin: 0 0 0.5rem;
}
.clean-list li {
    padding: 4px 0;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
}

/* ---- Grille missions ---- */
.missions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 640px) { .missions-grid { grid-template-columns: 1fr; } }

.mission-block {
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e7ff 100%);
    border-radius: 10px;
    padding: 1.2rem 1.3rem;
    border-top: 4px solid #3498db;
}
.mission-block.sisr { border-top-color: #2c3e50; }
.mission-block h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.8rem;
}
.mission-block ul {
    list-style: none;
    padding: 0; margin: 0;
}
.mission-block ul li {
    font-size: 0.88rem;
    color: #555;
    padding: 3px 0 3px 1.2rem;
    position: relative;
    line-height: 1.6;
}
.mission-block ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #3498db;
    font-size: 0.8rem;
}
.mission-block.sisr ul li::before { color: #2c3e50; }

/* ---- Grille MVT ---- */
.mvt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}
@media (max-width: 600px) { .mvt-grid { grid-template-columns: 1fr; } }
.mvt-block {
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e7ff 100%);
    border-radius: 10px;
    padding: 1rem;
    border-top: 3px solid #3498db;
    font-size: 0.88rem;
    color: #444;
    line-height: 1.6;
}
.mvt-block strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

/* ---- Grille défis ---- */
.defi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
}
.defi-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e7ff 100%);
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    border-top: 3px solid #e74c3c;
    font-size: 0.88rem;
    color: #444;
    line-height: 1.6;
}
.defi-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 3px;
}
.defi-item .solution {
    margin-top: 6px;
    font-size: 0.83rem;
    color: #1e8449;
    font-weight: 600;
}

/* ---- Grille RGPD / juridique ---- */
.rgpd-grid,
.juridique-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
}
.rgpd-item,
.juridique-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e7ff 100%);
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    border-top: 3px solid #3498db;
    font-size: 0.88rem;
    color: #444;
    line-height: 1.6;
}
.rgpd-item strong,
.juridique-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 3px;
    font-size: 0.85rem;
}

/* ---- Bloc avertissement / incident ---- */
.incident-block,
.security-block {
    background: #fff8f0;
    border: 1px solid #fcd9a0;
    border-left: 4px solid #f39c12;
    border-radius: 0 10px 10px 0;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    font-size: 0.92rem;
    color: #555;
    line-height: 1.7;
}
.incident-block strong,
.security-block strong { color: #2c3e50; }
.incident-block .fix,
.security-block .fix {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #1e8449;
    font-weight: 600;
}

/* ---- Workflow ---- */
.workflow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0.8rem 0;
}
.workflow-step {
    background: #fff;
    border: 1px solid #d0e0f7;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #2c3e50;
}
.workflow-arrow { color: #3498db; font-size: 1rem; }
.workflow-step.new {
    background: #eafaf1;
    border-color: #a9dfbf;
    color: #1e8449;
}

/* ---- Tableau ---- */
.table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}
.ap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.ap-table thead {
    background: linear-gradient(90deg, #2c3e50, #3498db);
    color: #fff;
}
.ap-table thead th {
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}
.ap-table tbody tr:nth-child(even) {
    background: linear-gradient(135deg, #f5f7fa 0%, #e0e7ff 60%);
}
.ap-table tbody td {
    padding: 0.75rem 1rem;
    color: #555;
    vertical-align: top;
    border-bottom: 1px solid #e0e0e0;
    line-height: 1.5;
}
.ap-table tbody tr:last-child td { border-bottom: none; }
.ap-table tbody td:first-child {
    font-weight: 700;
    color: #2c3e50;
    white-space: nowrap;
}

/* ---- Image container (stages) ---- */
.image-container {
    text-align: center;
    margin: 1.5rem 0;
}
.image-container figure { margin: 0; }
.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.image-container img:hover { transform: scale(1.02); }
.image-container figcaption {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

/* ---- Tableau compétences (stages) ---- */
.skills-table {
    text-align: center;
    margin: 2rem 0;
}
.skills-table h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}
.skills-table img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ---- Lien production (stage 2ème année) ---- */
.production-link {
    display: inline-block;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}
.production-link:hover { opacity: 0.85; color: #fff; }

/* ---- Carte GitHub ---- */
.github-card {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.github-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.8rem;
}
.github-icon { color: #24292e; flex-shrink: 0; }
.github-title h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #0366d6;
    margin: 0;
}
.github-badge {
    background: rgba(27,31,35,0.08);
    border: 1px solid rgba(27,31,35,0.15);
    border-radius: 50px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #586069;
    margin-left: 8px;
}
.github-description {
    color: #586069;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}
.github-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    color: #586069;
}
.stat-item { display: flex; align-items: center; gap: 5px; }
.stat-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.stat-dot.python { background: #3572A5; }
.stat-dot.html   { background: #e34c26; }
.stat-dot.js     { background: #f1e05a; }
.stat-dot.php    { background: #4F5D95; }
.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.2s;
}
.github-link:hover { opacity: 0.85; color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .ap-detail { padding: 1rem 0.75rem 3rem; }
    .ap-hero   { padding: 1.5rem 1.2rem; }
    .ap-card   { padding: 1.3rem 1.2rem; }
}
