/* JessKimInvest — style inspiré d'un graphique NinjaTrader :
   fond de chart bleu ardoise, grille discrète, ligne de prix ambre. */

:root {
    --fond: #121a23;
    --panneau: #19232f;
    --grille: #263444;
    --texte: #e6eaf0;
    --doux: #97a4b4;
    --ambre: #f0b429;
    --ambre-fonce: #c98f10;
    --haussier: #35b27c;
    --baissier: #e2574c;
    --titre: "Barlow Condensed", "Arial Narrow", sans-serif;
    --corps: "Barlow", "Segoe UI", system-ui, sans-serif;
    --largeur: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--fond);
    color: var(--texte);
    font: 400 1.0625rem/1.6 var(--corps);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ambre); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--ambre);
    outline-offset: 3px;
}
code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: .9em;
    background: var(--panneau);
    border: 1px solid var(--grille);
    padding: .05em .35em;
    border-radius: 3px;
}

h1, h2, h3 {
    font-family: var(--titre);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: .005em;
    margin: 0 0 .5em;
}

/* ---------- En-tête ---------- */
.entete {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .75rem max(1.25rem, calc((100% - var(--largeur)) / 2));
    background: rgba(18, 26, 35, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--grille);
}
.marque {
    display: flex;
    align-items: center;
    gap: .6rem;
    font: 600 1.35rem/1 var(--titre);
    color: var(--texte);
    text-decoration: none;
    margin: 0;
}
.marque img { border-radius: 50%; }
.menu { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.menu a { color: var(--doux); text-decoration: none; font-weight: 500; }
.menu a:hover { color: var(--texte); }

/* ---------- Boutons ---------- */
.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: .55rem 1.2rem;
    border-radius: 4px;
    border: 1px solid transparent;
    font: 600 1rem/1.2 var(--corps);
    text-decoration: none;
    cursor: pointer;
}
.bouton-principal { background: var(--ambre); color: #1b1405; }
.bouton-principal:hover { background: var(--ambre-fonce); }
.bouton-secondaire { background: transparent; color: var(--texte); border-color: var(--grille); }
.bouton-secondaire:hover { border-color: var(--doux); }
.bouton-danger { background: transparent; color: var(--baissier); border-color: rgba(226, 87, 76, .45); }
.bouton-danger:hover { background: rgba(226, 87, 76, .12); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4.5rem max(1.25rem, calc((100% - var(--largeur)) / 2)) 5.5rem;
    background-image:
        linear-gradient(var(--grille) 1px, transparent 1px),
        linear-gradient(90deg, var(--grille) 1px, transparent 1px);
    background-size: 64px 64px;
    background-position: center top;
    border-bottom: 1px solid var(--grille);
    overflow: hidden;
}
.hero::before {
    /* Estompe la grille vers les bords */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(18, 26, 35, .55), var(--fond) 75%);
    pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 {
    font-size: clamp(2.6rem, 5.4vw, 4.4rem);
    font-weight: 700;
    line-height: 1;
    max-width: 14ch;
}
.chapo { color: var(--doux); font-size: 1.15rem; max-width: 46ch; margin: 0 0 1.75rem; }
.maj-site { color: var(--doux); font-size: .9rem; margin: 1.5rem 0 0; }

.hero-video {
    aspect-ratio: 16 / 9;
    border: 1px solid var(--grille);
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 60px -30px #000;
}
.hero-video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* La ligne de prix, comme la ligne Last d'un chart */
.ligne-prix {
    position: absolute !important;
    left: 0;
    right: 0;
    bottom: 2.2rem;
    border-top: 1px dashed var(--ambre);
    opacity: .9;
}
.ligne-prix span {
    position: absolute;
    right: 0;
    top: 0;
    transform: translateY(-50%);
    background: var(--ambre);
    color: #1b1405;
    font: 600 .95rem/1 var(--titre);
    padding: .3rem .7rem .3rem .9rem;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}

/* ---------- Bandeau NinjaTrader ---------- */
.bandeau-nt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: var(--largeur);
    margin: 2.5rem auto 0;
    padding: 1.25rem;
    border: 1px solid var(--grille);
    border-radius: 6px;
    background: var(--panneau);
}
.bandeau-nt p { margin: 0; flex: 1 1 220px; max-width: 30ch; color: var(--doux); }
.bandeau-nt a { flex: 0 1 728px; }
.bandeau-nt img { width: 100%; }
@media (max-width: 1160px) { .bandeau-nt { margin-left: 1.25rem; margin-right: 1.25rem; } }

/* ---------- Indicateurs ---------- */
.section-indicateurs {
    padding: 4.5rem max(1.25rem, calc((100% - var(--largeur)) / 2)) 3rem;
}
.titre-section h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.titre-section p { color: var(--doux); margin: 0 0 1.5rem; max-width: 62ch; }

.sommaire {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--grille);
}
.sommaire a {
    font: 500 .98rem/1 var(--titre);
    color: var(--texte);
    text-decoration: none;
    padding: .45rem .75rem;
    border: 1px solid var(--grille);
    border-radius: 3px;
}
.sommaire a:hover { border-color: var(--ambre); color: var(--ambre); }

