/* Variables CSS - Palette Sombre & Bandes Violettes */
:root {
    /* Nuances de fond (du noir pur au violet sombre) */
    --noir-pur: #0a0612;          /* Fond principal du site */
    --violet-nuit: #120924;       /* Bande 1 : noir teinté de violet très discret */
    --violet-sombre: #1c0e38;     /* Bande 2 : violet foncé pour contraster */
    --violet-accent: #2d1454;     /* Bande 3 : violet plus soutenu */
    --violet-pale: #3b1c6e;       /* Remplace l'ancien fond violet clair (reste lisible en dark) */

    /* Teintes d'accentuation et de bordures */
    --violet-tech: #8b5cf6;       /* Violet vif pour boutons, liens et bordures */
    --violet-tech-hover: #a78bfa;
    --vert-olive: #10b981;
    --trait: #2d2244;             /* Filets et séparateurs sombres */
    
    /* Typographie & Textes */
    --texte-titres: #f9fafb;      /* Blanc pur pour titres */
    --texte-corps: #d1d5db;       /* Gris très clair pour le confort de lecture */
    --texte-muted: #9ca3af;       /* Gris moyen pour dates/mentions */
    
    --font-main: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font-main); color: var(--texte-corps); background-color: var(--noir-pur); line-height: 1.65; font-size: 18px; display: flex; flex-direction: column; min-height: 100vh; }

main { flex: 1; }

h1, h2, h3, h4 { color: var(--texte-titres); font-weight: 600; line-height: 1.2; margin-bottom: 16px; }
h1 { font-size: 52px; letter-spacing: -0.02em; }
h2 { font-size: 34px; }
h3 { font-size: 22px; }
p { max-width: 68ch; margin-bottom: 24px; color: var(--texte-corps); }
a { text-decoration: none; color: var(--violet-tech); transition: color 0.2s; }
a:hover { color: var(--violet-tech-hover); }

.mono { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--violet-tech); }

/* Layout & Bandes de sections de différentes teintes */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }

.bg-noir { background-color: var(--noir-pur); }
.bg-violet-nuit { background-color: var(--violet-nuit); }
.bg-violet-sombre { background-color: var(--violet-sombre); }
.bg-violet-accent { background-color: var(--violet-accent); }
.bg-violet-pale { background-color: var(--violet-pale); }

/* Rétro-compatibilité avec tes classes existantes */
.bg-lin { background-color: var(--violet-nuit); }
.bg-ardoise { background-color: var(--noir-pur); }

/* Boutons */
.btn { display: inline-block; padding: 7px 10px; border-radius: 4px; font-family: var(--font-mono); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; border: 1.5px solid transparent; transition: all 0.2s; }
.btn-primary { background-color: var(--violet-tech); color: #ffffff; }
.btn-primary:hover { background-color: var(--violet-tech-hover); color: #ffffff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35); }

/* Header / Menu */
header { border-bottom: 1px solid var(--trait); padding: 20px 0; background-color: rgba(10, 6, 18, 0.95); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; justify-content: space-between; align-items: center; position: relative; }
.logo-img { height: 70px; vertical-align: middle; }
.nav-links { display: flex; align-items: center; }
.nav-links a { color: var(--texte-corps); margin: 0 16px; font-size: 16px; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--violet-tech); }
.nav-contact { display: flex; align-items: center; gap: 24px; }

/* Menu mobile hamburger */
.nav-toggle-input { display: none; }
.nav-toggle-btn { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; cursor: pointer; background: none; border: none; }
.nav-toggle-btn span { display: block; width: 24px; height: 2px; background-color: var(--texte-titres); border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }

.nav-inner:has(.nav-toggle-input:checked) .nav-toggle-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-inner:has(.nav-toggle-input:checked) .nav-toggle-btn span:nth-child(2) { opacity: 0; }
.nav-inner:has(.nav-toggle-input:checked) .nav-toggle-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Grilles */
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.grid-3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.story-grid { grid-template-columns: 340px 1fr; }

/* Liste structurée (Prestations) */
.tech-list-item { border-left: 3px solid var(--violet-tech); padding-left: 20px; margin-bottom: 32px; }
.tech-list-item h4 { margin-bottom: 8px; font-size: 20px; color: var(--texte-titres); }
.tech-list-item p { margin-bottom: 0; }

/* Bandeau réassurance */
.reassurance-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; padding: 32px; background-color: var(--violet-nuit); border: 1px solid var(--trait); border-radius: 4px; text-align: center; }

/* FAQ */
.faq-item { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--trait); }
.faq-item h4 { font-size: 18px; color: var(--texte-titres); }

