:root {
    --royal-bg: #e85a3a;
    --royal-bg-dark: #d44f32;
    --input-bg: #ffffff;
    --input-border: rgba(255, 255, 255, 0.5);
    --text-light: #ffffff;
    --btn-bg: #ffffff;
    --btn-text: #e85a3a;
    --btn-bg-hover: #ffe0d7;
    --error: #ffd2d2;
}

/* RESET DE BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* BODY APPLI (Royaume) */
.royal-body {
    min-height: 100vh;
    font-family: "rotunda-variable", sans-serif;
    background-color: #f3efe8;
    color: #2b2b2b;
}

/* BODY LOGIN */
.royal-body-login {
    min-height: 100vh;
    font-family: "rotunda-variable", sans-serif;
    background-image: url("../img/royaume-pattern.png");
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
}

/* BG global si besoin */
.royal-bg {
    position: fixed;
    inset: 0;
    background-size: 260px 260px;
    background-repeat: repeat;
    opacity: 0.25;
    z-index: -1;
}

/* LOGIN */
.login-wrapper {
    width: 100%;
    max-width: 480px;
    padding: 24px;
}

.login-card {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 32px 32px 28px;
    backdrop-filter: blur(6px);
    text-align: center;
}

.brand-block {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.brand-logo {
    width: 150px;
    max-width: 70%;
    margin: 0 auto 8px;
    display: block;
}

.brand-baseline {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

.castle-illu {
    width: 80px;
    margin: 20px auto 8px;
    display: block;
}

.login-title {
    font-size: 1.2rem;
    line-height: 1.3;
    font-weight: 700;
    font-family: "monotalic", sans-serif;
}

.login-title span {
    display: block;
}

.login-subtitle {
    margin-top: 6px;
    font-size: 0.9rem;
    opacity: 0.9;
}

form {
    margin-top: 22px;
    text-align: left;
}

.form-group {
    margin-bottom: 14px;
}

label {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
    opacity: 0.9;
}

.input-field {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--input-border);
    padding: 11px 16px;
    font-size: 0.95rem;
    outline: none;
    background-color: var(--input-bg);
    color: #333;
}

.input-field:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.login-actions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-primary {
    border-radius: 999px;
    border: none;
    padding: 11px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--btn-text);
    color: var(--btn-bg);
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.btn-primary:hover {
    background-color: var(--btn-bg-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    border-radius: 999px;
    border: none;
    padding: 11px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.btn-secondary:hover {
    background-color: var(--btn-bg-hover);
    transform: translateY(-1px);
}

.link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.link-row a {
    color: #ffe9e0;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.link-row a:hover {
    text-decoration-thickness: 2px;
}

.login-footer {
    margin-top: 16px;
    font-size: 0.75rem;
    opacity: 0.9;
}

.error-message {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background-color: var(--error);
    color: #7a1d1d;
    font-size: 0.8rem;
}

@media (max-width: 600px) {
    .login-card {
        padding: 24px 20px 22px;
    }
}

/* HEADER APPLI */
.royal-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 32px;
    background: rgba(232, 90, 58, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
}

.royal-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.royal-logo-mini {
    width: 32px;
    height: 32px;
}

.royal-header-title {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.royal-app-name {
    font-family: "monotalic", "rotunda-variable", system-ui, sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.8;
}

.royal-client-name {
    font-weight: 600;
    font-size: 0.95rem;
}

/* NAV */
.royal-nav {
    display: flex;
    gap: 18px;
}

.royal-nav-link {
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffe9e0;
    text-decoration: none;
    opacity: 0.8;
}

.royal-nav-link:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.12);
}

.royal-nav-link.is-active {
    background-color: #ffffff;
    color: #e85a3a;
    opacity: 1;
}

/* ZONE DROITE DU HEADER */
.royal-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Bande "Connecté en tant que" */
.royal-context {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.75rem;
    line-height: 1.2;
}

.royal-context-label {
    opacity: 0.7;
}

.royal-context-badge {
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.75rem;
    font-weight: 600;
}

/* MENU UTILISATEUR */
.royal-user-menu {
    position: relative;
}

.royal-user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 4px 10px 4px 4px;
    cursor: pointer;
}

.royal-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #fff;
    color: #e85a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.royal-user-name {
    font-size: 0.8rem;
}

.royal-user-caret {
    font-size: 0.6rem;
    opacity: 0.9;
}

/* DROPDOWN UTILISATEUR */
.royal-user-dropdown {
    position: absolute;
    right: 0;
    margin-top: 6px;
    background: #ffffff;
    color: #333;
    border-radius: 12px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
    padding: 6px 0;
    min-width: 210px;
    display: none;
}

.royal-user-dropdown-header {
    padding: 10px 14px 8px;
    border-bottom: 1px solid #eee;
}

.royal-user-dropdown-name {
    font-size: 0.85rem;
    /* plus fin */
    font-weight: 600;
}

.royal-user-dropdown-email {
    font-size: 0.72rem;
    /* discret */
    color: #777;
    margin-top: 2px;
}

.royal-user-dropdown a {
    display: block;
    padding: 7px 14px;
    font-size: 0.82rem;
    color: #333;
    text-decoration: none;
}

.royal-user-dropdown a:hover {
    background: #f5f5f5;
}

.royal-user-menu.is-open .royal-user-dropdown {
    display: block;
}

