/* =====================================================
   GUIDE HARDWARE & ÉLECTRONIQUE — Feuille de style
   Compatible avec le template de site personnel
   ===================================================== */

/* ── Reset & base ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: linear-gradient(to top, #000000, #2a5298);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', system-ui, sans-serif;
    overflow-x: hidden;
    color: rgba(255,255,255,0.88);
}

/* ── Barre de progression ── */
#progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, #4a90e2, #00c6ff);
    z-index: 999;
    width: 0%;
    transition: width .1s linear;
}

/* ── Logo ── */
#logo {
    text-align: center;
    margin-top: 20px;
}
#logo img { width: 200px; }

/* ── Titre ── */
#titreaccueil {
    text-align: center;
    margin: clamp(16px, 4vh, 36px) auto clamp(14px, 3vw, 30px);
    color: white;
    font-size: clamp(18px, 2.5vw, 28px);
    letter-spacing: 2px;
}

/* ── Menu ── */
.menu-barre {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: clamp(8px, 1.5vw, 15px);
    width: 90%;
    margin: 0 auto clamp(20px, 4vw, 40px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.menu-barre a {
    position: relative;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: clamp(8px, 1.2vw, 12px) clamp(8px, 1.2vw, 15px);
    border-radius: 8px;
    flex: 1;
    min-width: 100px;
    text-align: center;
    transition: all 0.3s ease;
    font-size: clamp(13px, 1.2vw, 16px);
    overflow: hidden;
}
.menu-barre a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 3px;
    bottom: 5px;
    left: 50%;
    background: white;
    transition: .3s ease;
    transform: translateX(-50%);
}
.menu-barre a:hover::after { width: 60%; }
.menu-barre a:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* ── Bouton retour ── */
#mainbouton {
    display: flex;
    justify-content: flex-start;
    padding: clamp(14px, 3vw, 36px) clamp(15px, 5vw, 70px);
}
.btn-retour {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: clamp(10px, 1.5vw, 12px) clamp(16px, 2.5vw, 24px);
    font-size: clamp(13px, 1.4vw, 16px);
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #4a90e2, #0077ff);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
    text-decoration: none;
}
.btn-retour .arrow { transition: transform 0.3s ease; }
.btn-retour:hover {
    background: linear-gradient(135deg, #357ABD, #005fcc);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.btn-retour:hover .arrow { transform: translateX(-5px); }
.btn-retour:active { transform: scale(0.95); }

/* ── Footer ── */
footer {
    margin-top: auto;
    padding: clamp(14px, 2vw, 25px);
    font-size: clamp(11px, 1vw, 13px);
    text-align: center;
    color: rgba(255,255,255,0.5);
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* =====================================================
   CONTENU DU GUIDE
   ===================================================== */

.guide-wrapper {
    width: min(980px, 95%);
    margin: 0 auto clamp(60px, 10vw, 120px);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ── Navigation chapitres ── */
.chap-nav {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.08);
}
.chap-nav .nav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: rgba(255,255,255,0.3);
    font-weight: 700;
    margin-right: 4px;
}
.chap-nav a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    transition: all .18s;
    letter-spacing: .04em;
}
.chap-nav a:hover {
    background: rgba(74,144,226,0.25);
    color: white;
    border-color: rgba(74,144,226,0.45);
    transform: translateY(-2px);
}

/* ── Bloc chapitre ── */
.chapitre {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
}

.chap-header {
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: clamp(20px, 3vw, 38px) clamp(20px, 4vw, 46px);
}
.chap-num {
    font-size: 10px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: #4a90e2;
    font-weight: 700;
    margin-bottom: 8px;
}
.chap-header h2 {
    font-size: clamp(22px, 3.2vw, 38px);
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 12px;
}
.chap-header h2 span { color: #4a90e2; }
.chap-intro {
    font-size: clamp(13.5px, 1.5vw, 15.5px);
    font-style: italic;
    color: rgba(255,255,255,0.55);
    border-left: 3px solid rgba(74,144,226,0.45);
    padding-left: 16px;
    line-height: 1.65;
    max-width: 680px;
}

.chap-body {
    padding: clamp(20px, 3vw, 38px) clamp(20px, 4vw, 46px);
    font-size: clamp(13px, 1.4vw, 15px);
    line-height: 1.75;
}
.chap-body p { margin-bottom: 1.1em; color: rgba(255,255,255,0.8); }
.chap-body h3 {
    font-size: clamp(15px, 2vw, 19px);
    font-weight: 700;
    color: #7ab8f5;
    margin: 2em 0 .65em;
}
.chap-body h4 {
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(74,144,226,0.75);
    margin: 1.6em 0 .5em;
    font-weight: 700;
}

/* ── Grille d'outils ── */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin: 1.2em 0;
}
.tool-card {
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 17px 19px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative;
    overflow: hidden;
}
.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4a90e2, #00c6ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s;
}
.tool-card:hover::before { transform: scaleX(1); }
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.45);
    border-color: rgba(74,144,226,0.32);
}
.tool-card .tool-icon { font-size: 21px; margin-bottom: 9px; }
.tool-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin: 0 0 7px;
    text-transform: none;
    letter-spacing: 0;
}
.tool-card p {
    font-size: 12.5px;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    margin: 0;
}