/* Footer */
footer { background-color: var(--noir-pur); border-top: 1px solid var(--trait); color: var(--texte-muted); padding: 48px 0 24px; text-align: center; }
footer .container { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
footer a { color: var(--texte-muted); text-decoration: underline; }
footer a:hover { color: var(--texte-titres); }
footer .footer-links { margin-bottom: 12px; font-size: 14px; }
footer .footer-links a { margin: 0 10px; }

/* Images */
.image-container { position: relative; display: inline-block; }
.image-container img { display: block; width: 100%; height: auto; border-radius: 8px; }
.image-container .ia { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; color: #fff; font-size: 10px; white-space: nowrap; }

/* Responsive Mobile */
@media (max-width: 768px) {
    h1 { font-size: 34px; }
    h2 { font-size: 26px; }
    .section { padding: 56px 0; }
    .grid-2col, .grid-3col, .story-grid { grid-template-columns: 1fr; gap: 32px; }

    header { padding: 14px 0; }
    .logo-img { height: 38px; }
    .logo span { font-size: 17px !important; margin-left: 6px !important; }

    .nav-contact { gap: 12px; }
    .btn { padding: 6px 10px; font-size: 11px; white-space: nowrap; }

    .nav-toggle-btn { display: flex; width: 32px; height: 32px; gap: 4px; }
    .nav-toggle-btn span { width: 20px; }

    .nav-links { display: none; position: absolute; top: calc(100% + 14px); left: 0; right: 0; background-color: var(--noir-pur); flex-direction: column; align-items: flex-start; padding: 8px 24px 20px; border-bottom: 1px solid var(--trait); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.7); }
    .nav-inner:has(.nav-toggle-input:checked) .nav-links { display: flex; }
    .nav-links a { margin: 0; padding: 14px 0; width: 100%; border-bottom: 1px solid var(--trait); font-size: 17px; }
    .nav-links a:last-child { border-bottom: none; letter-spacing: 4px; line-height: 1;    }
    /* 1. Neutraliser la hauteur fixe et le masquage des liens */
    .nav-links a:not(.no-anim):not(.btn) { height: auto !important; overflow: visible !important; display: block !important; line-height: 1 !important; }

    /* 2. Remettre le cylindre à plat (aucun déplacement) */
    .nav-links a .char-cylinder { height: auto !important; transform: none !important; transition: none !important; display: inline !important; }

    /* 3. Masquer la 2ème lettre (la version basse violette) */
    .nav-links a .char-cylinder .char-bottom { display: none !important; }

    /* 4. Afficher la 1ère lettre normalement en texte brut */
    .nav-links a .char-cylinder .char-top { display: inline !important; height: auto !important; line-height: inherit !important; color: inherit !important; }

    /* 5. Comportement de survol/toucher standard en responsive */
    .nav-links a:hover,
    .nav-links a.active { color: var(--violet-tech) !important; }
    .login-card { padding: 16px 14px !important; }
    .login-wrapper { padding: 30px 10px !important; }

}
/* Conteneur du lien */
.nav-links a { display: inline-flex; margin: 0 14px; font-size: 16px; font-weight: 500; line-height: 1.2; overflow: hidden; /* Masque les lettres qui sortent du cadre */ height: 1.2em;   /* Verrouille la hauteur sur une seule ligne */ }

/* Chaque colonne de lettre */
.nav-links a .char-cylinder { display: inline-flex; flex-direction: column; height: 100%; transform: translateY(0); transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1); }

/* Lettre 1 : visible par défaut */
.nav-links a .char-cylinder .char-top { display: block; color: var(--texte-corps); height: 1.2em; line-height: 1.2em; }

/* Lettre 2 : cachée en bas */
.nav-links a .char-cylinder .char-bottom { display: block; color: var(--violet-tech); height: 1.2em; line-height: 1.2em; }

/* Déclenchement au survol : la colonne monte d'une hauteur complète */
.nav-links a:hover .char-cylinder { transform: translateY(-1.2em); }

/* Cas de l'onglet actif : la lettre violette reste en haut */
.nav-links a.active .char-cylinder { transform: translateY(-1.2em); }

/* ==========================================================================
   PAGE LOGIN — STYLE CYBER / DARK GLASS
   ========================================================================== */