.indicateur {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 2.5rem;
    align-items: start;
    padding: 3rem 0;
    border-bottom: 1px solid var(--grille);
}
.indicateur-image { margin: 0; }
.indicateur-image img {
    width: 100%;
    border: 1px solid var(--grille);
    border-radius: 4px;
    background: var(--panneau);
}
.indicateur-image a:hover img { border-color: var(--doux); }
.indicateur-image figcaption { color: var(--doux); font-size: .9rem; margin-top: .5rem; }

.indicateur-texte h3 { font-size: 2rem; margin-bottom: .35rem; }
.etiquettes { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.etiquette {
    font-size: .85rem;
    font-weight: 500;
    color: var(--doux);
    border: 1px solid var(--grille);
    border-radius: 3px;
    padding: .15rem .5rem;
}
.etiquette-maj { color: var(--haussier); border-color: rgba(53, 178, 124, .45); }
.description { margin: 0 0 1.5rem; max-width: 52ch; }
.vide { color: var(--doux); padding: 2rem 0; }

/* ---------- Pied de page ---------- */
.pied {
    border-top: 1px solid var(--grille);
    background: var(--panneau);
    padding: 3rem max(1.25rem, calc((100% - var(--largeur)) / 2)) 2rem;
    color: var(--doux);
    font-size: .95rem;
}
.pied-colonnes {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}
.pied h2 { font-size: 1.3rem; color: var(--texte); }
.pied .marque { margin-bottom: .75rem; }
.pied img { max-width: 260px; border-radius: 4px; }
.avertissement { font-size: .82rem; line-height: 1.55; max-width: 110ch; }
.copyright { font-size: .82rem; margin: 1rem 0 0; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 3rem; padding-bottom: 5rem; }
    .indicateur { grid-template-columns: 1fr; gap: 1.25rem; padding: 2.25rem 0; }
    .pied-colonnes { grid-template-columns: 1fr; }
    .entete { position: static; }
    .menu { gap: .4rem 1rem; font-size: .95rem; }
}

/* =========================================================
   Administration
   ========================================================= */
.admin-contenu { max-width: 900px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.panneau {
    background: var(--panneau);
    border: 1px solid var(--grille);
    border-radius: 6px;
    padding: 1.75rem;
}
.panneau-etroit { max-width: 440px; margin: 2rem auto; }
.panneau h1 { font-size: 2rem; }
.panneau > p { color: var(--doux); }

.titre-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.titre-admin h1 { margin: 0; }

form label {
    display: block;
    font-weight: 600;
    margin-bottom: 1.1rem;
}
form small { display: block; font-weight: 400; color: var(--doux); font-size: .85rem; margin-top: .3rem; }
input:not([type=checkbox]):not([type=file]), textarea {
    display: block;
    width: 100%;
    margin-top: .35rem;
    padding: .65rem .75rem;
    background: var(--fond);
    color: var(--texte);
    border: 1px solid var(--grille);
    border-radius: 4px;
    font: 400 1rem/1.45 var(--corps);
}
input[readonly] { color: var(--doux); }
textarea { resize: vertical; }
input[type=file] {
    display: block;
    width: 100%;
    margin-top: .35rem;
    padding: .6rem;
    border: 1px dashed var(--grille);
    border-radius: 4px;
    color: var(--doux);
    font: inherit;
    font-weight: 400;
}
input[type=date] { color-scheme: dark; }
.champ-date { display: flex; gap: .5rem; align-items: stretch; }
.champ-date input { margin-top: .35rem; }
.champ-date .bouton { margin-top: .35rem; white-space: nowrap; }
.grille-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 1.25rem; }
label.case { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
label.case input { width: 1.15rem; height: 1.15rem; accent-color: var(--ambre); }
.apercu img { max-width: 320px; border: 1px solid var(--grille); border-radius: 4px; }

.flash {
    padding: .8rem 1rem;
    border-radius: 4px;
    border-left: 3px solid var(--haussier);
    background: rgba(53, 178, 124, .1);
    margin: 0 0 1.5rem;
}
.flash-erreur { border-left-color: var(--baissier); background: rgba(226, 87, 76, .1); }

.liste-admin { list-style: none; margin: 0; padding: 0; }
.liste-admin li {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: .9rem 0;
    border-top: 1px solid var(--grille);
}
.liste-admin li.masque { opacity: .55; }
.liste-admin img { width: 96px; height: 60px; object-fit: cover; border-radius: 3px; border: 1px solid var(--grille); }
.liste-admin .infos { display: flex; flex-direction: column; min-width: 0; }
.liste-admin .infos strong { font: 600 1.3rem/1.2 var(--titre); }
.liste-admin .infos span { color: var(--doux); font-size: .88rem; }
.outils { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.outils form { display: flex; gap: .25rem; margin: 0; }
.bouton-icone {
    width: 2.4rem;
    height: 2.4rem;
    background: transparent;
    color: var(--doux);
    border: 1px solid var(--grille);
    border-radius: 4px;
    cursor: pointer;
    font-size: .75rem;
}
.bouton-icone:hover:not(:disabled) { color: var(--texte); border-color: var(--doux); }
.bouton-icone:disabled { opacity: .3; cursor: default; }

@media (max-width: 640px) {
    .liste-admin li { grid-template-columns: 72px 1fr; }
    .liste-admin img { width: 72px; height: 46px; }
    .outils { grid-column: 1 / -1; justify-content: flex-start; }
}
