* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-size: 1.5rem;
    color: #667eea;
}

.nav-link {
    text-decoration: none;
    color: inherit;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.header {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h2 {
    color: #667eea;
    font-size: 2rem;
}

.guilds-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.section-title {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.guilds-grid,
.rosters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.guild-card,
.roster-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.guild-card:hover,
.roster-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.guild-no-bot {
    opacity: 0.8;
    border: 2px dashed #ffc107;
}

.no-bot-indicator {
    color: #ffc107;
    font-weight: bold;
}

.btn-warning {
    background: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
}

.guild-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.guild-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.guild-icon-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.guild-info h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.roster-title {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.roster-title h4 {
    color: #667eea;
    font-size: 1.25rem;
    margin: 0;
    text-align: center;
    width: 100%;
    display: block;
}

.roster-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    width: 100%;
}

.btn-action {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.roster-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    gap: 0.5rem;
}

.info-item strong {
    min-width: 120px;
    color: #666;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn.btn-action {
    display: block;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.empty-state {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    color: #666;
}

.rosters-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rosters-section h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-content h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content label {
    font-weight: 500;
    color: #333;
}

.modal-content input[type="text"],
.modal-content input[type="number"],
.modal-content select {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.modal-content input[type="text"]:focus,
.modal-content input[type="number"]:focus,
.modal-content select:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-card h1 {
    color: #667eea;
    margin-bottom: 1rem;
}

.login-card p {
    color: #666;
    margin-bottom: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    border: 1px solid #fcc;
}

.error-state {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.error-state h2 {
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-state p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .navbar {
        padding: 1rem;
    }

    .navbar h1 {
        font-size: 1.2rem;
    }

    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.5rem;
    }

    .header h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .header .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .header .btn:last-child {
        margin-bottom: 0;
    }

    .guilds-section,
    .rosters-section {
        padding: 1.5rem;
    }

    .guilds-grid,
    .rosters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .guild-card,
    .roster-card {
        padding: 1rem;
    }

    .roster-title h4 {
        font-size: 1.1rem;
    }

    .roster-actions {
        grid-template-columns: 1fr;
    }

    .roster-info {
        font-size: 0.9rem;
    }

    .info-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .info-item strong {
        min-width: auto;
        font-size: 0.9rem;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
        max-height: 85vh;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .user-info {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .container {
        padding: 0 0.5rem;
        margin: 0.5rem auto;
    }

    .navbar {
        padding: 0.75rem;
    }

    .navbar h1 {
        font-size: 1.1rem;
    }

    .header {
        padding: 1rem;
    }

    .header h2 {
        font-size: 1.3rem;
    }

    .guilds-section,
    .rosters-section {
        padding: 1rem;
    }

    .guild-card,
    .roster-card {
        padding: 0.75rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-height: 44px; /* Taille tactile minimale recommandée */
    }

    .modal-content {
        padding: 1rem;
        width: 98%;
        margin: 5% auto;
        max-height: 90vh;
    }

    .modal-content h3 {
        font-size: 1.2rem;
    }

    .modal-content input[type="text"],
    .modal-content input[type="number"],
    .modal-content select {
        font-size: 16px; /* Évite le zoom automatique sur iOS */
        min-height: 44px;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-actions .btn {
        width: 100%;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .roster-title h4 {
        font-size: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .guilds-grid,
    .rosters-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

