/* ============================================================
   retraite.tn — Design System CSS
   Police : Sora (titres) · Inter (corps)
   Palette : Vert #2C9B7F · Rouge #C0392B · Gris neutres
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --vert:        #2C9B7F;
    --vert-dark:   #1E7A63;
    --vert-mid:    #C2EBE2;
    --vert-light:  #E8F7F3;
    --rouge:       #C0392B;
    --rouge-dark:  #A93226;
    --rouge-light: #FDECEA;
    --or:          #E8A020;
    --or-light:    #FEF3CD;

    --gris-1:      #F8F9FA;
    --gris-2:      #F0F2F5;
    --gris-bord:   #E2E6EA;
    --gris-txt:    #6B7280;
    --gris-dark:   #374151;
    --noir:        #111827;
    --blanc:       #FFFFFF;

    --font:        'Sora', system-ui, sans-serif;
    --font-body:   'Inter', system-ui, sans-serif;

    --radius:      14px;
    --radius-sm:   8px;
    --radius-xs:   6px;
    --shadow:      0 2px 16px rgba(0,0,0,.07);
    --shadow-md:   0 4px 24px rgba(0,0,0,.09);
    --shadow-lg:   0 8px 40px rgba(0,0,0,.11);
    --tr:          .22s ease;

    --container:   1200px;
    --header-h:    68px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    background: var(--blanc);
    color: var(--noir);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--vert); text-decoration: none; transition: var(--tr); }
a:hover { color: var(--vert-dark); }
button { font-family: var(--font-body); cursor: pointer; }
input, select, textarea { font-family: var(--font-body); }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5 { font-family: var(--font); line-height: 1.2; }

/* ── Layout ────────────────────────────────────────────────── */
.container  { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1rem,5vw,3rem); }
.section    { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-lg { padding: 5rem 0; }

/* ── Header ────────────────────────────────────────────────── */
header {
    background: var(--blanc);
    border-bottom: 1px solid var(--gris-bord);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 0 var(--gris-bord);
}
.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1rem,5vw,3rem);
    display: flex;
    align-items: center;
    height: var(--header-h);
    gap: 2rem;
}
.logo {
    font-family: var(--font);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--noir);
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 1px;
    flex-shrink: 0;
}
.logo span  { color: var(--vert); }
.logo sub   { font-size: .65rem; font-weight: 600; color: var(--gris-txt); vertical-align: sub; margin-left: 1px; }

nav { display: flex; gap: .1rem; flex: 1; }
nav a {
    font-family: var(--font);
    font-size: .82rem;
    font-weight: 500;
    color: var(--noir);
    padding: .45rem .85rem;
    border-radius: var(--radius-xs);
    white-space: nowrap;
    transition: var(--tr);
}
nav a:hover  { color: var(--vert); background: var(--vert-light); }
nav a.actif  { color: var(--vert); border-bottom: 2px solid var(--vert); border-radius: 0; }

.header-actions { display: flex; align-items: center; gap: .75rem; }

.header-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    border: 1.5px solid var(--gris-bord);
    border-radius: 100px;
    padding: .4rem 1rem;
    font-size: .85rem;
    color: var(--gris-txt);
    min-width: 180px;
    cursor: text;
    transition: var(--tr);
}
.header-search:hover { border-color: var(--vert); }
.header-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: .85rem;
    color: var(--noir);
    width: 100%;
}
.header-search input::placeholder { color: var(--gris-txt); }

/* Badge notifications */
.notif-btn {
    position: relative;
    background: none;
    border: none;
    padding: .5rem;
    border-radius: 50%;
    color: var(--gris-dark);
    transition: var(--tr);
}
.notif-btn:hover { background: var(--gris-2); color: var(--vert); }
.notif-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--rouge);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Avatar mini */
.avatar-mini {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--vert-mid);
}

