/**
 * Le Dojo - Styles page d'accueil
 * 
 * Page avec les portes Élève / Enseignant
 */

/* ========================================
   EN-TÊTE
   ======================================== */
.dojo-header {
    background: #1a1a1a;
    padding: 40px 20px;
    text-align: center;
    border-bottom: 4px solid var(--dojo-rouge);
    margin-bottom: 0;
}

.dojo-header-kanji {
    font-family: var(--font-jp);
    font-size: 1.4em;
    color: var(--dojo-rouge);
    letter-spacing: 0.5em;
    margin-bottom: 15px;
}

.dojo-header-title {
    font-family: var(--font-jp);
    font-size: 3em;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 0;
}

.dojo-header-title span {
    font-size: 0.8em;
}

.dojo-header-subtitle {
    font-size: 1.1em;
    color: var(--dojo-or);
    font-style: italic;
    margin-top: 10px;
    margin-bottom: 0;
}

/* ========================================
   CONTAINER ACCUEIL
   ======================================== */
.dojo-accueil-container {
    max-width: 950px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: var(--font-main);
}

/* ========================================
   SECTION CEINTURES
   ======================================== */
.dojo-ceintures-section {
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 35px;
    border: 1px solid #3a3a3a;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.dojo-ceintures-header {
    text-align: center;
    margin-bottom: 18px;
}

.dojo-ceintures-kanji-title {
    font-family: var(--font-jp);
    font-size: 0.9em;
    color: var(--dojo-rouge);
    letter-spacing: 0.3em;
    margin-bottom: 4px;
}

.dojo-ceintures-header h3 {
    font-family: var(--font-jp);
    font-size: 1.3em;
    color: #fff;
    margin-bottom: 4px;
    margin-top: 0;
}

.dojo-ceintures-header p {
    color: var(--dojo-or);
    font-size: 0.85em;
    font-style: italic;
    margin: 0;
}

