/* =====================================================
   Dico Pattes — Feuille de style partagée
   Chargée par toutes les pages du site.
   ===================================================== */

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

/* --- Variables globales --- */
:root {
    --primary: #10ac84;
    --primary-light: #e6f7f4;
    --secondary: #f39c12;
    --dark: #222f3e;
    --light: #f4f7f6;
    --text: #576574;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.08);
    --radius: 12px;
}

/* --- Reset de base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.8;
    color: var(--text);
    background: var(--light);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* --- Header / Nav --- */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

/* --- Hero --- */
.hero {
    background: var(--white);
    padding: 5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin: 0.5rem 0;
    letter-spacing: -1.5px;
    color: var(--dark);
    line-height: 1.1;
}

.tagline {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    display: block;
}

/* --- Container --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* --- Content Box --- */
.content-box {
    background: var(--white);
    padding: 3.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

/* --- Grid --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

/* --- Cards --- */
.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.card h3 {
    color: var(--dark);
    margin-top: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.card h3 .icon {
    background: var(--primary-light);
    padding: 8px;
    border-radius: 10px;
    font-style: normal;
}

.name-container {
    font-size: 0.95rem;
    color: var(--text);
}

/* --- Expert Advice --- */
.expert-advice {
    background: #f0f9ff;
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    margin: 4rem 0;
    overflow: hidden;
}

.expert-advice h3 {
    color: var(--primary);
    margin-top: 0;
    font-size: 1.4rem;
    position: relative;
}

.expert-advice p {
    position: relative;
    font-style: italic;
    color: #2c3e50;
}

/* --- Retours à la ligne issus du JSON (\n) --- */
.content-box p,
.expert-advice p,
.card p,
.card td,
.faq-block {
    white-space: pre-line;
}

/* --- Accessibilité --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* --- Tableaux de noms --- */
.name-table {
    border-collapse: collapse;
    width: 100%;
    border: none;
    margin: 0;
}

.name-table td {
    border: none;
    padding: 0;
}

/* --- Maillage interne --- */
.maillage {
    background: #2d3436;
    color: #ffffff;
    padding: 4rem 2rem;
    border-radius: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.maillage h3 {
    color: #00b894;
    font-size: 1.8rem;
    margin-bottom: 3rem;
    margin-top: 0;
}

.container-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1000px;
}

.maillage a {
    display: block;
    color: #bdc3c7;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.2rem 1.8rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    text-align: left;
    font-size: 0.9rem;
    overflow-wrap: break-word;
}

.maillage a:hover {
    color: #ffffff;
    background: rgba(0, 184, 148, 0.1);
    border-color: rgba(0, 184, 148, 0.3);
    transform: translateY(-3px);
}

/* --- Lien de retour --- */
.back {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.back:hover {
    color: var(--primary);
}

/* --- Footer enrichi --- */
footer {
    padding: 3rem 2rem;
    background: var(--dark);
    color: white;
    text-align: center;
    margin-top: 2rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-nav a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--primary);
}

.footer-copy {
    font-size: 0.8rem;
    color: #636e72;
    margin: 0;
}

/* --- Articles (styles spécifiques) --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

th {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
}

tr:last-child td { border-bottom: none; }
tr:hover { background-color: var(--primary-light); }

ul { margin-bottom: 1.5rem; padding-left: 20px; }
li { margin-bottom: 0.5rem; }

.faq-item { margin-bottom: 1.5rem; }
.faq-item h3 { margin-bottom: 0.5rem; color: var(--primary); font-size: 1.1rem; }

/* --- Responsive --- */
@media (max-width: 650px) {
    .container-links {
        grid-template-columns: 1fr;
    }

    .maillage a {
        border-radius: 12px;
        padding: 1rem;
    }

    .content-box {
        padding: 2rem 1.5rem;
    }

    .hero { padding: 3rem 1.2rem; }
}