.login-wrapper { min-height: calc(100vh - 160px); display: flex; align-items: center; justify-content: center; padding: 60px 20px; background: radial-gradient(circle at center, #140c26 0%, #06030b 100%); }

/* Cadre avec les coins décoratifs */
.login-corners-box { position: relative; padding: 16px; max-width: 480px; width: 100%; }

.corner { position: absolute; width: 18px; height: 18px; border-color: rgba(255, 255, 255, 0.2); border-style: solid; }
.corner.top-left { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.corner.top-right { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.corner.bottom-left { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }
.corner.bottom-right { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }

/* Carte sombre */
.login-card { background: linear-gradient(180deg, rgba(28, 33, 34, 0.92) 0%, rgba(18, 22, 23, 0.95) 100%); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 4px; padding: 44px 38px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); }

/* En-tête Connexion avec tiret vert */
.login-header { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.accent-line { display: inline-block; width: 32px; height: 2px; background-color: var(--violet-tech); }
.surtitle-neon { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.15em; font-weight: 600; color: var(--violet-tech); }

/* Champs avec bordure inférieure uniquement */
.input-line-group { margin-bottom: 30px; }
.mono-label { display: block; font-family: var(--font-mono); font-size: 11px; color: #8c9ba5; letter-spacing: 0.12em; margin-bottom: 8px; }
.input-with-icon { display: flex; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.18); padding: 6px 0 10px; transition: border-color 0.2s ease; }
.input-with-icon:focus-within { border-bottom-color: #00e575; }
.field-icon { color: #7b8893; margin-right: 12px; flex-shrink: 0; }
.input-with-icon input { width: 100%; background: transparent; border: none; outline: none; color: #f1f5f9; font-size: 15px; font-family: var(--font-main); }
.input-with-icon input::placeholder { color: #55626d; }
.toggle-password { background: transparent; border: none; color: #7b8893; cursor: pointer; padding: 4px; display: flex; align-items: center; }
.toggle-password:hover { color: #f1f5f9; }
/* Lien mot de passe oublié */
.login-options { margin: -10px 0 32px; }

.forgot-link { font-size: 13px; color: #94a3b8; transition: color 0.2s; }
.forgot-link:hover { color: #00e575; }

/* Bouton principal Connexion */
.btn-login-neon { width: 100%; background: var(--violet-nuit); border: 1px solid var(--violet-sombre); color: var(--violet-tech); font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; padding: 14px; border-radius: 3px; cursor: pointer; transition: all 0.25s ease; }

.btn-login-neon:hover { background: var(--violet-sombre); border-color: var(--violet-tech); box-shadow: 0 0 20px rgba(147, 112, 219, 0.2); transform: translateY(-1px); }

/* Pied de formulaire */
.login-footer-links { margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); text-align: center; }

.back-home { font-size: 13px; color: #94a3b8; transition: color 0.2s; }
.back-home:hover { color: #f1f5f9; }

@keyframes glitch-shake {
    0%, 91%, 100%  { transform: translate(0); }
    92% { transform: translate(-4px,  1px); }
    93% { transform: translate( 5px, -1px); }
    94% { transform: translate(-3px,  2px); }
    95% { transform: translate( 4px, -2px); }
    96% { transform: translate(-2px,  1px); }
    97% { transform: translate(0); }
}

@keyframes glitch-chroma {
    0%, 85%, 100%  { text-shadow: none; }
    86% { text-shadow:  6px 0 #ff06b5, -6px 0 #00ffe7; }
    87% { text-shadow: none; }
    88% { text-shadow: -7px 0 #ff06b5,  5px 0 #00ffe7, 2px 0 #f0c040; }
    88.5% { text-shadow: none; }
    89% { text-shadow:  5px 0 #00ffe7, -4px 0 #ff06b5, 0 0 10px #ff06b5; }
    89.5% { text-shadow: none; }
    90% { text-shadow: -3px 0 #ff06b5, 3px 0 #00ffe7; }
    90.5% { text-shadow: none; }
}

@keyframes glitch-blink {
    0%, 78%, 100%  { opacity: 1; }
    79% { opacity: 0.4; }
    79.5% { opacity: 1; }
    80% { opacity: 0.7; }
    80.3% { opacity: 1; }
    81% { opacity: 0.5; }
    81.4% { opacity: 1; }
}

footer p, .animation {
    animation: glitch-chroma 2.3s infinite, glitch-blink 0.8s infinite;
    animation-duration: 2.3s, 0.8s;
    animation-timing-function: ease, ease;
    animation-delay: 0s, 0s;
    animation-iteration-count: infinite, infinite;
    animation-direction: normal, normal;
    animation-fill-mode: none, none;
    animation-play-state: running, running;
    animation-name: glitch-chroma, glitch-blink;
    animation-timeline: auto;
    animation-range-start: normal;
    animation-range-end: normal;
}