/*
 * parunpro - Directory design system
 * ============================================
 * Styles dedies aux pages directory (regions, departements, villes,
 * arrondissements, prestations x ville). Mobile-first : styles base =
 * mobile, override desktop sur min-width breakpoints.
 *
 * Conservation du vert parunpro #3a8e5c, focus accessibilite (contrast,
 * touch targets >= 44px, focus visible) et performance (transitions
 * ciblees, pas de JS).
 *
 * Charge via _partials/_pp_head.html.twig.
 */

/* === Variables de design === */
:root {
    --pp-primary: #3a8e5c;
    --pp-primary-light: #44b284;
    --pp-primary-dark: #2d5f3f;
    --pp-primary-soft: rgba(58, 142, 92, 0.10);
    --pp-text: #0f1d2e;            /* presque noir : meilleure lisibilite */
    --pp-text-secondary: #2c3e50;  /* gris fonce */
    --pp-text-muted: #5a6c7d;      /* gris moyen, encore lisible */
    --pp-border: #d8dfe4;
    --pp-border-soft: #e8edf1;
    --pp-bg: #ffffff;
    --pp-bg-soft: #f5f8f6;
    --pp-shadow-sm: 0 1px 3px rgba(20, 30, 40, 0.08), 0 1px 2px rgba(20, 30, 40, 0.06);
    --pp-shadow-md: 0 6px 16px rgba(20, 30, 40, 0.10);
    --pp-shadow-lg: 0 14px 32px rgba(20, 30, 40, 0.14);
    --pp-radius: 12px;
    --pp-radius-sm: 8px;
    --pp-radius-lg: 16px;
}

/* === Reset minimal === */
.pp-page {
    color: var(--pp-text);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.pp-page * { box-sizing: border-box; }
.pp-page img { max-width: 100%; height: auto; display: block; }
.pp-page p { color: var(--pp-text-secondary); }

/* === Container responsive === */
.pp-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}
@media (min-width: 768px) {
    .pp-container { padding: 24px; }
}
@media (min-width: 1024px) {
    .pp-container { padding: 32px 24px; }
}

/* === Breadcrumb === */
.pp-breadcrumb {
    font-size: 13px;
    color: var(--pp-text-muted);
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.pp-breadcrumb a {
    color: var(--pp-text-secondary);
    text-decoration: none;
}
.pp-breadcrumb a:hover { color: var(--pp-primary); text-decoration: underline; }
.pp-breadcrumb .sep { color: var(--pp-text-muted); }

/* === Hero / H1 / intro === */
.pp-hero {
    margin: 8px 0 20px;
}
.pp-hero h1 {
    font-size: 28px;
    line-height: 1.2;
    color: var(--pp-text);
    font-weight: 800;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}
.pp-hero .pp-intro {
    font-size: 16px;
    line-height: 1.65;
    color: var(--pp-text-secondary);
    font-weight: 500;
    margin: 0;
}
.pp-hero .pp-intro strong {
    color: var(--pp-text);
    font-weight: 700;
}
@media (min-width: 768px) {
    .pp-hero h1 { font-size: 34px; }
    .pp-hero .pp-intro { font-size: 17px; }
}
@media (min-width: 1024px) {
    .pp-hero h1 { font-size: 40px; }
}

/* === Navigation buttons (cross-branche, retour) === */
.pp-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 20px;
}
.pp-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 16px;
    background: var(--pp-bg);
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius-sm);
    color: var(--pp-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pp-nav-btn:hover, .pp-nav-btn:focus-visible {
    background: var(--pp-primary-soft);
    border-color: var(--pp-primary);
    color: var(--pp-primary-dark);
    outline: none;
}
.pp-nav-btn--primary {
    background: var(--pp-primary);
    border-color: var(--pp-primary);
    color: #fff;
}
.pp-nav-btn--primary:hover, .pp-nav-btn--primary:focus-visible {
    background: var(--pp-primary-dark);
    border-color: var(--pp-primary-dark);
    color: #fff;
}
.pp-nav-btn i { font-size: 16px; line-height: 1; }

/* === Layout 2-col (main + sidebar) === */
.pp-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 1024px) {
    .pp-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 32px;
        align-items: start;
    }
}