/* FOOTER */
.royal-footer {
    margin-top: auto;
    padding: 8px 24px;
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffe9e0;
    opacity: 0.9;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.royal-footer-right a {
    margin-right: 12px;
    color: #ffe9e0;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

/* Layout principal du Royaume */
.royal-main {
    max-width: 1120px;
    margin: 18px 0 32px;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Variante client (utilisée pour /site et /social) */
.royal-main-client {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Sections */
.royal-section {
    margin-bottom: 24px;
}

/* Bloc hero */
.royal-section-hero {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr);
    gap: 24px;
    align-items: stretch;
}

.royal-page-title {
    font-family: "monotalic", "rotunda-variable", sans-serif;
    font-size: 1.4rem;
    margin-bottom: 4px;
    color: #3a2419;
}

.royal-page-subtitle {
    font-size: 0.9rem;
    color: #7b6a60;
    margin-bottom: 16px;
}

/* Carte phase */
.royal-phase-card {
    background: #fff7f2;
    border-radius: 14px;
    padding: 14px 16px 14px;
    border: 1px solid #f1dacd;
}

.royal-phase-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b05b3a;
}

.royal-phase-name {
    display: block;
    margin-top: 4px;
    font-weight: 600;
    font-size: 1rem;
    color: #3a2419;
}

.royal-phase-next {
    margin-top: 6px;
    font-size: 0.84rem;
    color: #7b6a60;
}

/* KPIs */
.royal-hero-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.royal-kpi-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid #eee3d9;
}

.royal-kpi-label {
    display: block;
    font-size: 0.78rem;
    color: #8a7567;
}

.royal-kpi-value {
    display: block;
    margin-top: 3px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #3a2419;
}

.royal-kpi-value-highlight {
    color: #e85a3a;
}

.royal-kpi-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.8rem;
    color: #8a7567;
}

/* Grille cartes */
.royal-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
    gap: 20px;
}

/* Carte générique */
.royal-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 16px 16px;
    border: 1px solid #eee3d9;
}

.royal-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.royal-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #3a2419;
}

.royal-card-pill {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff0e7;
    color: #b05b3a;
}

/* To-do */
.royal-todo-list {
    list-style: none;
    margin: 4px 0 8px;
    padding: 0;
}

.royal-todo-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.86rem;
    color: #4b3c34;
    padding: 4px 0;
}

.royal-todo-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-top: 5px;
}

.royal-todo-dot-brand {
    background: #e85a3a;
}

.royal-todo-dot-site {
    background: #f1a43c;
}

.royal-todo-dot-social {
    background: #2d9cdb;
}

/* Activité */
.royal-activity-list {
    list-style: none;
    margin: 4px 0 8px;
    padding: 0;
}

.royal-activity-item {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    row-gap: 2px;
    padding: 5px 0;
}

.royal-activity-time {
    font-size: 0.76rem;
    color: #a08e80;
}

.royal-activity-text {
    font-size: 0.86rem;
    color: #4b3c34;
}

/* Lien inline */
.royal-link-inline {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #b05b3a;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

/* Responsive */
@media (max-width: 900px) {

    .royal-section-hero,
    .royal-section-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.royal-quick-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3a2419;
    margin-bottom: 8px;
}

.royal-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.royal-quick-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #eee3d9;
    text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.08s ease;
}

.royal-quick-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border-color: #f1dacd;
}

