/* ============================================================
   GUIDE.CSS — Styles partagés pour /site/
   (guide-eleve, guide-enseignant, a-propos, mentions…)
   Basé sur l'existant + ajouts pages /site/
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* ==================== HEADER ==================== */
header, .guide-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px 40px 90px;
    text-align: center;
}

h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle,
.guide-header p {
    font-size: 1.4em;
    opacity: 0.95;
}

/* Lien retour accueil */
.guide-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .88rem;
    margin-top: 14px;
    transition: color .15s;
}
.guide-back:hover { color: #fff; }

/* ==================== CONTENU PRINCIPAL ==================== */
.main-content,
.guide-container {
    padding: 50px 40px;
}

/* Container léger pour les pages simples (guides, à propos) */
.guide-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem 3rem;
}

/* ==================== TITRES DE SECTION ==================== */
.section-title {
    color: #667eea;
    font-size: 2.2em;
    margin: 3rem 0 2rem 0;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* ==================== GRILLES ==================== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

/* ==================== CARDS ==================== */
.card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 35px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
    border: 3px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.card:hover::before { left: 100%; }

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    border-color: #667eea;
}

.card-icon { font-size: 4em; margin-bottom: 20px; }

.card h3 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card a {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* CARDS GUIDES (spéciales) */
.guide-card { border: 3px solid; }

.guide-teacher {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f3ff 0%, #e6ebff 100%);
}

.guide-student {
    border-color: #27ae60;
    background: linear-gradient(135deg, #f0fff4 0%, #e6ffe6 100%);
}

.guide-eval {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #fff0f0 0%, #ffe6e6 100%);
}

/* ==================== GUIDE-CARD (pages /site/) ==================== */
.guide-card-v2 {
    background: #fff;
    border-radius: 18px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}

.guide-card-v2 h2 {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: .8rem;
}

.guide-card-v2 h3 {
    color: #2c3e50;
    margin-top: 1.2rem;
    margin-bottom: .4rem;
    font-size: 1.1rem;
}

.guide-card-v2 p  { margin-bottom: .6rem; }
.guide-card-v2 ul { padding-left: 1.6rem; margin-bottom: .6rem; }
.guide-card-v2 li { margin-bottom: .3rem; }

/* ==================== BOÎTES CONTEXTUELLES ==================== */
.box,
.info-box, .success-box, .warning-box, .tip-box {
    padding: 1.2rem 1.4rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 5px solid;
}

.box-info,    .info-box    { background: #e3f2fd; border-color: #2196f3; }
.box-success, .success-box { background: #e8f5e9; border-color: #4caf50; }
.box-warning, .warning-box { background: #fff3e0; border-color: #ff9800; }
.box-tip,     .tip-box     { background: #f3e5f5; border-color: #9c27b0; }

.box strong { display: block; margin-bottom: .3rem; }

/* ==================== BADGE "EN CONSTRUCTION" ==================== */
.wip-badge {
    display: inline-block;
    background: #fff3e0;
    color: #e65100;
    border: 1px dashed #ffb74d;
    border-radius: 20px;
    padding: 2px 12px;
    font-size: .8rem;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

/* ==================== STATS (page à propos) ==================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin: 1.2rem 0;
}

.stat-block {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.stat-block .num {
    font-size: 1.8rem;
    font-weight: 800;
    color: #667eea;
}

.stat-block .lbl {
    font-size: .78rem;
    color: #666;
    margin-top: 2px;
}

/* ==================== CHAPITRES ==================== */
.theme-section {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 30%);
    border-radius: 15px;
}

.theme-title {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 1.5rem;
    padding-left: 15px;
    border-left: 5px solid #667eea;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.chapter-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #667eea;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chapter-card:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.chapter-number {
    font-size: 0.9em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 8px;
}

.chapter-title {
    font-size: 1.3em;
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 12px;
}

.chapter-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chapter-links a {
    padding: 8px 15px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s;
}

.chapter-links a:hover {
    background: #764ba2;
    transform: scale(1.05);
}

/* ==================== FOOTER ==================== */
footer, .guide-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px;
    font-size: 0.95em;
}

/* Footer léger (pages /site/) */
.guide-footer {
    background: transparent;
    color: rgba(255,255,255,.7);
    padding: 20px;
    font-size: .82rem;
}

.guide-footer a { color: #ffd666; text-decoration: none; }
.guide-footer a:hover { text-decoration: underline; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    h1 { font-size: 2.5em; }
    .subtitle, .guide-header p { font-size: 1.1em; }
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .chapters-grid { grid-template-columns: 1fr; }
    .main-content { padding: 30px 20px; }
    .guide-container { padding: 0 .8rem 2rem; }
    .guide-card-v2 { padding: 1.4rem; border-radius: 14px; }
    .guide-card-v2 h2 { font-size: 1.25rem; }
    header, .guide-header { padding: 40px 20px; }
}

/* ==================== IMPRESSION ==================== */
@media print {
    body { background: white; padding: 0; }
    .card, .guide-card, footer, .guide-footer, .guide-back { display: none; }
}