/* === Grid de cards === */
.pp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0 0 24px;
}
@media (min-width: 600px) {
    .pp-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (min-width: 1024px) {
    .pp-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 1280px) {
    .pp-grid { grid-template-columns: repeat(3, 1fr); }
}
.pp-grid--single { grid-template-columns: 1fr !important; }

/* === Card === */
.pp-card {
    display: flex;
    flex-direction: column;
    padding: 20px 20px 18px;
    background: var(--pp-bg);
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    box-shadow: var(--pp-shadow-sm);
    text-decoration: none;
    color: var(--pp-text);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    min-height: 120px;
    position: relative;
}
.pp-card:hover, .pp-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--pp-shadow-md);
    border-color: var(--pp-primary);
    color: var(--pp-text);
    outline: none;
}
.pp-card-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--pp-primary-dark);
    font-weight: 700;
    margin: 0 0 8px;
}
.pp-card-title {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--pp-text);
    margin: 0 0 12px;
    letter-spacing: -0.015em;
}
.pp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 14px;
    color: var(--pp-text-secondary);
    font-weight: 500;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--pp-border-soft);
}
.pp-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.pp-card-meta-item strong {
    color: var(--pp-text);
    font-weight: 800;
    font-size: 15px;
}
@media (min-width: 768px) {
    .pp-card-title { font-size: 20px; }
}
.pp-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 3px 8px;
    background: var(--pp-primary-soft);
    color: var(--pp-primary-dark);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* === Sidebar === */
.pp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}
@media (min-width: 1024px) {
    .pp-sidebar { margin-top: 0; position: sticky; top: 16px; }
}
.pp-sidebar-block {
    background: var(--pp-bg);
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    padding: 16px 18px;
}
.pp-sidebar-block h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--pp-text);
    margin: 0 0 14px;
    font-weight: 800;
}
.pp-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 15px;
}
.pp-sidebar-list li {
    padding: 8px 0;
    color: var(--pp-text);
    font-weight: 500;
    border-bottom: 1px solid var(--pp-border-soft);
}
.pp-sidebar-list li:last-child { border-bottom: none; }
.pp-sidebar-list li strong {
    color: var(--pp-text-muted);
    font-weight: 600;
    margin-right: 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.pp-sidebar-list a {
    color: var(--pp-primary-dark);
    text-decoration: none;
    font-weight: 600;
}
.pp-sidebar-list a:hover { color: var(--pp-primary); text-decoration: underline; }

/* === Sidebar list ranked (autres regions/departements par poids) === */
.pp-sidebar-ranked {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.pp-sidebar-ranked li {
    padding: 0;
    border-bottom: 1px solid var(--pp-border-soft);
}
.pp-sidebar-ranked li:last-child { border-bottom: none; }
.pp-sidebar-ranked a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
    color: var(--pp-text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s ease;
    min-height: 40px;
}
.pp-sidebar-ranked a:hover, .pp-sidebar-ranked a:focus-visible {
    color: var(--pp-primary);
    outline: none;
}
.pp-sidebar-ranked .rank-num {
    flex: 0 0 24px;
    font-size: 12px;
    font-weight: 700;
    color: var(--pp-text-muted);
    text-align: right;
}
.pp-sidebar-ranked .rank-name { flex: 1 1 auto; }
.pp-sidebar-ranked .rank-count {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--pp-primary-dark);
    background: var(--pp-primary-soft);
    padding: 2px 8px;
    border-radius: 999px;
    min-width: 32px;
    text-align: center;
}

/* === Tags prestations === */
.pp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pp-tag {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    background: var(--pp-bg-soft);
    border: 1px solid var(--pp-border);
    border-radius: 999px;
    color: var(--pp-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.pp-tag:hover, .pp-tag:focus-visible {
    background: var(--pp-primary);
    border-color: var(--pp-primary);
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}

/* === Map === */
.pp-map {
    width: 100%;
    height: 220px;
    background: var(--pp-bg-soft);
    border-radius: var(--pp-radius);
    border: 1px solid var(--pp-border);
    overflow: hidden;
}
@media (min-width: 1024px) {
    .pp-map { height: 280px; }
}

/* === Empty state === */
.pp-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--pp-text-muted);
    font-size: 15px;
    background: var(--pp-bg-soft);
    border: 1px dashed var(--pp-border);
    border-radius: var(--pp-radius);
    margin: 16px 0;
}

/* === Section internal liens (autres regions, etc) === */
.pp-section { margin: 28px 0 0; }
.pp-section h2 {
    font-size: 20px;
    color: var(--pp-text);
    margin: 0 0 12px;
    font-weight: 700;
}
.pp-section h3 {
    font-size: 16px;
    color: var(--pp-text-secondary);
    margin: 0 0 10px;
    font-weight: 600;
}
@media (min-width: 768px) {
    .pp-section h2 { font-size: 24px; }
}

/* === Liste compacte de liens internes === */
.pp-link-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.pp-link-list a {
    display: inline-block;
    padding: 6px 0;
    color: var(--pp-primary-dark);
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}
.pp-link-list a:hover, .pp-link-list a:focus-visible {
    border-bottom-color: var(--pp-primary);
    outline: none;
}
