/* ============================================================
   TUTOS KALI — Styles partagés
   PCTamalou.fr /konsole/tutos/
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a 60%, #1f1f1f);
    color: #E0E0E0;
    line-height: 1.7;
    min-height: 100vh;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* ---------- Liens ---------- */
a {
    color: #00BFFF;
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}

a:hover {
    color: #7fdcff;
    text-shadow: 0 0 8px rgba(0, 191, 255, 0.5);
}

/* ---------- Navigation retour ---------- */
.back-nav {
    text-align: center;
    margin-bottom: 25px;
}

.back-nav a {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid #00BFFF;
    border-radius: 10px;
    font-weight: bold;
    transition: background 0.2s, box-shadow 0.2s;
}

.back-nav a:hover {
    background: rgba(0, 191, 255, 0.1);
    box-shadow: 0 0 12px rgba(0, 191, 255, 0.4);
}

/* ---------- Titres ---------- */
h1 {
    color: #00BFFF;
    font-family: 'Orbitron', 'Roboto', sans-serif;
    text-align: center;
    text-transform: uppercase;
    font-size: 2rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(0, 191, 255, 0.4);
}

h2 {
    color: #ff9900;
    font-size: 1.4rem;
    margin-top: 25px;
    margin-bottom: 12px;
    border-left: 4px solid #ff9900;
    padding-left: 12px;
}

h3 {
    color: #d4def0;
    font-size: 1.15rem;
    margin-top: 18px;
    margin-bottom: 8px;
}

/* ---------- Paragraphes ---------- */
p {
    color: #c8d2e0;
    margin-bottom: 12px;
}

/* ---------- Étapes / Blocs ---------- */
.step {
    margin-top: 25px;
    padding: 20px;
    border: 2px solid #FFD700;
    border-radius: 12px;
    background: rgba(255, 215, 0, 0.03);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.15);
}

.step-title {
    color: #FFD700;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- Commandes ---------- */
.cmd {
    color: #00ff00;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    background: rgba(0, 255, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

code {
    font-family: 'Courier New', monospace;
    background: #0d0d0d;
    color: #00ff88;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.95em;
    border: 1px solid #222;
}

pre {
    background: #0d0d0d;
    border: 1px solid #333;
    border-left: 4px solid #00BFFF;
    border-radius: 8px;
    padding: 15px;
    overflow-x: auto;
    margin: 12px 0;
    color: #00ff88;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
}

pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}

/* ---------- Exemples ---------- */
.example {
    color: #FFD700;
    font-style: italic;
    margin-left: 15px;
    margin-bottom: 8px;
    font-size: 0.95em;
}

/* ---------- Astuces ---------- */
.tip {
    color: #ffcc00;
    font-style: italic;
    margin-top: 8px;
    padding-left: 15px;
    border-left: 3px solid #ffcc00;
}

.tip::before {
    content: "💡 ";
    font-style: normal;
}

/* ---------- Défis ---------- */
.challenge {
    color: #00ffff;
    font-weight: bold;
    margin-top: 15px;
    padding: 12px;
    border: 1px dashed #00ffff;
    border-radius: 8px;
    background: rgba(0, 255, 255, 0.05);
}

.challenge::before {
    content: "🎯 DÉFI — ";
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
}

/* ---------- Fun notes ---------- */
.fun-note {
    color: #ff00ff;
    font-style: italic;
    margin-top: 8px;
}

.fun-note::before {
    content: "✨ ";
    font-style: normal;
}

/* ---------- Vérification ---------- */
.verify {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    color: #b8ffb8;
}

.verify::before {
    content: "✅ VÉRIFICATION — ";
    color: #00ff00;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
}

/* ---------- Avertissement ---------- */
.warning {
    background: rgba(255, 100, 100, 0.08);
    border-left: 4px solid #ff4040;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    color: #ffb8b8;
}

.warning::before {
    content: "⚠️ ATTENTION — ";
    color: #ff4040;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
}

/* ---------- Note légale ---------- */
.legal {
    background: rgba(138, 43, 226, 0.08);
    border-left: 4px solid #8A2BE2;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    color: #d4b8ff;
    font-size: 0.92em;
}

.legal::before {
    content: "⚖️ ";
    font-style: normal;
}

/* ---------- Navigation bas de page ---------- */
.tuto-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #333;
    flex-wrap: wrap;
}

.tuto-nav a {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid #00BFFF;
    border-radius: 10px;
    font-weight: bold;
    transition: background 0.2s, box-shadow 0.2s;
    flex: 1;
    text-align: center;
    min-width: 140px;
}

.tuto-nav a:hover {
    background: rgba(0, 191, 255, 0.1);
    box-shadow: 0 0 12px rgba(0, 191, 255, 0.4);
}

.tuto-nav a.prev {
    color: #b388ff;
    border-color: #b388ff;
}

.tuto-nav a.prev:hover {
    background: rgba(179, 136, 255, 0.1);
    box-shadow: 0 0 12px rgba(179, 136, 255, 0.4);
}

.tuto-nav a.next {
    color: #00ff88;
    border-color: #00ff88;
}

.tuto-nav a.next:hover {
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.tuto-nav a.home {
    color: #FFD700;
    border-color: #FFD700;
}

.tuto-nav a.home:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

/* ---------- Sommaire (index) ---------- */
.intro {
    text-align: center;
    margin-bottom: 30px;
    color: #a8b8d0;
    font-size: 1.05em;
}

.tuto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 25px;
}

.tuto-card {
    background: #1f242e;
    border: 1px solid #2f3745;
    border-radius: 14px;
    padding: 20px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.tuto-card:hover {
    transform: translateY(-4px);
    border-color: #00BFFF;
    box-shadow: 0 8px 25px rgba(0, 191, 255, 0.2);
}

.tuto-card .num {
    display: inline-block;
    background: linear-gradient(135deg, #00BFFF, #8A2BE2);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.tuto-card h3 {
    color: #e8eef8;
    font-size: 1.15rem;
    margin: 5px 0 10px;
}

.tuto-card p {
    color: #98a8c0;
    font-size: 0.92em;
    margin-bottom: 15px;
    flex-grow: 1;
}

.tuto-card a {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 191, 255, 0.1);
    border: 1px solid #00BFFF;
    border-radius: 8px;
    font-weight: bold;
    align-self: flex-start;
    transition: background 0.2s, box-shadow 0.2s;
}

.tuto-card a:hover {
    background: rgba(0, 191, 255, 0.2);
    box-shadow: 0 0 12px rgba(0, 191, 255, 0.4);
}

/* ---------- Badge difficulté ---------- */
.difficulty {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: normal;
    font-family: 'Roboto', sans-serif;
}

.diff-easy   { background: #1f4a2a; color: #7fff9f; border: 1px solid #2a6640; }
.diff-medium { background: #4a3f1f; color: #ffd97f; border: 1px solid #66552a; }
.diff-hard   { background: #4a1f1f; color: #ff9f9f; border: 1px solid #662a2a; }

/* ---------- Pied de page ---------- */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    color: #7a8a9f;
    font-size: 0.9em;
}

.footer a {
    color: #00BFFF;
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
    body {
        padding: 15px;
    }
    h1 {
        font-size: 1.5rem;
    }
    h2 {
        font-size: 1.15rem;
    }
    .tuto-grid {
        grid-template-columns: 1fr;
    }
    .tuto-nav {
        flex-direction: column;
    }
    .tuto-nav a {
        width: 100%;
    }
    pre {
        font-size: 0.82em;
        padding: 12px;
    }
}