/* ============================================================
   ASoftConsultant — Design system "Technical CAD" 2026
   ============================================================ */

:root {
    --ink:    #0a0a0a;
    --paper:  #fafafa;
    --line:   #e5e5e5;
    --line2:  #d4d4d4;
    --muted:  #737373;
    --cad:    #dc2626;     /* rouge "calque actif" */
    --plan:   #2563eb;     /* bleu "plan" */
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); }
::selection { background: var(--ink); color: var(--paper); }

/* ===== Typo ===== */
.font-display { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -0.02em; }
.font-mono    { font-family: "JetBrains Mono", monospace; }

.h-mega {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 500;
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.035em;
}
.h-display {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 500;
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    line-height: 1;
    letter-spacing: -0.03em;
}
.h-section {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 500;
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

/* Eyebrow / labels mono technique */
.eyebrow {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    color: var(--muted);
}
.eyebrow-ink { color: var(--ink); }
.eyebrow-cad { color: var(--cad); }

/* ===== Boutons ===== */
.btn-ink, .btn-line {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 0;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    font-family: "JetBrains Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn-ink {
    background: var(--ink); color: var(--paper);
    border: 1px solid var(--ink);
}
.btn-ink:hover { background: var(--paper); color: var(--ink); }
.btn-line {
    background: transparent; color: var(--ink);
    border: 1px solid var(--ink);
}
.btn-line:hover { background: var(--ink); color: var(--paper); }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--ink); font-weight: 500; font-size: 0.85rem;
    font-family: "JetBrains Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: gap 0.2s ease;
}
.btn-ghost:hover { gap: 0.7rem; }

.btn-lg-x { padding: 0.9rem 1.8rem; font-size: 0.85rem; }

/* ===== Cards "blueprint" ===== */
.card-flat {
    background: white;
    border: 1px solid var(--line);
    border-radius: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}
.card-flat:hover {
    border-color: var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    transform: translate(-2px, -2px);
}

.card-soft {
    background: white;
    border: 1px solid var(--line);
    border-radius: 0;
}

