/* ============================================
   DICO-CONJUGAISON.COM - Design System
   Hybride : Chromatic + Cormorant Garamond + Seyes
   ============================================ */

/* --- Custom Properties --- */
:root {
    --dc-bg: #fafaf7;
    --dc-surface: #ffffff;
    --dc-text: #1c1c1a;
    --dc-muted: #78776e;
    --dc-light: #a8a79e;
    --dc-border: #e4e3dc;
    --dc-hover: #f2f1ec;
    --dc-radius: 10px;
    --dc-radius-lg: 14px;
    --dc-radius-pill: 40px;

    /* Couleurs par mode */
    --c-indicatif: #2558b8;
    --c-indicatif-bg: #eef4fd;
    --c-indicatif-line: #c4d8f4;
    --c-subjonctif: #6d35c7;
    --c-subjonctif-bg: #f3effe;
    --c-subjonctif-line: #d1c0f0;
    --c-conditionnel: #b5700a;
    --c-conditionnel-bg: #fef8ec;
    --c-conditionnel-line: #edd9a8;
    --c-imperatif: #be2e2e;
    --c-imperatif-bg: #fdf1f1;
    --c-imperatif-line: #f0c4c4;
    --c-participe: #18845a;
    --c-participe-bg: #eef9f3;
    --c-participe-line: #b0dfc8;

    /* Seyes */
    --seyes-line: rgba(155, 185, 225, 0.18);
    --seyes-margin: rgba(210, 140, 155, 0.22);
    --seyes-h: 28px;

    /* Fonts */
    --f-display: 'Cormorant Garamond', 'Georgia', serif;
    --f-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
    font-family: var(--f-body);
    color: var(--dc-text);
    background: var(--dc-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: var(--c-indicatif); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* --- Header --- */
.dc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--dc-surface);
    border-bottom: 1px solid var(--dc-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.dc-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.dc-brand:hover { text-decoration: none; }
.dc-logo {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--c-indicatif);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-family: var(--f-display);
    font-size: 16px; font-weight: 600;
}
.dc-sitename {
    font-family: var(--f-display);
    font-size: 22px; font-weight: 600;
    color: var(--dc-text);
    letter-spacing: 0.3px;
}
.dc-nav { display: flex; gap: 20px; }
.dc-nav a {
    font-size: 13px; font-weight: 500;
    color: var(--dc-muted);
    letter-spacing: 0.2px;
    transition: color 0.15s;
}
.dc-nav a:hover { color: var(--dc-text); text-decoration: none; }

/* Burger mobile */
.dc-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.dc-burger svg { width: 24px; height: 24px; stroke: var(--dc-text); }

/* --- Search --- */
.dc-search-wrap { padding: 28px 24px 12px; text-align: center; }
.dc-searchbox {
    display: inline-flex;
    align-items: center;
    background: var(--dc-surface);
    border: 1.5px solid var(--dc-border);
    border-radius: var(--dc-radius-pill);
    padding: 4px 5px 4px 22px;
    width: 100%; max-width: 520px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.dc-searchbox:focus-within {
    border-color: var(--c-indicatif);
    box-shadow: 0 0 0 3px rgba(37, 88, 184, 0.1);
}
.dc-searchbox input {
    flex: 1; border: none; outline: none;
    font-family: var(--f-display);
    font-size: 20px; color: var(--dc-text);
    background: transparent; letter-spacing: 0.3px;
    min-width: 0;
}
.dc-searchbox input::placeholder { color: var(--dc-light); font-style: italic; }
.dc-searchbox button {
    padding: 9px 22px;
    background: var(--c-indicatif); color: white;
    border: none; border-radius: 30px;
    font-family: var(--f-body);
    font-size: 13px; font-weight: 500;
    cursor: pointer; letter-spacing: 0.3px;
    transition: background 0.15s;
    white-space: nowrap;
}
.dc-searchbox button:hover { background: #1e4a9e; }

/* --- Hero verbe --- */
.dc-hero { text-align: center; padding: 10px 24px 20px; }
.dc-hero h1 {
    font-family: var(--f-display);
    font-size: 52px; font-weight: 400;
    letter-spacing: 1px; line-height: 1.1;
}
.dc-hero h1 .rad { color: var(--dc-text); }
.dc-hero h1 .inf { font-weight: 500; }
.dc-meta { display: flex; justify-content: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.dc-tag {
    font-family: var(--f-display);
    font-size: 13px; font-weight: 500;
    padding: 3px 14px; border-radius: 20px;
    border: 1px solid var(--dc-border);
    color: var(--dc-muted); background: var(--dc-surface);
}
.dc-tag b { color: var(--dc-text); font-weight: 600; }

/* --- Tabs modes --- */
.dc-tabs {
    display: flex; gap: 0;
    padding: 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.dc-tabs::-webkit-scrollbar { display: none; }
.dc-tab {
    font-family: var(--f-display);
    font-size: 15px; font-weight: 500;
    padding: 10px 18px;
    border: none; cursor: pointer;
    background: transparent; color: var(--dc-muted);
    border-bottom: 2.5px solid transparent;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    white-space: nowrap;
}
.dc-tab:hover { color: var(--dc-text); }
.dc-tab.active[data-mode="indicatif"]    { color: var(--c-indicatif); border-bottom-color: var(--c-indicatif); }
.dc-tab.active[data-mode="subjonctif"]   { color: var(--c-subjonctif); border-bottom-color: var(--c-subjonctif); }
.dc-tab.active[data-mode="conditionnel"] { color: var(--c-conditionnel); border-bottom-color: var(--c-conditionnel); }
.dc-tab.active[data-mode="imperatif"]    { color: var(--c-imperatif); border-bottom-color: var(--c-imperatif); }
.dc-tab.active[data-mode="participe"],
.dc-tab.active[data-mode="infinitif"]    { color: var(--c-participe); border-bottom-color: var(--c-participe); }
.dc-tabline { height: 1px; background: var(--dc-border); margin: 0 24px; }

/* --- Mode content panels --- */
.dc-mode-panel { display: none; }
.dc-mode-panel.active { display: block; }
.dc-body { padding: 24px; }

/* --- Section labels --- */
.dc-section-label {
    font-family: var(--f-display);
    font-size: 13px; color: var(--dc-light);
    text-transform: uppercase; letter-spacing: 1.5px;
    margin: 0 0 12px; padding-left: 4px;
}
.dc-section-label + .dc-section-label { margin-top: 28px; }

/* --- Grid de cartes --- */
.dc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

/* --- Carte de conjugaison --- */
.dc-card {
    background: var(--dc-surface);
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius);
    overflow: hidden;
}
.dc-card-top { height: 3px; }
.dc-card-inner {
    padding: 14px 16px 16px;
    position: relative;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent, transparent 27px,
        var(--seyes-line) 27px, var(--seyes-line) 28px
    );
    background-size: 100% var(--seyes-h);
    background-position: 0 42px;
}
.dc-card-inner::before {
    content: '';
    position: absolute;
    left: 38px; top: 0; bottom: 0;
    width: 1px;
    background: var(--seyes-margin);
}
.dc-card h4 {
    font-family: var(--f-display);
    font-size: 15px; font-weight: 600;
    margin-bottom: 10px; letter-spacing: 0.5px;
    text-transform: uppercase;
    padding-left: 28px;
}
.dc-card ul { list-style: none; }
.dc-card li {
    font-family: var(--f-display);
    font-size: 16px; line-height: var(--seyes-h);
    display: flex; align-items: baseline;
    padding-left: 28px;
}
.dc-card .pr {
    color: var(--dc-light);
    font-size: 14px; min-width: 52px;
    font-style: italic;
}
.dc-card .rd { color: var(--dc-text); font-weight: 500; }
.dc-card .tm { font-weight: 700; letter-spacing: 0.2px; }

/* Cartes temps composes */
.dc-card.composed .rd { color: var(--dc-muted); font-weight: 400; margin-right: 0.3em; }
.dc-card.composed .tm { font-weight: 600; }

/* Couleurs par mode */
.mode-indicatif .dc-card-top { background: var(--c-indicatif); }
.mode-indicatif .dc-card h4 { color: var(--c-indicatif); }
.mode-indicatif .dc-card .tm { color: var(--c-indicatif); }

.mode-subjonctif .dc-card-top { background: var(--c-subjonctif); }
.mode-subjonctif .dc-card h4 { color: var(--c-subjonctif); }
.mode-subjonctif .dc-card .tm { color: var(--c-subjonctif); }

.mode-conditionnel .dc-card-top { background: var(--c-conditionnel); }
.mode-conditionnel .dc-card h4 { color: var(--c-conditionnel); }
.mode-conditionnel .dc-card .tm { color: var(--c-conditionnel); }

.mode-imperatif .dc-card-top { background: var(--c-imperatif); }
.mode-imperatif .dc-card h4 { color: var(--c-imperatif); }
.mode-imperatif .dc-card .tm { color: var(--c-imperatif); }

.mode-participe .dc-card-top,
.mode-infinitif .dc-card-top { background: var(--c-participe); }
.mode-participe .dc-card h4,
.mode-infinitif .dc-card h4 { color: var(--c-participe); }
.mode-participe .dc-card .tm,
.mode-infinitif .dc-card .tm { color: var(--c-participe); }

/* Forme recherchee surlignee */
.dc-card .searched { background: rgba(37, 88, 184, 0.12); border-radius: 3px; padding: 0 3px; }

/* Elision : j', que j', qu'il -> pronom colle au verbe */
.dc-card li.elided .pr { min-width: 0; margin-right: 0; padding-right: 0; }

/* --- Autocomplete dropdown --- */
.dc-ac {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    margin-top: 6px;
    background: var(--dc-surface);
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    z-index: 50;
    overflow: hidden;
}
.dc-ac-item {
    padding: 10px 20px;
    font-family: var(--f-display);
    font-size: 17px;
    color: var(--dc-text);
    cursor: pointer;
    transition: background 0.1s;
}
.dc-ac-item:hover, .dc-ac-item.active {
    background: var(--dc-hover);
}

/* --- Footer --- */
.dc-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--dc-border);
    text-align: center;
}
.dc-footer-legend {
    display: flex; gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.dc-footer-legend span {
    font-size: 11px; color: var(--dc-muted);
    display: flex; align-items: center; gap: 5px;
    font-weight: 500;
}
.dc-swatch { width: 8px; height: 8px; border-radius: 2px; }
.dc-footer-copy {
    font-size: 12px; color: var(--dc-light);
    margin-top: 8px;
}
.dc-footer-copy a { color: var(--dc-muted); }

/* --- Page verbes (index alphabetique) --- */
.dc-alpha-nav {
    display: flex; gap: 6px; flex-wrap: wrap;
    justify-content: center;
    padding: 16px 24px;
}
.dc-alpha-nav a {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid var(--dc-border);
    font-family: var(--f-display);
    font-size: 16px; font-weight: 600;
    color: var(--dc-muted); background: var(--dc-surface);
    transition: all 0.15s;
}
.dc-alpha-nav a:hover, .dc-alpha-nav a.active {
    background: var(--c-indicatif); color: white;
    border-color: var(--c-indicatif); text-decoration: none;
}
.dc-verbs-section { padding: 8px 24px 24px; }
.dc-verbs-section h2 {
    font-family: var(--f-display);
    font-size: 28px; font-weight: 500;
    color: var(--c-indicatif);
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--c-indicatif-line);
}
.dc-verbs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 6px 12px;
}
.dc-verbs-grid a {
    font-family: var(--f-display);
    font-size: 16px; color: var(--dc-text);
    padding: 4px 8px; border-radius: 6px;
    transition: background 0.1s;
}
.dc-verbs-grid a:hover { background: var(--dc-hover); text-decoration: none; }