.royal-quick-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Couleurs par type */
.royal-quick-icon-brand {
    background: linear-gradient(135deg, #e85a3a, #f4a261);
}

.royal-quick-icon-social {
    background: linear-gradient(135deg, #2d9cdb, #56ccf2);
}

.royal-quick-icon-site {
    background: linear-gradient(135deg, #f1a43c, #f6d365);
}

.royal-quick-icon-doc {
    background: linear-gradient(135deg, #9b59b6, #e056fd);
}

.royal-quick-icon-autre {
    background: linear-gradient(135deg, #5b21b6, #8b5cf6);
}

.royal-quick-texts {
    display: flex;
    flex-direction: column;
}

.royal-quick-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #3a2419;
}

.royal-quick-desc {
    font-size: 0.78rem;
    color: #8a7567;
}

/* Responsive */
@media (max-width: 900px) {
    .royal-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .royal-quick-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Formulaire Plateforme de marque */
.royal-brand-form {
    margin-top: 4px;
}

.royal-brand-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px 20px;
}

.royal-brand-field {
    display: flex;
    flex-direction: column;
}

.royal-brand-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #3a2419;
    margin-bottom: 2px;
}

.royal-field-hint {
    font-size: 0.78rem;
    color: #8a7567;
    margin-bottom: 4px;
}

.royal-textarea {
    border-radius: 10px;
    border: 1px solid #e0d3c9;
    padding: 8px 10px;
    font-size: 0.86rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    background: #fdfaf6;
    color: #3a2419;
}

.royal-textarea:focus {
    outline: none;
    border-color: #e85a3a;
    box-shadow: 0 0 0 1px rgba(232, 90, 58, 0.25);
}

.royal-form-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.royal-form-note {
    font-size: 0.78rem;
    color: #8a7567;
}

/* Charte graphique */
.royal-brand-grid-charte {
    margin-top: 4px;
}

.royal-files-list {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.royal-file-upload {
    border-radius: 999px;
    border: 1px dashed #d4c5b8;
    background: #fdfaf6;
    color: #8a7567;
    font-size: 0.8rem;
    padding: 6px 10px;
    cursor: pointer;
}

.royal-file-upload:hover {
    border-style: solid;
    border-color: #e85a3a;
    color: #e85a3a;
}

.royal-color-row {
    margin-top: 4px;
    display: flex;
    gap: 6px;
}

.royal-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.royal-typo-list {
    margin-top: 4px;
    padding-left: 16px;
    font-size: 0.82rem;
    color: #4b3c34;
}

/* Responsive */
@media (max-width: 900px) {
    .royal-brand-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Sous-titres et texte site */
.royal-site-block {
    margin-top: 6px;
}

.royal-site-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3a2419;
    margin-bottom: 2px;
}

.royal-site-text {
    font-size: 0.86rem;
    color: #4b3c34;
}

.royal-site-list {
    margin: 4px 0 0 16px;
    padding: 0;
    font-size: 0.86rem;
    color: #4b3c34;
}

/* Étapes projet */
.royal-steps-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.royal-step {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: flex-start;
    padding: 6px 0;
}

.royal-step-marker {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-top: 5px;
    border: 2px solid #d4c5b8;
    background: #ffffff;
}

.royal-step-content {
    display: flex;
    flex-direction: column;
}

.royal-step-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: #3a2419;
}

.royal-step-note {
    font-size: 0.8rem;
    color: #8a7567;
}

/* États d'étape */
.royal-step-done .royal-step-marker {
    background: #46b17b;
    border-color: #46b17b;
}

.royal-step-current .royal-step-marker {
    background: #e85a3a;
    border-color: #e85a3a;
}

/* Carte site */
.royal-card-site {
    /* optionnel : léger ajustement si tu veux les distinguer */
}

/* Pages du site */
.royal-pages-grid {
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.royal-page-card {
    border-radius: 12px;
    border: 1px solid #eee3d9;
    padding: 8px 10px;
    background: #ffffff;
}

.royal-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.royal-page-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: #3a2419;
}

.royal-page-status {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
}

/* Statuts des pages */
.royal-page-status-ready {
    background: #e3f7ee;
    color: #2f7a55;
}

.royal-page-status-progress {
    background: #fff3d8;
    color: #a46a1f;
}

.royal-page-status-todo {
    background: #f7e6e2;
    color: #b05b3a;
}

.royal-page-text {
    font-size: 0.8rem;
    color: #4b3c34;
}

/* Responsive */
@media (max-width: 900px) {
    .royal-pages-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .royal-pages-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Arborescence du site */
.royal-tree {
    margin-top: 6px;
    font-size: 0.84rem;
}

.royal-tree-root,
.royal-tree-children {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.royal-tree-root>.royal-tree-item {
    margin: 4px 0;
}

.royal-tree-item {
    position: relative;
}

.royal-tree-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 8px;
}

.royal-tree-label {
    color: #3a2419;
}

/* Puces & connecteurs */
.royal-tree-bullet {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #d4c5b8;
    flex-shrink: 0;
}

.royal-tree-connector {
    width: 14px;
    height: 1px;
    background: #e0d3c9;
    flex-shrink: 0;
}

/* Enfants (niveau 2) */
.royal-tree-children {
    margin-left: 20px;
    margin-top: 2px;
}

.royal-tree-children .royal-tree-row {
    padding-left: 0;
}

/* Mise en avant Accueil */
.royal-tree-home .royal-tree-row {
    background: #fff7f2;
}

/* Arborescence graphique */
.royal-tree-diagram {
    margin-top: 10px;
    padding: 10px 0 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 12px;
}

.royal-tree-level {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.royal-tree-level-root {
    margin-bottom: 0;
}

.royal-tree-node {
    min-width: 120px;
    max-width: 180px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #eee3d9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    text-align: center;
}

.royal-tree-node-main {
    min-width: 140px;
    background: #fff7f2;
    border-color: #f1dacd;
}

.royal-tree-node-small {
    min-width: 100px;
    padding: 6px 8px;
}

.royal-tree-node-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #3a2419;
}

.royal-tree-node-meta {
    margin-top: 2px;
    font-size: 0.72rem;
    color: #8a7567;
}

/* Groupes de sous-pages */
.royal-tree-level-children {
    column-gap: 24px;
}

.royal-tree-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 4px;
}

.royal-tree-group-label {
    font-size: 0.78rem;
    color: #8a7567;
}

.royal-tree-group-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Traits verticaux */
.royal-tree-connector-vertical {
    width: 2px;
    height: 14px;
    background: #e0d3c9;
}

.royal-tree-connector-small {
    height: 10px;
}

/* Responsive */
@media (max-width: 600px) {
    .royal-tree-node {
        min-width: 110px;
    }
}

/* Liste "à valider" */
.royal-social-list {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
}

.royal-social-item {
    border-bottom: 1px solid #f0e4da;
    padding: 6px 0;
}

.royal-social-item:last-child {
    border-bottom: none;
}

.royal-social-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    margin-bottom: 2px;
}

.royal-social-platform {
    padding: 2px 6px;
    border-radius: 999px;
    background: #f4ede6;
    color: #3a2419;
}

.royal-social-platform-ig {
    background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
    color: #ffffff;
}

.royal-social-platform-li {
    background: #0a66c2;
    color: #ffffff;
}

.royal-social-date {
    color: #8a7567;
}

.royal-social-text {
    font-size: 0.84rem;
    color: #4b3c34;
}

.royal-social-tags {
    margin-top: 2px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.royal-social-tag {
    font-size: 0.72rem;
    padding: 1px 6px;
    border-radius: 999px;
    background: #f4ede6;
    color: #7b6a60;
}

/* Mini calendrier */
.royal-calendar {
    margin-top: 4px;
}

.royal-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.royal-calendar-month {
    font-size: 0.86rem;
    font-weight: 600;
    color: #3a2419;
}

.royal-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    font-size: 0.72rem;
}

.royal-cal-day {
    min-height: 26px;
    padding: 2px 4px;
    border-radius: 6px;
    text-align: left;
    color: #4b3c34;
    position: relative;
}

.royal-cal-label {
    font-weight: 600;
    color: #8a7567;
}

.royal-cal-has-post {
    background: #fff7f2;
    border: 1px solid #f1dacd;
}

.royal-cal-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    bottom: 3px;
    right: 3px;
}

.royal-cal-dot-ig {
    background: #dd2a7b;
}

.royal-cal-dot-fb {
    background: #1877f2;
}

.royal-cal-dot-li {
    background: #0a66c2;
}

.royal-calendar-legend {
    margin-top: 6px;
    font-size: 0.74rem;
    color: #8a7567;
}

/* ====================================================================== */
/*  CALENDRIER EDITORIAL (partagé admin + espace client Social)          */
/* ====================================================================== */

/* Bouton outline (Voir la ligne editoriale, Retour au calendrier) */
.royal-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #8a7567;
    background: #fffdf8;
    border: 1px solid #e0d3c9;
    border-radius: 999px;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.royal-btn-outline:hover {
    color: #e85a3a;
    border-color: #e85a3a;
    background: #fff7f2;
}

.royal-btn-outline i {
    font-size: 1rem;
}

/* Actions header (bouton à droite du titre) */
.social-client-header-actions,
.royal-calendar-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Header calendrier */
.royal-card.royal-calendar-header {
    padding: 18px 20px;
}

.royal-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Barre de navigation du mois */
.royal-calendar-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 0 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid #eee3d9;
}

