/* ============================================
   Amonip v2.1 - surcouche de design (chargée après style.css)
   Palette plus sobre « outil réseau », navigation compacte, IP mise en avant.
   ============================================ */
:root {
    --primary-color: #4f46e5;
    --secondary-color: #0ea5e9;
    --ink: #1e1b4b;
    --ink-2: #312e81;
    --accent: #22d3ee;
    --light-bg: #f5f7fb;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(30, 27, 75, 0.08);
    --shadow-lg: 0 16px 40px rgba(30, 27, 75, 0.14);
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
}

/* ---------- Navigation ---------- */
.navbar {
    background: var(--ink);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.25);
    padding: 0.65rem 0;
}

.nav-container { gap: 1rem; }
.nav-logo { font-size: 1.35rem; letter-spacing: -0.01em; }
.nav-logo i { color: var(--accent); font-size: 1.5rem; }
.nav-menu { gap: 0.25rem; }

.nav-item .nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.95rem;
}

.nav-item .nav-link:hover,
.nav-item .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item .nav-link.active::after { display: none; }

.nav-dropdown details { position: relative; }
.nav-dropdown summary { list-style: none; cursor: pointer; color: rgba(255, 255, 255, 0.9); }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-caret { font-size: 0.7rem !important; transition: transform 0.2s ease; }
.nav-dropdown details[open] .nav-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 260px;
    list-style: none;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    z-index: 1002;
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.nav-dropdown-menu a i { width: 1.1rem; color: var(--primary-color); text-align: center; }
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active { background: #eef2ff; }

/* Menu mobile dès 1100 px (avant : débordement horizontal entre 769 et 1200 px) */
@media (max-width: 1100px) {
    .nav-menu { display: none; }
    .nav-toggle { display: flex; }
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1001;
        background: var(--ink);
        padding: 0.75rem 1rem 1rem;
        gap: 0.25rem;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    }
    .nav-menu.active .nav-item { width: 100%; }
    .nav-menu.active .nav-link { display: flex; width: 100%; }
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.06);
        margin-top: 0.25rem;
    }
    .nav-dropdown-menu a { color: rgba(255, 255, 255, 0.92); }
    .nav-dropdown-menu a i { color: var(--accent); }
    .nav-dropdown-menu a:hover,
    .nav-dropdown-menu a.active { background: rgba(255, 255, 255, 0.12); }
}

@media (max-width: 1100px) {
    .language-switcher { margin-left: auto; }
}

.card-header { background: linear-gradient(135deg, var(--ink-2) 0%, var(--primary-color) 100%); }

/* ---------- Héros ---------- */
.hero {
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.25), transparent 45%),
        radial-gradient(circle at 90% 30%, rgba(79, 70, 229, 0.45), transparent 50%),
        linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
    padding: 3.5rem 1.25rem;
}

.hero--tool { padding: 2.75rem 1.25rem 3rem; }
.hero-content h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
.hero-content p { font-size: 1.1rem; max-width: 680px; }

.hero--ip { padding: 2.5rem 1.25rem 3.25rem; }
.hero--ip h1 { font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 600; opacity: 0.92; margin-bottom: 1.25rem; }

.ip-hero-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    backdrop-filter: blur(6px);
}