/* Corners (équerres) sur certaines cartes */
.has-corners { position: relative; }
.has-corners::before, .has-corners::after,
.has-corners > .corner-tl, .has-corners > .corner-br {
    content: ""; position: absolute;
    width: 10px; height: 10px;
    border: 1px solid var(--ink);
}
.has-corners::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.has-corners::after  { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.has-corners .corner-tl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.has-corners .corner-br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* ===== Hero / fond planche technique ===== */
.hero-bg {
    background:
        radial-gradient(circle at 15% 20%, rgba(37,99,235,0.06), transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(220,38,38,0.04), transparent 45%),
        linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
}
.hero-grid {
    background-image:
        linear-gradient(rgba(10,10,10,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10,10,10,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* Grille fine de fond pour sections techniques */
.bp-grid {
    background-image:
        linear-gradient(rgba(10,10,10,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10,10,10,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Lignes de marges type planche A0 (en haut/bas de section) */
.tech-rule {
    height: 1px; width: 100%;
    background: var(--ink);
    position: relative;
}
.tech-rule::before, .tech-rule::after {
    content: ""; position: absolute;
    top: -3px; width: 1px; height: 7px;
    background: var(--ink);
}
.tech-rule::before { left: 0; }
.tech-rule::after  { right: 0; }

/* Cartouche en haut de page (style cartouche planche) */
.cartouche {
    border: 1px solid var(--ink);
    background: white;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.cartouche > div {
    padding: 0.75rem 1rem;
    border-right: 1px solid var(--ink);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
}
.cartouche > div:last-child { border-right: none; }
.cartouche .label { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.6rem; margin-bottom: 0.2rem; }
.cartouche .val { color: var(--ink); font-weight: 600; }

/* ===== Reveal au scroll ===== */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s ease; }
.reveal-in { opacity: 1 !important; transform: none !important; }

/* ===== Liens ===== */
.link-line {
    color: var(--ink);
    border-bottom: 1px solid currentColor;
    transition: opacity 0.2s;
}
.link-line:hover { opacity: 0.6; }

/* ===== Listes ===== */
.dash-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--ink);
    font-size: 0.95rem;
}
.dash-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.65rem;
    width: 0.8rem; height: 1px;
    background: var(--ink);
}

.tech-list li {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    padding: 0.75rem 0;
    border-top: 1px solid var(--line);
    align-items: baseline;
    font-size: 0.95rem;
}
.tech-list li:last-child { border-bottom: 1px solid var(--line); }
.tech-list li::before {
    content: counter(tech-counter, decimal-leading-zero);
    counter-increment: tech-counter;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: var(--muted);
}
.tech-list { counter-reset: tech-counter; padding: 0; list-style: none; }

/* ===== Badges ===== */
.badge-mini {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: white;
    border: 1px solid var(--ink);
    border-radius: 0;
    font-size: 0.7rem;
    font-family: "JetBrains Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink);
}
.badge-mini::before {
    content: "";
    width: 6px; height: 6px;
    background: var(--cad);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%,100% { opacity: 1; }
    50%     { opacity: 0.4; }
}

/* Tag technique (calque, ref...) */
.tag-tech {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border: 1px solid currentColor;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ===== Cotation (dimension lines) ===== */
.dim {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
}
.dim::before, .dim::after {
    content: ""; height: 1px; background: currentColor; flex: 1;
}

/* ===== Numéro section type "01 /" ===== */
.section-num {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== Marquee ===== */
.marquee {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}

/* ===== Inputs ===== */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
textarea, select {
    background: white;
    border: 0;
    border-bottom: 1px solid var(--line2);
    border-radius: 0;
    padding: 0.6rem 0;
    font-size: 0.95rem;
    color: var(--ink);
    width: 100%;
    transition: border-color 0.15s, background 0.15s;
    font-family: "Inter", sans-serif;
}
input[type="text"]::placeholder, input[type="email"]::placeholder,
input[type="tel"]::placeholder, input[type="number"]::placeholder,
textarea::placeholder {
    color: #a3a3a3;
    font-family: "Inter", sans-serif;
}
input[type="text"]:hover, input[type="email"]:hover, input[type="tel"]:hover,
input[type="number"]:hover, textarea:hover, select:hover {
    border-bottom-color: var(--muted);
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus,
input[type="number"]:focus, textarea:focus, select:focus {
    outline: none;
    border-bottom-color: var(--ink);
    border-bottom-width: 2px;
    padding-bottom: calc(0.6rem - 1px);
}
textarea {
    border: 1px solid var(--line2);
    padding: 0.7rem 0.9rem;
    resize: vertical;
    min-height: 120px;
}
textarea:focus {
    border: 1px solid var(--ink);
    padding: 0.7rem 0.9rem;
    border-bottom-width: 1px;
    padding-bottom: 0.7rem;
}
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%230a0a0a' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.2rem center;
    padding-right: 1.2rem;
    cursor: pointer;
}

/* Checkbox custom */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.1rem;
    height: 1.1rem;
    border: 1px solid var(--ink);
    background: white;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background 0.15s;
}
input[type="checkbox"]:checked {
    background: var(--ink);
}
input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 3px; top: 0;
    width: 4px; height: 8px;
    border-right: 1.5px solid white;
    border-bottom: 1.5px solid white;
    transform: rotate(45deg);
}

/* ===== Utilities ===== */
.text-muted { color: var(--muted); }
.text-cad   { color: var(--cad); }
.text-plan  { color: var(--plan); }
.bg-paper   { background: var(--paper); }
.border-line { border-color: var(--line); }
.border-line2 { border-color: var(--line2); }

button:focus-visible, a:focus-visible { outline: 2px solid var(--plan); outline-offset: 3px; }