/* ── Tags ── */
.tag {
    display: inline-block;
    margin-top: 9px;
    font-size: 10px;
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: .07em;
}
.tag.essential  { background: rgba(74,144,226,.18); color: #7ab8f5;  border: 1px solid rgba(74,144,226,.28); }
.tag.recommended{ background: rgba(58,140,80,.18);  color: #6db882;  border: 1px solid rgba(58,140,80,.28); }
.tag.advanced   { background: rgba(196,98,45,.18);  color: #e07848;  border: 1px solid rgba(196,98,45,.28); }
.tag.passif     { background: rgba(150,100,220,.18);color: #c0a0f0;  border: 1px solid rgba(150,100,220,.28);}
.tag.actif      { background: rgba(220,150,50,.18); color: #f0c070;  border: 1px solid rgba(220,150,50,.28); }

/* ── Formule ── */
.formula-box {
    background: rgba(0,0,0,0.32);
    border: 1px solid rgba(74,144,226,0.22);
    border-left: 3px solid #4a90e2;
    border-radius: 0 10px 10px 0;
    padding: 20px 26px;
    margin: 1.3em 0;
    font-family: 'Courier New', monospace;
}
.formula-label {
    font-size: 10px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(74,144,226,0.7);
    margin-bottom: 8px;
    font-family: 'Segoe UI', sans-serif;
}
.formula-main {
    font-size: clamp(22px, 3vw, 32px);
    color: #7ab8f5;
    font-weight: 700;
    letter-spacing: .04em;
}
.formula-detail {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 10px;
    line-height: 1.8;
    font-family: 'Segoe UI', sans-serif;
}
.formula-detail strong { color: #7ab8f5; }

/* ── Grille deux colonnes ── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 1.3em 0;
}

/* ── Composant card simple ── */
.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    margin: 1.2em 0;
}
.component-card {
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: border-color .2s;
}
.component-card:hover { border-color: rgba(74,144,226,.3); }
.comp-name   { font-size: 13.5px; font-weight: 700; color: white; }
.comp-symbol { font-family: monospace; font-size: 11px; color: #7ab8f5; letter-spacing: .08em; }
.comp-desc   { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.5; }

/* ── Steps ── */
.step-list { list-style: none; display: flex; flex-direction: column; gap: 9px; margin: 1.2em 0; }
.step-list li {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 13px 17px;
    background: rgba(255,255,255,0.048);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 10px;
    transition: border-color .2s;
}
.step-list li:hover { border-color: rgba(74,144,226,.25); }
.step-n { font-family: monospace; font-size: 10px; color: #4a90e2; min-width: 24px; padding-top: 1px; font-weight: 700; }
.step-text { font-size: 13px; line-height: 1.55; }
.step-text strong { color: #7ab8f5; }

/* ── Callout ── */
.callout {
    display: flex;
    gap: 13px;
    padding: 14px 18px;
    border-radius: 10px;
    margin: 1.3em 0;
    font-size: 13px;
    line-height: 1.6;
    align-items: flex-start;
}
.callout.warning { background: rgba(196,98,45,.11); border: 1px solid rgba(196,98,45,.28); color: #e09070; }
.callout.tip     { background: rgba(58,140,80,.1);  border: 1px solid rgba(58,140,80,.24);  color: #6db882; }
.callout.info    { background: rgba(74,144,226,.08);border: 1px solid rgba(74,144,226,.2);  color: #7ab8f5; }
.callout-icon { font-size: 17px; flex-shrink: 0; margin-top: 1px; }

/* ── Code block ── */
.code-block {
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 18px 22px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.8;
    color: rgba(255,255,255,0.55);
    overflow-x: auto;
    margin: 1.1em 0;
}
.c-comment { color: rgba(255,255,255,0.27); }
.c-keyword { color: #7ab8f5; }
.c-value   { color: #6db882; }
.c-label   { color: #c0a0f0; }

/* ── Tableau ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 12.5px;
}
.data-table th {
    font-size: 10px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: rgba(74,144,226,0.8);
    padding: 9px 13px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 700;
    background: rgba(0,0,0,0.22);
}
.data-table td {
    padding: 9px 13px;
    border-bottom: 1px solid rgba(255,255,255,0.048);
    color: rgba(255,255,255,0.72);
    vertical-align: top;
}
.data-table td:first-child { font-family: monospace; font-size: 12px; color: #7ab8f5; }
.data-table tr:hover td { background: rgba(255,255,255,0.028); }

/* ── Projets ── */
.project-list { display: flex; flex-direction: column; gap: 12px; margin: 1.2em 0; }
.project-item {
    background: rgba(255,255,255,0.048);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    padding: 18px 22px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    transition: border-color .2s, transform .18s;
}
.project-item:hover { border-color: rgba(74,144,226,.38); transform: translateX(4px); }
.project-num { font-size: 30px; font-weight: 800; color: rgba(255,255,255,.13); line-height: 1; min-width: 42px; }
.project-item h4 { font-size: 15px; font-weight: 700; color: white; margin: 0 0 6px; }
.project-item p { font-size: 12.5px; color: rgba(255,255,255,.52); line-height: 1.5; margin: 0; }
.difficulty { display: inline-flex; gap: 4px; margin-top: 9px; align-items: center; }
.difficulty .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.14); }
.difficulty .dot.on { background: #4a90e2; }
.diff-label { font-size: 11px; color: rgba(255,255,255,.32); margin-left: 8px; font-weight: 600; }

/* ── Erreurs ── */
.error-list { display: flex; flex-direction: column; gap: 9px; margin: 1.2em 0; }
.error-item {
    display: flex;
    gap: 13px;
    padding: 14px 17px;
    background: rgba(196,98,45,.07);
    border: 1px solid rgba(196,98,45,.18);
    border-left: 3px solid rgba(196,98,45,.55);
    border-radius: 0 10px 10px 0;
}
.error-x { font-family: monospace; font-size: 13px; color: #c4622d; flex-shrink: 0; padding-top: 1px; }
.error-body h5 { font-size: 13.5px; font-weight: 700; color: #e09070; margin-bottom: 4px; }
.error-body p { font-size: 12.5px; color: rgba(255,255,255,.5); line-height: 1.5; margin: 0; }

/* =====================================================
   ILLUSTRATIONS SVG
   ===================================================== */

.illustration {
    margin: 1.5em 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.illustration svg {
    display: block;
    width: 100%;
    height: auto;
    background: rgba(0,0,0,0.45);
}

/* Légende sous illustration */
.illu-caption {
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 8px 16px;
    font-size: 11.5px;
    color: rgba(255,255,255,0.42);
    font-style: italic;
    text-align: center;
    letter-spacing: .03em;
}

/* Grille d'illustrations côte à côte */
.illu-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 1.5em 0;
}
.illu-row .illustration { margin: 0; }

/* ── Bloc final ── */
.final-block {
    background: rgba(255,255,255,0.065);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: clamp(28px, 4vw, 52px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.09);
}
.final-block blockquote {
    font-size: clamp(17px, 2.4vw, 25px);
    font-style: italic;
    color: white;
    max-width: 650px;
    line-height: 1.45;
    position: relative;
    padding-left: 26px;
}
.final-block blockquote::before {
    content: '"';
    position: absolute;
    left: 0; top: -6px;
    font-size: 56px;
    color: #4a90e2;
    font-style: normal;
    line-height: 1;
}
.final-block cite {
    display: block;
    margin-top: 14px;
    font-size: 11px;
    font-style: normal;
    color: rgba(74,144,226,0.65);
    text-transform: uppercase;
    letter-spacing: .12em;
}
.final-cols {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 26px;
}
.final-col {
    flex: 1;
    min-width: 200px;
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    padding: 18px;
}
.final-col .col-title {
    font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: rgba(74,144,226,0.7); margin-bottom: 11px;
}
.final-col ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.final-col ul li { font-size: 12.5px; color: rgba(255,255,255,0.55); }
.final-col ul li::before { content: "→ "; color: #4a90e2; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    #logo { position: relative; margin: 15px auto 0; display: block; text-align: center; }
    .menu-barre { gap: 6px; width: 95%; }
    .menu-barre a { width: 100%; min-width: unset; }
    .two-col { grid-template-columns: 1fr; }
    .illu-row { grid-template-columns: 1fr; }
    .tool-grid { grid-template-columns: 1fr; }
    #mainbouton { justify-content: center; padding: 20px 15px; }
    .final-cols { flex-direction: column; }
}
@media (max-width: 500px) {
    .component-grid { grid-template-columns: 1fr; }
    .chap-nav { gap: 5px; }
}