.royal-calendar-toolbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.royal-calendar-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #8a7567;
    background: #fffdf8;
    border: 1px solid #e0d3c9;
    border-radius: 999px;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.royal-calendar-nav:hover {
    color: #e85a3a;
    border-color: #e85a3a;
    background: #fff7f2;
}

.royal-calendar-current-month {
    font-family: "monotalic", "rotunda-variable", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #3a2419;
    min-width: 140px;
    text-align: center;
}

/* Carte calendrier */
.royal-calendar-card {
    padding: 16px 18px;
}

/* Grille calendrier mensuel */
.royal-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    font-size: 0.8rem;
}

.royal-calendar-day-label {
    text-align: center;
    font-weight: 600;
    color: #8a7567;
    padding-bottom: 4px;
}

.royal-calendar-cell {
    min-height: 90px;
    border-radius: 8px;
    border: 1px solid #eee3d9;
    background: #fffdf8;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.royal-calendar-cell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.royal-calendar-date {
    font-weight: 600;
    color: #4b3c34;
}

.royal-calendar-add {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid #e0d3c9;
    background: #ffffff;
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    color: #8a7567;
}

/* Posts dans le calendrier */
.royal-calendar-post {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 3px;
    padding: 3px 4px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.75rem;
}

.royal-calendar-post-time {
    font-weight: 600;
}

.royal-calendar-post-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.royal-calendar-post-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.royal-calendar-post-channel-icon i {
    font-size: 0.9rem;
}

/* Couleurs par réseau (editorial) */
.royal-calendar-post-instagram {
    background: #ffe5f0;
    color: #9b224d;
}

.royal-calendar-post-facebook {
    background: #e3edff;
    color: #194a96;
}

.royal-calendar-post-linkedin {
    background: #e1f2ff;
    color: #12668f;
}

/* Vue liste rapide */
.royal-calendar-list-card {
    padding: 12px;
}

.royal-calendar-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.royal-calendar-list-filters {
    display: flex;
    gap: 6px;
}

.royal-calendar-filter {
    min-width: 150px;
}

.royal-calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.royal-calendar-table th,
.royal-calendar-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f0e4da;
    text-align: left;
}

.royal-calendar-table th {
    font-weight: 600;
    color: #7a685a;
    background: #fff7ee;
}

.badge-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.72rem;
}

.badge-status-review {
    background: #fff1d8;
    color: #a36206;
}

/* Layout 2 colonnes (calendrier + sidebar urgences) */
.royal-calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(240px, 1.1fr);
    gap: 12px;
}

/* Sidebar urgences */
.royal-calendar-sidebar {
    padding: 10px;
}

.royal-card-subtitle {
    font-size: 0.78rem;
    color: #8a7567;
    margin-bottom: 8px;
}

.royal-urgent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.royal-urgent-item {
    border-radius: 8px;
    border: 1px solid #f0dfd3;
    background: #fffaf3;
    padding: 6px 7px;
    font-size: 0.78rem;
    cursor: pointer;
}

.royal-urgent-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.royal-urgent-date {
    font-weight: 600;
    color: #4b3c34;
}

.royal-urgent-client {
    color: #8a7567;
}

.royal-urgent-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.royal-urgent-channels {
    font-weight: 500;
}

.royal-urgent-status {
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.7rem;
}

.royal-urgent-status-review {
    background: #fff1d8;
    color: #a36206;
}

.royal-urgent-status-draft {
    background: #ffe5f0;
    color: #9b224d;
}

