/* ==========================================================================
   DESIGN GLOBAL & TYPOGRAPHIE
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #1e293b;
    --secondary-color: #ffffff;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --bg-color: #f8fafc;
    --accent-color: #2563eb;
    --success-color: #10b981;
    --border-radius-lg: 20px;
    --border-radius-md: 14px;
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   INTERFACE VOYAGEUR (VIEW LIVRET) - PREMIUM LOOK
   ========================================================================== */
.client-body {
    background-color: #f1f5f9;
}

/* Bannière d'en-tête immersive */
.hero-banner {
    position: relative;
    height: 280px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 30px 24px;
    color: white;
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.1) 0%, rgba(15,23,42,0.85) 100%);
    z-index: 1;
}

.hero-text {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-text h1 {
    margin: 0 0 6px 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}


/* Conteneur principal mobile centré */
.client-container {
    max-width: 550px;
    margin: -35px auto 60px auto;
    position: relative;
    z-index: 3;
    padding: 0 16px;
}

/* Carte message de bienvenue */
.welcome-card {
    background: var(--secondary-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.welcome-card p {
    margin: 0;
    line-height: 1.6;
    font-size: 15px;
    color: #334155;
    font-weight: 500;
}

/* Grille des modules style App Native */
.client-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.client-card {
    background: var(--secondary-color);
    border-radius: var(--border-radius-lg);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.7);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
}

.client-card:active {
    transform: scale(0.96);
    box-shadow: none;
}

.client-card .icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 24px;
    transition: background 0.2s;
}

.client-card span {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    letter-spacing: -0.2px;
}

/* Widgets rangées */
.widget-row {
    background: var(--secondary-color);
    border-radius: var(--border-radius-md);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.widget-row i {
    font-size: 22px;
}

.widget-row strong {
    display: block;
    font-size: 14px;
    color: #1e293b;
}

.widget-row p {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* Modales d'affichage (Effet Sheet iOS/Android bottom up) */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    align-items: flex-end;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--secondary-color);
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    padding: 30px 24px 40px 24px;
    box-sizing: border-box;
    animation: slideSheet 0.28s cubic-bezier(0.32, 0.94, 0.6, 1);
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes slideSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 50%;
}

.data-box {
    background: #f8fafc;
    padding: 16px;
    border-radius: var(--border-radius-md);
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
}

.data-box浏览 strong {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.data-box p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.5;
}

.btn-copy {
    background: var(--text-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

/* ==========================================================================
   INTERFACE ADMINISTRATION (CREATION & CONFIGURATION COMPLÈTE)
   ========================================================================== */
.admin-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 16px;
}

.step-progress {
    display: flex;
    justify-content: space-between;
    background: white;
    padding: 16px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.step-item { flex: 1; text-align: center; }
.step-number {
    width: 28px; height: 28px; border-radius: 50%; background: #f1f5f9; color: var(--text-muted);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 6px auto; font-weight: 700; font-size: 13px;
}
.step-label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.step-item.active .step-number { background: var(--text-color); color: white; }
.step-item.active .step-label { color: var(--text-color); font-weight: 700; }

.step-panel { display: none; background: white; border-radius: var(--border-radius-lg); padding: 30px; box-shadow: var(--shadow-md); border: 1px solid #e2e8f0; margin-bottom: 24px; }
.step-panel.active { display: block; }
.step-panel h2 { margin: 0 0 20px 0; font-size: 20px; font-weight: 800; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 8px; color: #334155; }
input[type="text"], input[type="url"], textarea, input[type="color"] {
    width: 100%; padding: 12px 16px; border: 1px solid #cbd5e1; border-radius: var(--border-radius-md); font-family: inherit; font-size: 14px; color: var(--text-color); background: #fff;
}
input:focus, textarea:focus { border-color: var(--text-color); outline: none; }

/* Mini Switcher discret */
.module-toggle-box {
    display: flex; align-items: center; justify-content: space-between; background: #f8fafc;
    padding: 14px 20px; border-radius: var(--border-radius-md); margin-bottom: 12px; border: 1px solid #e2e8f0;
}
.module-toggle-box strong { font-size: 14px; font-weight: 600; }

.switch { position: relative; display: inline-block; width: 38px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .2s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .2s; border-radius: 50%; }
input:checked + .slider { background-color: var(--success-color); }
input:checked + .slider:before { transform: translateX(18px); }

.module-inner-content { display: none; padding: 20px; background: #fff; border: 1px solid #e2e8f0; border-top: none; border-radius: 0 0 var(--border-radius-md) var(--border-radius-md); margin-top: -12px; margin-bottom: 20px; }

.step-actions { display: flex; gap: 12px; }
.btn { padding: 14px 20px; font-size: 14px; font-weight: 700; border-radius: var(--border-radius-md); cursor: pointer; border: none; transition: background 0.2s; }
.btn-next { background: #000; color: #fff; flex: 2; }
.btn-prev { background: #f1f5f9; color: #475569; flex: 1; }