.ip-hero-kicker {
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.ip-badge {
    background: var(--accent);
    color: var(--ink);
    font-weight: 700;
    border-radius: 999px;
    padding: 0.05rem 0.55rem;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.ip-hero-value { margin: 0.5rem 0 0.25rem !important; max-width: none !important; }

.ip-hero-address {
    display: inline-block;
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: clamp(1.8rem, 6.5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.ip-hero-location { font-size: 1.05rem !important; opacity: 0.9; }
.ip-hero-location i { color: var(--accent); }

.ip-hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.25rem 0 1rem;
}

.ip-hero-note { font-size: 0.9rem !important; opacity: 0.75; }

.btn-light { background: #fff; color: var(--ink); border: none; }
.btn-light:hover { background: #e0f2fe; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); text-decoration: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* ---------- Boutons ---------- */
.btn { border-radius: 10px; display: inline-flex; align-items: center; gap: 0.45rem; }
.btn-primary { background: var(--primary-color); }

/* ---------- Vérification rapide ---------- */
.quick-check { margin-top: -2rem; position: relative; z-index: 2; }
.quick-check-card { box-shadow: var(--shadow-lg); border-radius: var(--radius); }
.quick-check-form { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 0.75rem; }
.quick-check-form .search-input { width: 100%; font-size: 1.1rem; }
.quick-check-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.muted { color: var(--text-secondary); }
.small { font-size: 0.875rem; }

/* ---------- Cartes d'outils ---------- */
.service-card--link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border: 1px solid var(--border-color);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.service-card--link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
.service-card-cta { margin-top: auto; color: var(--primary-color); font-weight: 600; }
.badge-new {
    font-size: 0.65rem;
    background: #dcfce7;
    color: #166534;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    vertical-align: middle;
    letter-spacing: 0.04em;
}

.why-section h2 { text-align: center; margin-bottom: 1.5rem; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.why-item {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}
.why-item i { font-size: 1.6rem; color: var(--primary-color); margin-bottom: 0.5rem; }
.why-item h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }

/* ---------- Résultats : note, suggestions, listes ---------- */
.result-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.grade-panel {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    border-radius: var(--radius);
    background: #f8fafc;
    border: 1px solid var(--border-color);
    margin: 1rem 0;
}

.grade-badge {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    flex: 0 0 auto;
}

.grade-panel--a .grade-badge { background: #16a34a; }
.grade-panel--b .grade-badge { background: #65a30d; }
.grade-panel--c .grade-badge { background: #ca8a04; }
.grade-panel--d .grade-badge { background: #ea580c; }
.grade-panel--e .grade-badge,
.grade-panel--f .grade-badge { background: #dc2626; }

.suggestion-block { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 1.25rem; }
.code-suggestion { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 0.75rem; align-items: center; margin-top: 0.85rem; }
.code-suggestion-label { grid-column: 1 / -1; font-weight: 600; font-size: 0.9rem; }
.code-suggestion code,
.record-value {
    display: block;
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    font-size: 0.875rem;
    overflow-wrap: anywhere;
}

.record-value { margin: 0.4rem 0; }

.mail-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.mail-sections .content-block { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.1rem; margin: 0; }
.plain-list,
.check-list,
.tag-list { list-style: none; padding: 0; margin: 0.4rem 0; }
.plain-list li { padding: 0.25rem 0; overflow-wrap: anywhere; }
.check-list li { padding: 0.3rem 0; }
.check-list .is-on i { color: #16a34a; }
.check-list .is-off i { color: #94a3b8; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-list li { background: #eef2ff; color: var(--ink-2); padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.85rem; }

.search-box--stacked { flex-direction: column; align-items: stretch; }
.search-row { display: flex; gap: 0.75rem; }
.search-row .search-input { flex: 1; }
.advanced-options { margin-top: 0.5rem; }
.advanced-options summary { cursor: pointer; color: var(--primary-color); font-weight: 500; margin-bottom: 0.5rem; }
.advanced-options .search-input { width: 100%; }

@media (max-width: 640px) {
    .search-row { flex-direction: column; }
    .grade-panel { flex-direction: column; text-align: center; }
    .quick-check { margin-top: -1.25rem; }
}

/* ---------- Pied de page ---------- */
.footer--v2 { background: var(--ink); color: rgba(255, 255, 255, 0.8); padding: 2.5rem 0 1rem; text-align: left; }
.footer--v2 a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 2fr; gap: 2rem; }
.footer-logo { font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.footer-logo i { color: var(--accent); }
.footer-about p { margin-top: 0.5rem; max-width: 360px; }
.footer-title { font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.footer-tools ul { list-style: none; padding: 0; columns: 2; column-gap: 2rem; }
.footer-tools li { padding: 0.2rem 0; break-inside: avoid; }
.footer-tools a { text-decoration: none; opacity: 0.85; }
.footer-tools a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 1.5rem; padding-top: 1rem; font-size: 0.875rem; }

@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, 20px);
    background: var(--ink);
    color: #fff;
    padding: 0.7rem 1.1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2000;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Annonces : pas de cadre vide ---------- */
.ad-slot { margin: 1.5rem 0; text-align: center; }
.ad-slot-label { display: block; font-size: 0.7rem; text-transform: uppercase; color: var(--text-secondary); letter-spacing: 0.08em; margin-bottom: 0.25rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