.royal-urgent-title {
    color: #5b4334;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tableau simplifié */
.royal-social-table {
    margin-top: 6px;
    border-radius: 10px;
    border: 1px solid #eee3d9;
    overflow: hidden;
}

.royal-social-row {
    display: grid;
    grid-template-columns: 1.1fr 0.8fr 1.4fr 0.9fr;
    padding: 6px 8px;
    font-size: 0.8rem;
    color: #4b3c34;
}

.royal-social-row-head {
    background: #faf2ea;
    font-weight: 600;
    color: #3a2419;
}

.royal-social-row:not(.royal-social-row-head):nth-child(2n) {
    background: #fdf9f4;
}

.royal-social-status {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.72rem;
    text-align: center;
}

.royal-social-status-published {
    background: #e3f7ee;
    color: #2f7a55;
}

.royal-social-status-review {
    background: #fff3d8;
    color: #a46a1f;
}

/* Responsive */
@media (max-width: 900px) {
    .royal-social-row {
        grid-template-columns: 1fr 1fr;
        row-gap: 2px;
    }
}

/* Filtres activité */
.royal-activity-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.8rem;
}

.royal-activity-filter-label {
    color: #7b6a60;
    margin-right: 4px;
}

.royal-activity-chip {
    border-radius: 999px;
    border: 1px solid #e0d3c9;
    background: #ffffff;
    padding: 3px 8px;
    font-size: 0.78rem;
    color: #4b3c34;
    cursor: pointer;
}

.royal-activity-chip-active {
    background: #fff7f2;
    border-color: #e85a3a;
    color: #e85a3a;
}

/* Timeline */
.royal-card-activity-full {
    padding-left: 18px;
}

.royal-activity-timeline {
    margin-top: 4px;
}

.royal-activity-day {
    margin-bottom: 10px;
}

.royal-activity-day-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #3a2419;
    margin-bottom: 4px;
}

.royal-activity-row {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: flex-start;
}

.royal-activity-axis {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.royal-activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid #ffffff;
    margin-top: 2px;
}

.royal-activity-line {
    flex: 1;
    width: 2px;
    background: #e0d3c9;
    margin-top: 2px;
}

.royal-activity-content {
    padding: 4px 0 6px;
    border-bottom: 1px solid #f0e4da;
}

.royal-activity-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.royal-activity-time {
    font-size: 0.76rem;
    color: #8a7567;
}

.royal-activity-badge {
    font-size: 0.72rem;
    padding: 1px 6px;
    border-radius: 999px;
    background: #f4ede6;
    color: #3a2419;
}

/* Couleurs par type */
.royal-activity-dot-brand,
.royal-activity-badge-brand {
    background: #e85a3a;
    color: #ffffff;
}

.royal-activity-dot-site,
.royal-activity-badge-site {
    background: #f1a43c;
    color: #ffffff;
}

.royal-activity-dot-social,
.royal-activity-badge-social {
    background: #2d9cdb;
    color: #ffffff;
}

.royal-activity-dot-files,
.royal-activity-badge-files {
    background: #9b59b6;
    color: #ffffff;
}

.royal-activity-text {
    font-size: 0.84rem;
    color: #4b3c34;
}

/* Responsive */
@media (max-width: 600px) {
    .royal-card-activity-full {
        padding-left: 12px;
    }
}

.royal-clients-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.royal-clients-search {
    flex: 1;
    border-radius: 999px;
    border: 1px solid #e0d3c9;
    padding: 6px 10px;
    font-size: 0.84rem;
    font-family: inherit;
    background: #fdfaf6;
}

.royal-clients-count {
    font-size: 0.8rem;
    color: #8a7567;
}

.royal-clients-table {
    border-radius: 10px;
    border: 1px solid #eee3d9;
    overflow: hidden;
    font-size: 0.8rem;
}

.royal-clients-row {
    display: grid;
    grid-template-columns: 1.3fr 1.1fr 1.1fr 1.1fr 0.8fr;
    padding: 6px 8px;
    column-gap: 8px;
    color: #4b3c34;
}

.royal-clients-row-head {
    background: #faf2ea;
    font-weight: 600;
    color: #3a2419;
}

.royal-clients-row:not(.royal-clients-row-head):nth-child(2n) {
    background: #fdf9f4;
}

.royal-clients-status {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.72rem;
    text-align: center;
}

.royal-clients-status-on {
    background: #e3f7ee;
    color: #2f7a55;
}

.royal-clients-status-onboarding {
    background: #fff3d8;
    color: #a46a1f;
}

/* Responsive */
@media (max-width: 900px) {
    .royal-clients-row {
        grid-template-columns: 1.5fr 1.2fr 1.3fr;
        row-gap: 2px;
    }
}

.royal-kingdom-meta {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.royal-kingdom-pill {
    font-size: 0.74rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f4ede6;
    color: #7b6a60;
}

.royal-kingdom-text {
    font-size: 0.86rem;
    color: #4b3c34;
    margin-bottom: 4px;
}

.royal-kingdom-list {
    margin: 0 0 4px 16px;
    padding: 0;
    font-size: 0.82rem;
    color: #4b3c34;
}

.royal-kingdom-actions {
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* En-tête facturation */
.royal-billing-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
}

.royal-billing-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.royal-billing-chip {
    border-radius: 999px;
    border: 1px solid #e0d3c9;
    background: #ffffff;
    padding: 3px 8px;
    font-size: 0.78rem;
    color: #4b3c34;
    cursor: pointer;
}

.royal-billing-chip-active {
    background: #fff7f2;
    border-color: #e85a3a;
    color: #e85a3a;
}

.royal-billing-note {
    font-size: 0.78rem;
    color: #8a7567;
}

/* Tableau factures */
.royal-billing-table {
    border-radius: 10px;
    border: 1px solid #eee3d9;
    overflow: hidden;
    font-size: 0.8rem;
}

.royal-billing-row {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 1.6fr 0.9fr 0.8fr 0.9fr;
    padding: 6px 8px;
    column-gap: 8px;
    color: #4b3c34;
    align-items: center;
}

.royal-billing-row-head {
    background: #faf2ea;
    font-weight: 600;
    color: #3a2419;
}

.royal-billing-row:not(.royal-billing-row-head):nth-child(2n) {
    background: #fdf9f4;
}

/* Statuts factures */
.royal-billing-status {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.72rem;
    text-align: center;
}

.royal-billing-status-due {
    background: #fff3d8;
    color: #a46a1f;
}

.royal-billing-status-paid {
    background: #e3f7ee;
    color: #2f7a55;
}

.royal-billing-status-quote {
    background: #f4ede6;
    color: #7b6a60;
}

/* Actions */
.royal-billing-actions {
    text-align: right;
}

.royal-billing-link {
    font-size: 0.78rem;
    color: #b05b3a;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .royal-billing-row {
        grid-template-columns: 1.3fr 1fr 1.4fr;
        row-gap: 2px;
    }
}