/* --- Breadcrumb --- */
.dc-breadcrumb {
    padding: 10px 24px 0;
    font-size: 13px; color: var(--dc-light);
}
.dc-breadcrumb a { color: var(--dc-muted); }
.dc-breadcrumb span { margin: 0 6px; }

/* --- Page accueil --- */
.dc-home-hero {
    text-align: center;
    padding: 40px 24px 24px;
}
.dc-home-hero h1 {
    font-family: var(--f-display);
    font-size: 38px; font-weight: 500;
    color: var(--dc-text);
    margin-bottom: 8px;
}
.dc-home-hero p {
    font-size: 16px; color: var(--dc-muted);
    max-width: 480px; margin: 0 auto;
}
.dc-home-popular {
    padding: 0 24px 32px;
    max-width: 800px; margin: 0 auto;
}
.dc-home-popular h2 {
    font-family: var(--f-display);
    font-size: 18px; font-weight: 600;
    color: var(--dc-text);
    margin-bottom: 12px;
    text-align: center;
}
.dc-popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.dc-popular-grid a {
    display: block; text-align: center;
    font-family: var(--f-display);
    font-size: 17px; font-weight: 500;
    color: var(--dc-text);
    padding: 10px 8px;
    background: var(--dc-surface);
    border: 1px solid var(--dc-border);
    border-radius: 8px;
    transition: all 0.15s;
}
.dc-popular-grid a:hover {
    border-color: var(--c-indicatif);
    color: var(--c-indicatif);
    text-decoration: none;
}