.dojo-niveaux-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.dojo-niveau-carte {
    flex: 1;
    min-width: 200px;
    max-width: 230px;
    background: linear-gradient(180deg, #faf8f5 0%, #f0e8d8 100%);
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.dojo-niveau-carte:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dojo-niveau-primaire { border-color: #f39c12; }
.dojo-niveau-college { border-color: #9b59b6; }
.dojo-niveau-lycee { border-color: var(--dojo-or); }

.dojo-niveau-header {
    padding: 8px 10px;
    text-align: center;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.dojo-niveau-primaire .dojo-niveau-header {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.dojo-niveau-college .dojo-niveau-header {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.dojo-niveau-lycee .dojo-niveau-header {
    background: linear-gradient(135deg, var(--dojo-or) 0%, #b8960c 100%);
}

.dojo-niveau-kanji {
    font-family: var(--font-jp);
    font-size: 1.2em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dojo-niveau-nom {
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dojo-ceintures-liste {
    padding: 10px;
}

.dojo-ceinture-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.dojo-ceinture-item:last-child {
    margin-bottom: 0;
}

.dojo-ceinture-item:hover {
    background: rgba(255, 255, 255, 0.9);
}

.dojo-ceinture-badge {
    width: 30px;
    height: 8px;
    border-radius: 2px;
    margin-right: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

/* Couleurs des ceintures */
.dojo-ceinture-blanche { background: linear-gradient(180deg, #fff 0%, #e0e0e0 100%); border: 1px solid #ccc; }
.dojo-ceinture-jaune { background: linear-gradient(180deg, #f1c40f 0%, #d4a400 100%); }
.dojo-ceinture-orange { background: linear-gradient(180deg, #e67e22 0%, #d35400 100%); }
.dojo-ceinture-verte { background: linear-gradient(180deg, #27ae60 0%, #1e8449 100%); }
.dojo-ceinture-bleue { background: linear-gradient(180deg, #3498db 0%, #2980b9 100%); }
.dojo-ceinture-violette { background: linear-gradient(180deg, #9b59b6 0%, #8e44ad 100%); }
.dojo-ceinture-marron { background: linear-gradient(180deg, #8B4513 0%, #6b3410 100%); }
.dojo-ceinture-noire { background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%); }
.dojo-ceinture-or { background: linear-gradient(135deg, var(--dojo-or) 0%, #f4d03f 50%, var(--dojo-or) 100%); box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4); }

.dojo-ceinture-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dojo-ceinture-nom {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.8em;
}

.dojo-ceinture-nom .kanji {
    font-family: var(--font-jp);
    color: #888;
    font-weight: 400;
    margin-left: 3px;
}

.dojo-ceinture-points {
    font-size: 0.7em;
    color: #666;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

.dojo-ceintures-note {
    text-align: center;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #3a3a3a;
}

.dojo-ceintures-note p {
    color: #888;
    font-size: 0.8em;
    line-height: 1.5;
    margin: 0;
}

.dojo-ceintures-note .highlight {
    color: var(--dojo-or);
    font-weight: 600;
}

/* ========================================
   SECTION PORTES
   ======================================== */
.dojo-accueil-question {
    text-align: center;
    margin-bottom: 40px;
}

.dojo-accueil-question h2 {
    font-family: var(--font-jp);
    font-size: 1.6em;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.dojo-accueil-question p {
    color: #666;
    font-size: 1em;
}

.dojo-portes-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.dojo-carte-porte {
    width: 400px;
    height: 480px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #2a2a2a;
    position: relative;
    perspective: 1000px;
}

.dojo-carte-header {
    height: 6px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
}

.dojo-carte-eleve .dojo-carte-header {
    background: linear-gradient(90deg, #2d5a3d 0%, #3d7a52 100%);
}

.dojo-carte-enseignant .dojo-carte-header {
    background: linear-gradient(90deg, #8b2635 0%, #a63446 100%);
}

.dojo-carte-contenu {
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #faf8f5 0%, #f0e8d8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    z-index: 1;
}

.dojo-carte-contenu .dojo-carte-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.dojo-carte-contenu h3 {
    font-family: var(--font-jp);
    font-size: 1.6em;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.dojo-kanji-small {
    font-family: var(--font-jp);
    font-size: 1em;
    color: #999;
    margin-bottom: 20px;
}

.dojo-carte-contenu p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95em;
    text-align: center;
}

.dojo-carte-tags {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.dojo-carte-eleve .dojo-tag {
    background: #e8f0e8;
    color: #2d5a3d;
    border: 1px solid #c8d8c8;
}

.dojo-carte-enseignant .dojo-tag {
    background: #f5e8e8;
    color: #8b2635;
    border: 1px solid #e0c8c8;
}

.dojo-password-group {
    width: 100%;
    margin-bottom: 15px;
}

.dojo-carte-contenu input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--dojo-gris);
    border-radius: 6px;
    font-size: 1em;
    text-align: center;
    font-family: inherit;
    transition: all 0.3s;
    background: #fff;
}

.dojo-carte-contenu input[type="password"]:focus {
    outline: none;
    border-color: #8b2635;
    box-shadow: 0 0 0 3px rgba(139, 38, 53, 0.1);
}

.dojo-error-message {
    color: #8b2635;
    font-size: 0.85em;
    margin-top: 8px;
    display: none;
}

.dojo-error-message.show {
    display: block;
}

.dojo-btn-eleve {
    background: linear-gradient(180deg, #2d5a3d 0%, #1e3d2a 100%);
    color: #fff !important;
}

.dojo-btn-eleve:hover {
    background: linear-gradient(180deg, #3d7a52 0%, #2d5a3d 100%);
    box-shadow: 0 5px 20px rgba(45, 90, 61, 0.4);
}

.dojo-btn-enseignant {
    background: linear-gradient(180deg, #8b2635 0%, #6b1a28 100%);
    color: #fff;
}

.dojo-btn-enseignant:hover {
    background: linear-gradient(180deg, #a63446 0%, #8b2635 100%);
    box-shadow: 0 5px 20px rgba(139, 38, 53, 0.4);
}

/* ========================================
   PANNEAUX DE PORTE
   ======================================== */
.dojo-porte-panel {
    position: absolute;
    top: 6px;
    width: 50%;
    height: calc(100% - 6px);
    z-index: 10;
    transition: transform 0.7s ease;
}

.dojo-porte-panel-left {
    left: 0;
    transform-origin: left;
}

.dojo-porte-panel-right {
    right: 0;
    transform-origin: right;
}

.dojo-carte-porte:hover .dojo-porte-panel-left {
    transform: rotateY(-110deg);
}

.dojo-carte-porte:hover .dojo-porte-panel-right {
    transform: rotateY(110deg);
}

/* Porte Élève - Vert */
.dojo-porte-eleve-panel {
    background: linear-gradient(180deg, #2d5a3d 0%, #1e3d2a 100%);
}

.dojo-porte-eleve-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='100' viewBox='0 0 40 100'%3E%3Crect x='18' y='0' width='4' height='100' fill='%234a7c59' opacity='0.4'/%3E%3Cellipse cx='20' cy='15' rx='6' ry='1.5' fill='%234a7c59' opacity='0.3'/%3E%3Cellipse cx='20' cy='35' rx='6' ry='1.5' fill='%234a7c59' opacity='0.3'/%3E%3Cellipse cx='20' cy='55' rx='6' ry='1.5' fill='%234a7c59' opacity='0.3'/%3E%3Cellipse cx='20' cy='75' rx='6' ry='1.5' fill='%234a7c59' opacity='0.3'/%3E%3Cellipse cx='20' cy='95' rx='6' ry='1.5' fill='%234a7c59' opacity='0.3'/%3E%3C/svg%3E");
    opacity: 0.8;
}

.dojo-porte-eleve-panel::after {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, rgba(212, 175, 55, 0.3) 20%, rgba(212, 175, 55, 0.5) 50%, rgba(212, 175, 55, 0.3) 80%, transparent 100%);
}

.dojo-porte-panel-left.dojo-porte-eleve-panel::after { right: 5px; }
.dojo-porte-panel-right.dojo-porte-eleve-panel::after { left: 5px; }

/* Porte Enseignant - Rouge */
.dojo-porte-enseignant-panel {
    background: linear-gradient(180deg, #8b2635 0%, #5c1a24 100%);
}

.dojo-porte-enseignant-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='100' viewBox='0 0 40 100'%3E%3Crect x='18' y='0' width='4' height='100' fill='%23a63446' opacity='0.4'/%3E%3Cellipse cx='20' cy='15' rx='6' ry='1.5' fill='%23a63446' opacity='0.3'/%3E%3Cellipse cx='20' cy='35' rx='6' ry='1.5' fill='%23a63446' opacity='0.3'/%3E%3Cellipse cx='20' cy='55' rx='6' ry='1.5' fill='%23a63446' opacity='0.3'/%3E%3Cellipse cx='20' cy='75' rx='6' ry='1.5' fill='%23a63446' opacity='0.3'/%3E%3Cellipse cx='20' cy='95' rx='6' ry='1.5' fill='%23a63446' opacity='0.3'/%3E%3C/svg%3E");
    opacity: 0.8;
}

.dojo-porte-enseignant-panel::after {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, rgba(212, 175, 55, 0.3) 20%, rgba(212, 175, 55, 0.5) 50%, rgba(212, 175, 55, 0.3) 80%, transparent 100%);
}

.dojo-porte-panel-left.dojo-porte-enseignant-panel::after { right: 5px; }
.dojo-porte-panel-right.dojo-porte-enseignant-panel::after { left: 5px; }

/* Label sur la porte */
.dojo-porte-label {
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 15;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.dojo-carte-porte:hover .dojo-porte-label {
    opacity: 0;
}

.dojo-label-kanji {
    font-family: var(--font-jp);
    font-size: 3em;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
}

.dojo-label-accent {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--dojo-or), transparent);
    margin-top: 10px;
    border-radius: 1px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    .dojo-portes-container {
        flex-direction: column;
        align-items: center;
    }

    .dojo-carte-porte {
        width: 100%;
        max-width: 400px;
    }

    .dojo-niveaux-container {
        flex-direction: column;
        align-items: center;
    }

    .dojo-niveau-carte {
        width: 100%;
        max-width: 280px;
    }

    .dojo-ceintures-section {
        padding: 15px;
        max-width: 100%;
    }

    .dojo-header-title {
        font-size: 2.2em;
    }
}