/* Filtres fichiers */
.royal-files-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.8rem;
}

.royal-files-chip {
    border-radius: 999px;
    border: 1px solid #e0d3c9;
    background: #ffffff;
    padding: 3px 8px;
    font-size: 0.78rem;
    color: #4b3c34;
    cursor: pointer;
}

.royal-files-chip-active {
    background: #fff7f2;
    border-color: #e85a3a;
    color: #e85a3a;
}

/* Grille sections */
.royal-card-files {
    padding-top: 10px;
}

.royal-files-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.royal-files-section {
    border-radius: 12px;
    border: 1px solid #eee3d9;
    padding: 8px 10px;
    background: #ffffff;
}

.royal-files-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.royal-files-folder-icon {
    width: 30px;
    height: 24px;
    border-radius: 6px;
    background: #f4ede6;
}

.royal-files-folder-brand {
    background: linear-gradient(135deg, #e85a3a, #f4a261);
}

.royal-files-folder-site {
    background: linear-gradient(135deg, #f1a43c, #f6d365);
}

.royal-files-folder-social {
    background: linear-gradient(135deg, #2d9cdb, #56ccf2);
}

.royal-files-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3a2419;
}

.royal-files-section-subtitle {
    font-size: 0.78rem;
    color: #8a7567;
}

/* Liste des fichiers */
.royal-files-list {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.royal-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #f3e7dd;
}

.royal-file-item:last-child {
    border-bottom: none;
}

.royal-file-main {
    display: flex;
    align-items: center;
    gap: 6px;
}

.royal-file-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #f4ede6;
    flex-shrink: 0;
}

.royal-file-icon-pdf {
    background: #e74c3c;
}

.royal-file-icon-img {
    background: #27ae60;
}

.royal-file-icon-zip {
    background: #8e44ad;
}

.royal-file-texts {
    display: flex;
    flex-direction: column;
}

.royal-file-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: #3a2419;
}

.royal-file-meta {
    font-size: 0.74rem;
    color: #8a7567;
}

.royal-file-link {
    font-size: 0.78rem;
    color: #b05b3a;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .royal-files-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .royal-files-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.royal-field-box {
    background: #fffdf8;
    border-radius: 8px;
    border: 1px solid #eee3d9;
    padding: 10px 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 80px;
    white-space: normal;
}

/* Optionnel : style des contenus WYSIWYG */
.wysiwyg-content p {
    margin: 0 0 6px;
}

.wysiwyg-content ul,
.wysiwyg-content ol {
    margin: 0 0 6px 18px;
    padding: 0;
}

.wysiwyg-content strong {
    font-weight: 600;
}

/* Modal générique Royaume – client */

.royal-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    /* affiché en JS */
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.royal-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.royal-modal-dialog {
    position: relative;
    max-width: 520px;
    width: 100%;
    background: #fffdf8;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    padding: 18px 20px 16px;
    z-index: 2001;
    border: 1px solid #eee3d9;
}

.royal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.royal-modal-title {
    font-size: 1rem;
    margin: 0;
    color: #4b3c34;
}

.royal-modal-close {
    border: none;
    background: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: #8a7567;
}

.royal-modal-close:hover {
    color: #c0392b;
}

.royal-modal-body {
    margin: 0;
}

.royal-form-group {
    margin-bottom: 12px;
}

.royal-form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: #4b3c34;
}

.royal-form-group textarea.royal-input {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e0d3c9;
    padding: 8px 10px;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 90px;
}

.royal-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* Bouton-lien sous les sections */
.royal-link-button {
    background: none;
    border: none;
    padding: 0;
    margin-top: 4px;
    color: #e85a3a;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}

.royal-link-button:hover {
    color: #c0392b;
}

/* Drawer latéral pour suggestions */

.royal-drawer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    /* affiché en JS */
    pointer-events: none;
}

.royal-drawer.is-open {
    display: block;
    pointer-events: auto;
}

.royal-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.royal-drawer.is-open .royal-drawer-backdrop {
    opacity: 1;
}

.royal-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 90vw;
    background: #fffdf8;
    border-left: 1px solid #eee3d9;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.royal-drawer.is-open .royal-drawer-panel {
    transform: translateX(0);
}

.royal-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #eee3d9;
    flex-shrink: 0;
}

.royal-drawer-title {
    font-size: 1rem;
    margin: 0;
    color: #4b3c34;
}

.royal-drawer-close {
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #8a7567;
    padding: 0;
    width: 28px;
    height: 28px;
}