/* --- Erreur 404 --- */
.dc-error { text-align: center; padding: 60px 24px; }
.dc-error h1 {
    font-family: var(--f-display);
    font-size: 36px; color: var(--dc-text);
    margin-bottom: 12px;
}
.dc-error p { color: var(--dc-muted); margin-bottom: 24px; }

/* --- Page liens (annuaire reseau) --- */
.dc-liens-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px; margin: 0 0 28px;
}
.dc-liens-stat {
    text-align: center; padding: 14px 8px;
    background: var(--dc-surface); border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius);
}
.dc-liens-num {
    display: block; font-family: var(--f-display);
    font-size: 28px; font-weight: 600; color: var(--c-indicatif);
}
.dc-liens-label {
    font-size: 12px; color: var(--dc-muted); letter-spacing: 0.3px;
}
.dc-liens-h2 {
    font-family: var(--f-display);
    font-size: 22px; font-weight: 600;
    margin: 32px 0 8px; padding-bottom: 6px;
    border-bottom: 2px solid var(--dc-border);
}
.dc-liens-h2 em { font-style: italic; }
.dc-liens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px; margin-bottom: 8px;
}
.dc-liens-grid-big { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.dc-liens-card {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 14px; background: var(--dc-surface);
    border: 1px solid var(--dc-border); border-radius: 8px;
    text-decoration: none; transition: border-color 0.15s;
}
.dc-liens-card:hover { border-color: var(--c-indicatif); text-decoration: none; }
.dc-liens-card.current { border-color: var(--c-indicatif); border-width: 2px; }
.dc-liens-card strong {
    font-family: var(--f-display); font-size: 15px;
    font-weight: 600; color: var(--dc-text);
}
.dc-liens-card em {
    font-style: normal; font-size: 12px; color: var(--dc-light);
}
.dc-liens-card-big {
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 18px; background: var(--dc-surface);
    border: 1px solid var(--dc-border); border-radius: var(--dc-radius);
    text-decoration: none; transition: border-color 0.15s;
}
.dc-liens-card-big:hover { border-color: var(--c-indicatif); text-decoration: none; }
.dc-liens-card-big strong {
    font-family: var(--f-display); font-size: 18px;
    font-weight: 600; color: var(--dc-text);
}
.dc-liens-card-big span { font-size: 14px; color: var(--dc-muted); }
.dc-liens-card-big em {
    font-style: normal; font-size: 12px; color: var(--dc-light); margin-top: 2px;
}
@media (max-width: 480px) {
    .dc-liens-stats { grid-template-columns: repeat(2, 1fr); }
    .dc-liens-grid-big { grid-template-columns: 1fr; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .dc-nav { display: none; }
    .dc-nav.open {
        display: flex; flex-direction: column;
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--dc-surface);
        border-bottom: 1px solid var(--dc-border);
        padding: 12px 24px 16px;
        gap: 12px; z-index: 99;
    }
    .dc-burger { display: block; }
    .dc-hero h1 { font-size: 36px; }
    .dc-searchbox input { font-size: 17px; }
    .dc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .dc-card li { font-size: 15px; }
    .dc-card .pr { min-width: 42px; font-size: 13px; }
    .dc-tabs { padding: 0 16px; }
    .dc-tab { padding: 8px 14px; font-size: 14px; }
    .dc-body { padding: 16px; }
    .dc-verbs-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 480px) {
    .dc-grid { grid-template-columns: 1fr; }
    .dc-hero h1 { font-size: 30px; }
    .dc-home-hero h1 { font-size: 28px; }
    .dc-alpha-nav a { width: 32px; height: 32px; font-size: 14px; }
    .dc-popular-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