/* ── Boutons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    font-family: var(--font);
    font-weight: 700;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: var(--tr);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}
.btn svg { transition: transform .2s; flex-shrink: 0; }

.btn-sm  { font-size: .8rem;  padding: .5rem 1.1rem; }
.btn-md  { font-size: .9rem;  padding: .75rem 1.5rem; }
.btn-lg  { font-size: .95rem; padding: .9rem 1.75rem; }
.btn-xl  { font-size: 1rem;   padding: 1rem 2rem; }

.btn-primary {
    background: var(--rouge);
    color: var(--blanc);
}
.btn-primary:hover {
    background: var(--rouge-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(192,57,43,.28);
    color: var(--blanc);
}
.btn-primary:hover svg { transform: translateX(3px); }

.btn-vert {
    background: var(--vert);
    color: var(--blanc);
}
.btn-vert:hover {
    background: var(--vert-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(44,155,127,.28);
    color: var(--blanc);
}

.btn-outline {
    background: transparent;
    color: var(--vert);
    border: 1.5px solid var(--vert);
}
.btn-outline:hover { background: var(--vert-light); color: var(--vert-dark); }

.btn-ghost {
    background: transparent;
    color: var(--gris-dark);
    border: 1.5px solid var(--gris-bord);
}
.btn-ghost:hover { background: var(--gris-1); border-color: var(--gris-dark); color: var(--noir); }

.btn-danger { background: var(--rouge); color: var(--blanc); }
.btn-danger:hover { background: var(--rouge-dark); }

.btn-full   { width: 100%; }
.btn-loading { opacity: .7; pointer-events: none; }

/* ── Formulaires ────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.1rem; }
.form-row.col-1 { grid-template-columns: 1fr; }
.form-row.col-3 { grid-template-columns: 1fr 1fr 1fr; }

label {
    font-family: var(--font);
    font-size: .8rem;
    font-weight: 600;
    color: var(--noir);
}
label .req { color: var(--rouge); }
label .hint { font-weight: 400; color: var(--gris-txt); font-family: var(--font-body); }

input[type=text],
input[type=email],
input[type=password],
input[type=tel],
input[type=date],
input[type=number],
select,
textarea {
    width: 100%;
    border: 1.5px solid var(--gris-bord);
    border-radius: var(--radius-sm);
    padding: .65rem .9rem;
    font-family: var(--font-body);
    font-size: .88rem;
    color: var(--noir);
    background: var(--blanc);
    transition: var(--tr);
    appearance: none;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--vert);
    box-shadow: 0 0 0 3px rgba(44,155,127,.12);
}
textarea { resize: vertical; min-height: 120px; }

.form-hint  { font-size: .73rem; color: var(--gris-txt); margin-top: .25rem; }
.form-error { font-size: .73rem; color: var(--rouge); display: none; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--rouge); }
.has-error .form-error { display: block; }

/* Slider */
input[type=range] {
    width: 100%;
    height: 5px;
    appearance: none;
    background: var(--gris-bord);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    border: none;
    box-shadow: none;
    padding: 0;
}
input[type=range]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--vert);
    box-shadow: 0 0 0 3px rgba(44,155,127,.2);
    transition: var(--tr);
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    background: var(--blanc);
    border: 1px solid var(--gris-bord);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-body    { padding: 1.5rem; }
.card-header  { padding: 1rem 1.5rem; border-bottom: 1px solid var(--gris-bord); }
.card-footer  { padding: 1rem 1.5rem; border-top: 1px solid var(--gris-bord); background: var(--gris-1); }

.card-hover { transition: var(--tr); }
.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--vert-mid);
}