.royal-drawer-close:hover {
    color: #c0392b;
}

.royal-drawer-body {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
}

.royal-drawer-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee3d9;
}

.royal-drawer-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee3d9;
}

.royal-drawer-section-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #8a7567;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.royal-drawer-section-content {
    background: #f6f4ef;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #4b3c34;
    max-height: 200px;
    overflow-y: auto;
}

.royal-drawer-form {
    margin: 0;
}

/* Bloc commentaires */
.royal-comments-block {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee3d9;
}

.royal-comments-block.royal-comments-resolved {
    margin-top: 16px;
    padding-top: 16px;
}

.royal-comments-title {
    font-size: 0.9rem;
    margin-bottom: 12px;
    color: #4b3c34;
    font-weight: 600;
}

.royal-comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.royal-comments-resolved .royal-comments-list {
    gap: 8px;
}

/* Cartes de commentaire */
.royal-comment-card {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee3d9;
}

.royal-comment-open {
    background: #fffdf8;
}

.royal-comment-resolved {
    background: #f6f4ef;
    border-color: #e0d3c9;
    opacity: 0.85;
    padding: 8px;
}

.royal-comment-meta {
    font-size: 0.8rem;
    color: #8a7567;
    margin-bottom: 4px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.royal-comment-resolved .royal-comment-meta {
    font-size: 0.78rem;
    margin-bottom: 2px;
}

.royal-comment-section {
    font-weight: 600;
}

.royal-comment-date {
    color: #8a7567;
}

.royal-comment-content {
    margin: 0;
    font-size: 0.9rem;
    color: #4b3c34;
}

.royal-comment-resolved .royal-comment-content {
    font-size: 0.85rem;
}

/* Conversations */
.royal-conversation-card {
    background: #fffdf8;
    border: 1px solid #eee3d9;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.royal-conversation-card.royal-conversation-resolved {
    background: #f6f4ef;
    opacity: 0.85;
}

.royal-conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0e4da;
    font-size: 0.85rem;
}

.royal-conversation-date {
    color: #8a7567;
    font-size: 0.75rem;
}

/* Thread de messages */
.royal-conversation-thread {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.royal-message {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.royal-message-client {
    background: #f3f4f6;
    border-left: 3px solid #d25640;
    margin-right: 40px;
}

.royal-message-ka {
    background: #e3f7ee;
    border-left: 3px solid #2f7a55;
    margin-left: 40px;
}

.royal-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.75rem;
}

.royal-message-header strong {
    font-weight: 600;
    color: #4b3c34;
}

.royal-message-date {
    color: #8a7567;
}

.royal-message-content {
    color: #1f2937;
    line-height: 1.4;
}

/* Formulaire de réponse */
.royal-conversation-reply-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding-top: 8px;
    border-top: 1px solid #f0e4da;
}

.royal-conversation-reply-form textarea {
    width: 100%;
    min-height: 80px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.alert-success {
    color: #1e7a46;
    background-color: #e6f5ee;
    border-color: #c4e6d6;
}

.royal-task-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.royal-task-card {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fffdf8;
    border: 1px solid #eee3d9;
}

.royal-task-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #3b2e26;
}

.royal-task-meta {
    font-size: 0.8rem;
    color: #8a7567;
    margin-top: 2px;
}

.royal-task-desc {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #4b3c34;
}

.royal-task-empty {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f6f4ef;
    font-size: 0.9rem;
    color: #8a7567;
    margin-bottom: 16px;
}

.royal-shortcuts {
    font-size: 0.85rem;
    color: #6a584b;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.royal-shortcuts a {
    color: #4b3cff;
    text-decoration: underline;
}