/* ── Badges & Pills ─────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .7rem;
    border-radius: 100px;
    font-size: .73rem;
    font-weight: 700;
    font-family: var(--font);
    white-space: nowrap;
}
.badge-vert    { background: var(--vert-light);  color: var(--vert-dark); }
.badge-rouge   { background: var(--rouge-light); color: var(--rouge); }
.badge-or      { background: var(--or-light);    color: #92610a; }
.badge-gris    { background: var(--gris-2);      color: var(--gris-dark); }
.badge-noir    { background: var(--noir);         color: var(--blanc); }

/* ── Flash messages ─────────────────────────────────────────── */
.flash {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    margin-bottom: 1.5rem;
}
.flash-success { background: var(--vert-light);  border: 1px solid var(--vert-mid); color: var(--vert-dark); }
.flash-error   { background: var(--rouge-light); border: 1px solid #FADADD;         color: var(--rouge); }
.flash-info    { background: #EFF6FF;            border: 1px solid #BFDBFE;         color: #1E40AF; }
.flash-warning { background: var(--or-light);   border: 1px solid #FCD34D;         color: #92610a; }

/* ── Section title pattern ──────────────────────────────────── */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--font);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--vert);
    margin-bottom: .75rem;
}
.section-label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--vert);
    border-radius: 50%;
}
.section-title {
    font-family: var(--font);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: .5rem;
}
.section-title span { color: var(--vert); }
.section-sub { font-size: .92rem; color: var(--gris-txt); line-height: 1.65; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
    max-width: var(--container);
    margin: 0 auto;
    padding: 4rem clamp(1rem,5vw,3rem) 3.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--font);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--vert);
    margin-bottom: 1rem;
}
.hero-tag::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--vert);
    border-radius: 50%;
}
.hero h1 {
    font-family: var(--font);
    font-size: clamp(2.1rem, 4vw, 2.9rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.03em;
    margin-bottom: 1rem;
}
.hero h1 span { color: var(--vert); }
.hero-sub {
    font-size: .95rem;
    color: var(--gris-txt);
    margin-bottom: 2rem;
    max-width: 420px;
    line-height: 1.7;
}
.hero-btns { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }

/* App preview mockup (hero droite) */
.app-preview {
    background: var(--blanc);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gris-bord);
    overflow: hidden;
    position: relative;
}
.app-bar {
    background: var(--gris-1);
    border-bottom: 1px solid var(--gris-bord);
    padding: .65rem 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.dot        { width: 11px; height: 11px; border-radius: 50%; }
.dot-r      { background: #FF5F57; }
.dot-y      { background: #FFBD2E; }
.dot-g      { background: #28CA41; }
.app-body   { padding: 1.5rem; }
.app-res-card {
    background: linear-gradient(135deg, var(--vert) 0%, var(--vert-dark) 100%);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: #fff;
    margin-bottom: .75rem;
}
.app-res-card p  { font-size: .75rem; opacity: .8; margin-bottom: .25rem; }
.app-res-card h3 { font-family: var(--font); font-size: 1.6rem; font-weight: 800; }
.app-res-card h3 small { font-size: .85rem; font-weight: 400; opacity: .7; }

/* Blobs décoratifs */
.blob { position: absolute; border-radius: 50%; filter: blur(40px); z-index: -1; pointer-events: none; }
.blob-1 { width: 200px; height: 200px; background: var(--vert-mid); opacity: .4; top: -40px; right: -40px; }
.blob-2 { width: 120px; height: 120px; background: #C2E0F0; opacity: .5; bottom: 20px; left: -20px; }

/* ── Presse logos ───────────────────────────────────────────── */
.presse { margin-top: 2.5rem; }
.presse-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gris-txt);
    margin-bottom: .75rem;
}
.presse-logos { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.presse-logo  {
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 800;
    color: #9CA3AF;
    transition: var(--tr);
}
.presse-logo:hover  { color: var(--noir); }
.presse-logo.serif  { font-family: Georgia, serif; font-style: italic; }

/* ── Simulateur layout ──────────────────────────────────────── */
.section-sim { background: var(--gris-1); border-top: 1px solid var(--gris-bord); padding: 3.5rem clamp(1rem,5vw,3rem); }
.sim-layout  { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }

.secteur-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--gris-bord); }
.secteur-tab {
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    cursor: pointer;
    border: none;
    background: var(--gris-1);
    font-family: var(--font-body);
    transition: var(--tr);
    border-bottom: 3px solid transparent;
}
.secteur-tab:first-child { border-right: 1px solid var(--gris-bord); }
.secteur-tab.actif       { background: var(--blanc); border-bottom-color: var(--vert); }
.secteur-tab-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    background: var(--gris-2);
    flex-shrink: 0;
    transition: var(--tr);
}
.secteur-tab.actif .secteur-tab-icon { background: var(--vert-light); }
.secteur-tab-name { font-family: var(--font); font-size: .88rem; font-weight: 700; color: var(--noir); }
.secteur-tab.actif .secteur-tab-name { color: var(--vert); }
.secteur-tab-sub  { font-size: .75rem; color: var(--gris-txt); }

.form-sep {
    font-family: var(--font);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--gris-txt);
    margin: 1.25rem 0 .9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.form-sep::after { content: ''; flex: 1; height: 1px; background: var(--gris-bord); }

.slider-row     { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.slider-label   { font-family: var(--font); font-size: .8rem; font-weight: 600; }
.slider-val     { font-family: var(--font); font-size: .9rem; font-weight: 800; color: var(--vert); }

/* Résultats simulateur */
.res-header {
    background: linear-gradient(135deg, var(--vert) 0%, var(--vert-dark) 100%);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 1.5rem;
    text-align: center;
    color: #fff;
}
.res-pension      { font-family: var(--font); font-size: 2.8rem; font-weight: 800; line-height: 1; }
.res-pension small{ font-size: 1rem; font-weight: 500; opacity: .7; }
.res-body         { background: var(--blanc); border: 1px solid var(--gris-bord); border-top: none; border-radius: 0 0 var(--radius) var(--radius); padding: 1.25rem; }
.res-row          { display: flex; justify-content: space-between; align-items: center; padding: .55rem .75rem; border-radius: 8px; font-size: .83rem; }
.res-row.normal   { background: var(--gris-1); }
.res-row.total    { background: var(--vert-light); font-weight: 700; }
.res-row.deduct   { background: #FFF8F7; }
.res-row-label    { color: var(--gris-txt); }
.res-row.total .res-row-label { color: var(--vert-dark); font-weight: 700; }
.res-row-val      { font-family: var(--font); font-weight: 700; color: var(--noir); font-size: .88rem; }
.res-row.total .res-row-val   { color: var(--vert); font-size: .95rem; }
.res-row.deduct .res-row-val  { color: var(--rouge); }

/* ── Articles grid ──────────────────────────────────────────── */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 1.5rem; }
.article-card  { display: flex; flex-direction: column; }
.article-img   { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.article-img-placeholder {
    width: 100%; aspect-ratio: 16/9;
    background: var(--gris-2);
    border-radius: var(--radius) var(--radius) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}
.article-body  { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.article-cat   { font-family: var(--font); font-size: .72rem; font-weight: 700; color: var(--vert); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.article-titre { font-family: var(--font); font-size: 1rem; font-weight: 700; color: var(--noir); margin-bottom: .5rem; line-height: 1.35; }
.article-titre a:hover { color: var(--vert); }
.article-accroche { font-size: .83rem; color: var(--gris-txt); line-height: 1.6; flex: 1; margin-bottom: 1rem; }
.article-meta  { display: flex; align-items: center; gap: .75rem; font-size: .75rem; color: var(--gris-txt); }

/* ── Forum ──────────────────────────────────────────────────── */
.forum-cat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--gris-bord);
    background: var(--blanc);
    transition: var(--tr);
    box-shadow: var(--shadow);
}
.forum-cat-card:hover { border-color: var(--vert-mid); box-shadow: var(--shadow-md); }
.forum-cat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--vert-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.forum-cat-name { font-family: var(--font); font-size: .95rem; font-weight: 700; }
.forum-cat-desc { font-size: .82rem; color: var(--gris-txt); margin-top: .2rem; }
.forum-cat-stats{ font-size: .75rem; color: var(--gris-txt); margin-top: .4rem; }

.sujet-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gris-bord);
    transition: var(--tr);
}
.sujet-row:hover { background: var(--gris-1); }
.sujet-row:last-child { border-bottom: none; }
.sujet-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--vert-mid); flex-shrink: 0; object-fit: cover; }
.sujet-titre  { font-family: var(--font); font-size: .9rem; font-weight: 700; color: var(--noir); }
.sujet-titre:hover { color: var(--vert); }
.sujet-meta   { font-size: .75rem; color: var(--gris-txt); margin-top: .25rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.sujet-epingle{ color: var(--or); font-size: .78rem; font-weight: 700; }

/* ── Annuaire ───────────────────────────────────────────────── */
.pro-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--gris-bord);
    background: var(--blanc);
    box-shadow: var(--shadow);
    transition: var(--tr);
    position: relative;
}
.pro-card:hover { box-shadow: var(--shadow-md); border-color: var(--vert-mid); }
.pro-card.premium-card { border-color: var(--or); }
.pro-logo {
    width: 60px; height: 60px;
    border-radius: 12px;
    border: 1px solid var(--gris-bord);
    object-fit: contain;
    flex-shrink: 0;
    background: var(--gris-1);
    padding: .25rem;
}
.pro-logo-placeholder {
    width: 60px; height: 60px;
    border-radius: 12px;
    background: var(--vert-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.pro-nom      { font-family: var(--font); font-size: .95rem; font-weight: 700; color: var(--noir); }
.pro-type     { font-size: .78rem; color: var(--vert); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pro-lieu     { font-size: .8rem; color: var(--gris-txt); display: flex; align-items: center; gap: .3rem; margin-top: .25rem; }
.pro-badge-premium { position: absolute; top: .75rem; right: .75rem; }
.stars { display: inline-flex; gap: 1px; color: var(--or); font-size: .85rem; }

/* ── Expatriés pays card ─────────────────────────────────────── */
.pays-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--gris-bord);
    background: var(--blanc);
    box-shadow: var(--shadow);
    transition: var(--tr);
}
.pays-card:hover { border-color: var(--vert-mid); box-shadow: var(--shadow-md); }
.pays-flag { font-size: 1.8rem; flex-shrink: 0; }
.pays-nom  { font-family: var(--font); font-size: .9rem; font-weight: 700; color: var(--noir); }
.pays-type { font-size: .75rem; color: var(--gris-txt); margin-top: .15rem; }

/* ── Glossaire ──────────────────────────────────────────────── */
.glossaire-lettre { font-family: var(--font); font-size: 1.4rem; font-weight: 800; color: var(--vert); padding: .5rem 0 .75rem; border-bottom: 2px solid var(--vert-mid); margin-bottom: .75rem; }
.glossaire-terme  { padding: .75rem 0; border-bottom: 1px solid var(--gris-bord); }
.glossaire-terme:last-child { border-bottom: none; }
.glossaire-mot    { font-family: var(--font); font-size: .95rem; font-weight: 700; color: var(--noir); }
.glossaire-mot a:hover { color: var(--vert); }
.glossaire-def    { font-size: .85rem; color: var(--gris-txt); margin-top: .2rem; line-height: 1.6; }

/* ── FAQ ────────────────────────────────────────────────────── */
.faq-item        { border: 1.5px solid var(--gris-bord); border-radius: var(--radius); overflow: hidden; transition: var(--tr); margin-bottom: .75rem; }
.faq-item:hover  { border-color: var(--vert); }
.faq-item.open   { border-color: var(--vert); }
.faq-q           { width: 100%; background: none; border: none; text-align: left; padding: 1.1rem 1.25rem; font-family: var(--font); font-size: .9rem; font-weight: 700; color: var(--noir); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-q:hover     { color: var(--vert); }
.faq-chev        { flex-shrink: 0; color: var(--vert); transition: transform .3s; }
.faq-item.open .faq-chev { transform: rotate(180deg); }
.faq-a           { font-size: .85rem; color: var(--gris-txt); line-height: 1.7; max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease; padding: 0 1.25rem; }
.faq-item.open .faq-a { max-height: 300px; padding: 0 1.25rem 1.1rem; }

/* ── Sidebar info-cards ─────────────────────────────────────── */
.info-card      { background: var(--blanc); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--gris-bord); }
.info-card-hd   { padding: .9rem 1.25rem; border-bottom: 1px solid var(--gris-bord); font-family: var(--font); font-size: .8rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.dot-vert       { width: 8px; height: 8px; background: var(--vert); border-radius: 50%; display: inline-block; flex-shrink: 0; }
.info-card-bd   { padding: 1.1rem 1.25rem; }
.info-item      { display: flex; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--gris-bord); font-size: .82rem; }
.info-item:last-child { border-bottom: none; padding-bottom: 0; }
.info-item-icon { font-size: .95rem; flex-shrink: 0; margin-top: .1rem; }
.info-item strong { display: block; font-family: var(--font); font-weight: 700; color: var(--noir); margin-bottom: .1rem; }
.info-item span   { color: var(--gris-txt); font-size: .78rem; }

/* CTA card vert (sidebar) */
.cta-card    { background: linear-gradient(135deg, var(--vert) 0%, var(--vert-dark) 100%); border-radius: var(--radius); padding: 1.5rem; text-align: center; color: #fff; }
.cta-card h3 { font-family: var(--font); font-size: 1rem; font-weight: 800; margin-bottom: .4rem; }
.cta-card p  { font-size: .8rem; opacity: .8; margin-bottom: 1rem; }
.btn-cta-w   { display: inline-block; background: var(--blanc); color: var(--vert-dark); font-family: var(--font); font-weight: 800; font-size: .82rem; padding: .65rem 1.5rem; border-radius: 100px; text-decoration: none; transition: var(--tr); }
.btn-cta-w:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(0,0,0,.15); color: var(--vert-dark); }

/* ── Stats chiffres clés ─────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 1.25rem; }
.stat-card  { text-align: center; padding: 1.5rem 1rem; border-radius: var(--radius); background: var(--blanc); border: 1px solid var(--gris-bord); box-shadow: var(--shadow); }
.stat-val   { font-family: var(--font); font-size: 2.2rem; font-weight: 800; color: var(--vert); line-height: 1; margin-bottom: .35rem; }
.stat-lbl   { font-size: .82rem; color: var(--gris-txt); }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--gris-txt); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--gris-txt); }
.breadcrumb a:hover { color: var(--vert); }
.breadcrumb-sep { color: var(--gris-bord); }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; justify-content: center; margin-top: 2.5rem; }
.page-link {
    min-width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-xs);
    border: 1.5px solid var(--gris-bord);
    font-size: .85rem; font-weight: 600;
    color: var(--gris-dark);
    transition: var(--tr);
    padding: 0 .6rem;
}
.page-link:hover    { border-color: var(--vert); color: var(--vert); background: var(--vert-light); }
.page-link.actif    { background: var(--vert); border-color: var(--vert); color: #fff; }
.page-link.disabled { opacity: .4; pointer-events: none; }

/* ── Tags ───────────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag  { font-size: .75rem; font-weight: 600; padding: .25rem .65rem; border-radius: 100px; background: var(--gris-2); color: var(--gris-dark); transition: var(--tr); }
.tag:hover { background: var(--vert-light); color: var(--vert-dark); }

/* ── Admin sidebar ──────────────────────────────────────────── */
.admin-layout       { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar      { background: var(--noir); padding: 1.5rem 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar-logo { padding: 0 1.5rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 1rem; }
.admin-nav-section  { padding: .25rem 1.5rem .1rem; font-size: .67rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.3); margin-top: .75rem; }
.admin-nav-link     { display: flex; align-items: center; gap: .65rem; padding: .6rem 1.5rem; font-size: .85rem; color: rgba(255,255,255,.65); transition: var(--tr); }
.admin-nav-link:hover  { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav-link.actif  { background: var(--vert); color: #fff; }
.admin-content      { padding: 2rem; background: var(--gris-1); }

/* ── Profil membre ──────────────────────────────────────────── */
.profil-header  { display: flex; align-items: center; gap: 1.5rem; padding: 2rem; border-radius: var(--radius); background: var(--blanc); border: 1px solid var(--gris-bord); box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.profil-avatar  { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--vert-mid); flex-shrink: 0; background: var(--vert-light); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.profil-nom     { font-family: var(--font); font-size: 1.3rem; font-weight: 800; }
.profil-meta    { font-size: .83rem; color: var(--gris-txt); margin-top: .25rem; display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── Spinner & loading ──────────────────────────────────────── */
.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: none;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-loading .spinner     { display: block; }
.btn-loading .btn-txt     { display: none; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
.anim-fade-up  { animation: fadeUp .35s ease; }
.anim-fade-in  { animation: fadeIn .3s ease; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
    background: var(--noir);
    color: rgba(255,255,255,.5);
    padding: 3rem clamp(1rem,5vw,3rem) 1.5rem;
    font-size: .85rem;
    line-height: 1.8;
}
.footer-inner   { max-width: var(--container); margin: 0 auto; }
.footer-grid    { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-logo    { font-family: var(--font); font-size: 1.4rem; font-weight: 800; color: var(--blanc); margin-bottom: .75rem; }
.footer-logo span { color: var(--vert); }
.footer-desc    { font-size: .83rem; line-height: 1.7; color: rgba(255,255,255,.45); max-width: 300px; }
.footer-title   { font-family: var(--font); font-size: .8rem; font-weight: 700; color: var(--blanc); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .9rem; }
.footer-links   { display: flex; flex-direction: column; gap: .4rem; }
.footer-links a { color: rgba(255,255,255,.5); font-size: .83rem; }
.footer-links a:hover { color: var(--vert); }
.footer-bottom  { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; font-size: .78rem; }
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--vert); }
.footer-socials { display: flex; gap: .75rem; }
.footer-social  { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); transition: var(--tr); }
.footer-social:hover { background: var(--vert); color: #fff; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .admin-layout { grid-template-columns: 200px 1fr; }
}
@media (max-width: 960px) {
    .hero         { grid-template-columns: 1fr; }
    .hero-right   { display: none; }
    .sim-layout   { grid-template-columns: 1fr; }
    .sidebar      { order: -1; }
    .forum-grid   { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar{ display: none; }
}
@media (max-width: 768px) {
    .articles-grid { grid-template-columns: 1fr; }
    .footer-grid   { grid-template-columns: 1fr; gap: 1.5rem; }
    .form-row      { grid-template-columns: 1fr; }
    .stats-grid    { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
    nav           { display: none; }
    .header-search{ display: none; }
    .hero h1      { font-size: 1.8rem; }
    .footer-bottom{ flex-direction: column; text-align: center; }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
    header, footer, nav, .sidebar, .btn { display: none !important; }
    body { font-size: 12pt; color: #000; }
    a    { color: #000; text-decoration: underline; }
}