.royal-main-client {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Dashboard Client - Contenus à valider */
.royal-validation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.royal-validation-item:hover {
    background: #f3f4f6;
    border-color: #e85a3a;
}

/* Dashboard Client - Tâches par priorité */
.royal-todo-dot-haute {
    background: #dc2626;
}

.royal-todo-dot-normale {
    background: #e85a3a;
}

.royal-todo-dot-basse {
    background: #6b7280;
}

/* ═══════════════════════════════════════════════════════════════════
   CLIENT LAYOUT v3 — sidebar orange pleine hauteur + pill flottante
   ═══════════════════════════════════════════════════════════════════ */

/* ── Shell : sidebar + contenu (plein écran) ────────────────────── */
.client-shell {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.client-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #e85a3a;
    position: relative;
}

.client-sidebar-inner {
    position: fixed;
    width: 220px;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 10px 16px;
    overflow-y: auto;
}

/* Logo en haut de sidebar */
.client-sidebar-logo {
    padding: 0 8px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    margin-bottom: 8px;
}

.client-sidebar-logo a {
    display: inline-block;
    margin-bottom: 10px;
}

.client-sidebar-logo-icon {
    width: 100%;
    object-fit: contain;
    opacity: .9;
    display: block;
}

.client-sidebar-logo-texts {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.client-sidebar-logo-welcome {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
}

.client-sidebar-logo-company {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Labels de section */
.client-nav-section {
    margin: 14px 8px 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.client-nav-section-link {
    font-size: 9.5px;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    font-style: italic;
    font-weight: 400;
    transition: color .12s;
}

.client-nav-section-link:hover {
    color: rgba(255, 255, 255, 0.65);
}

/* Liens */
.client-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 13px;
    transition: background .12s, color .12s;
}

.client-nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.client-nav-link.is-active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 500;
}

.client-nav-link.client-nav-more {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
    padding-top: 4px;
    padding-bottom: 4px;
}

.client-nav-link.client-nav-more:hover {
    color: rgba(255, 255, 255, 0.75);
}

.client-nav-icon {
    width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    color: inherit;
}

/* Chevalier KA — lien spécial (or/jaune pour contraster sur orange) */
.client-nav-special {
    color: #ffd166 !important;
}

.client-nav-special:hover,
.client-nav-special.is-active {
    background: rgba(255, 209, 102, 0.15);
    color: #ffd166 !important;
}

/* Bas de sidebar */
.client-sidebar-bottom {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ── Pill flottante (notifs + user) ──────────────────────────────── */
.client-floating-pill {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
    overflow: visible;
}

/* Bouton notif dans la pill */
.client-pill-notif {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px 0 0 999px;
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 15px;
    position: relative;
    transition: background .12s;
}

.client-pill-notif:hover {
    background: #fdf0ed;
    color: #e85a3a;
}

.client-pill-notif-badge {
    display: none;
    position: absolute;
    top: 4px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #e85a3a;
    border-radius: 50%;
    border: 1.5px solid #fff;
}

/* Séparateur */
.client-pill-sep {
    width: 1px;
    height: 20px;
    background: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

/* Bouton user dans la pill */
.client-pill-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 8px;
    border-radius: 0 999px 999px 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    font-size: 13px;
    transition: background .12s;
}

.client-pill-user:hover {
    background: #fdf0ed;
}

.client-pill-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e85a3a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.client-pill-name {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.client-pill-caret {
    font-size: 10px;
    color: #aaa;
    margin-left: 2px;
}

/* Dropdown notif attaché à la pill */
.client-pill-notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    overflow: hidden;
    z-index: 300;
}

.client-pill-notif-dropdown.is-open {
    display: block;
}

/* ── Contenu principal ───────────────────────────────────────────── */
.client-main {
    flex: 1;
    min-width: 0;
    overflow-x: clip;
}

/* ══════════════════════════════════════════════════════════════════
   MOBILE LAYOUT — bouton hamburger + sidebar drawer
   ══════════════════════════════════════════════════════════════════ */

/* ── Bouton hamburger fixe (masqué sur desktop) ─────────────────── */
.client-mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 36px;
    height: 36px;
    background: #e85a3a;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(232,90,58,.4);
    -webkit-tap-highlight-color: transparent;
    transition: left .25s cubic-bezier(.4,0,.2,1), background .2s;
}

/* Icônes Bootstrap Icons : liste / croix */
.client-mobile-menu-icon-open  { display: inline; }
.client-mobile-menu-icon-close { display: none;   }
.client-mobile-menu-btn.is-open .client-mobile-menu-icon-open  { display: none;   }
.client-mobile-menu-btn.is-open .client-mobile-menu-icon-close { display: inline; }

/* Quand sidebar ouverte → bouton glisse à droite de la nav */
body.sidebar-open .client-mobile-menu-btn {
    left: 192px;
    background: rgba(255,255,255,0.18);
    box-shadow: none;
}

/* ── Backdrop sidebar ───────────────────────────────────────────── */
.client-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 160;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.client-sidebar-backdrop.is-open { display: block; }

/* ── Responsive ≤ 768px ─────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Hamburger visible */
    .client-mobile-menu-btn { display: flex; }

    /* Sidebar → drawer coulissant */
    .client-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 240px !important;
        z-index: 170;
        transform: translateX(-100%);
        transition: transform .25s cubic-bezier(.4,0,.2,1);
        box-shadow: none;
    }
    .client-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,.22);
    }
    .client-sidebar-inner { width: 240px; }

    /* Contenu principal : espace pour la pill flottante (top 16px + height 36px + 6px gap) */
    .client-main { padding-top: 58px; }

    /* Pill flottante : compacte (pas de nom) + alignée avec le hamburger */
    .client-floating-pill { top: 16px; right: 16px; }
    .client-pill-name,
    .client-pill-caret { display: none; }
    .client-pill-user  { padding: 4px 10px 4px 6px; }
    /* Dropdown notif : largeur adaptée */
    .client-pill-notif-dropdown { width: min(300px, 92vw); }
    /* User dropdown reste aligné à droite */
    .royal-user-dropdown { right: 0; left: auto; }

    /* Bloquer le scroll quand sidebar ouverte */
    body.sidebar-open { overflow: hidden; }

    /* ── Responsive contenu ─────────────────────────────────────── */
    .royal-main-client { padding: 16px 14px; }
    .royal-main        { padding: 0 14px; }

    .royal-section-hero,
    .royal-section-grid { grid-template-columns: 1fr; }

    .royal-card { padding: 12px 14px; }
    .royal-page-title { font-size: 1.2rem; }

    .royal-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .royal-footer {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        padding: 14px;
    }

    .royal-editorial-grid { grid-template-columns: 1fr !important; }

    .royal-calendar-grid { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .royal-validation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .royal-form-actions { flex-direction: column; gap: 8px; }
    .royal-form-actions .btn,
    .royal-form-actions button { width: 100%; justify-content: center; }

    .royal-card-subtitle { font-size: 0.78rem; }
    .royal-quote-actions { flex-direction: column; gap: 6px; }
}

/* ── Tablette 769–1024px ────────────────────────────────────────── */
@media (max-width: 1024px) and (min-width: 769px) {
    .client-sidebar       { width: 200px; }
    .client-sidebar-inner { width: 200px; }
    .royal-main-client    { padding: 20px 18px; }
}