body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('http://pyerce.ovh/IRMAA/images/TAROT.png');
    background-size: cover;
    background-position: center;

    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.3;
    z-index: -1;
}

.header {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 5px;
}

.header img {
    max-width: 600px;
    width: 80%;
    height: auto;
    display: block;
    margin: 0 auto 5px auto;
    padding-bottom: 1px;
}

.main-title {
    font-family: 'Cinzel Decorative', cursive;
    color: #2c3e50;
    font-size: 3rem;  /* 1.5 fois la taille du sous-titre qui est à 2rem */
    margin: 0 0 1rem 0;
}

.subtitle {
    font-size: 1.2rem;
    color: #2c3e50;
    text-align: center;
    margin: 0;
    padding: 0;
    font-family: 'Cinzel Decorative', cursive;
}

.version {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1rem;
    color: #666;
    text-align: center;
    margin-top: 5px;
}

.warning {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #2c3e50;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    text-align: justify;
}

/* Styles pour le menu de navigation */
.main-nav {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    z-index: 9999;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-weight: normal;
    white-space: nowrap;
    position: relative;
}

.admin-menu {
    position: relative;
    display: inline-block;
}

.admin-submenu {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(255, 255, 255, 0.95);
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: visibility 0s, opacity 0.3s;
}

.admin-menu:hover .admin-submenu {
    visibility: visible;
    opacity: 1;
}

.admin-submenu a {
    display: block;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    white-space: nowrap;
}

.admin-submenu a:last-child {
    border-bottom: none;
}

.main-nav a.active {
    color: #d30f0f;
}

.main-nav a:hover {
    color: #d30f0f;
}

.user-menu {
    margin-left: auto;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-menu a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

.user-menu a:hover {
    color: #d30f0f;
}

.logout-btn {
    position: relative;
    right: 0;
}

.footer {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.footer p {
    margin: 0;
    color: #d30f0f;
    font-size: 1rem;
}

.arcanes-table-container {
    padding: 1rem;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.arcanes-table {
    width: auto;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Styles pour la table principale des cartes */
.main-cards-table .arcane-cell {
    padding: 0.5rem;
    text-align: center;
    vertical-align: top;
    width: 147px;
    cursor: pointer !important;
    transition: all 0.3s ease;
}

.main-cards-table .arcane-cell img {
    max-width: 93px;
    height: auto;
    display: block;
    margin: 0.5rem auto;
    transition: transform 0.3s ease;
    cursor: pointer !important;
    transform-origin: center;
}

.main-cards-table .arcane-cell:hover img {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.main-cards-table .arcane-cell.empty {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .main-cards-table .arcane-cell {
        width: 98px;
    }

    .main-cards-table .arcane-cell img {
        max-width: 55px;
    }
}

/* Style pour le tableau de sélection */
.selected-cards-table {
    width: 60%;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.selected-cards-table td {
    width: 120px;
    padding: 10px;
    border: 1px solid rgba(44, 62, 80, 0.2);
    height: 160px;
    vertical-align: middle;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.selected-cards-table td:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.selected-cards-table img {
    width: 100px;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.selected-cards-table.complete {
    cursor: pointer;
}

.final-container {
    display: flex;
    gap: 2rem;
    padding-left: 2rem;
    margin-top: -5vh;
    align-items: center;
    position: relative;
    z-index: 1;
}

.interpretation-table {
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.2);
    margin-left: 2rem;
    border: 2px solid rgba(0, 0, 0, 0.3);
    margin-top: 3rem;
}

.interpretation-table td {
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    width: 120px;
    height: 30px;
    max-height: 60px;
    overflow-y: auto;
}

.interpretation-table td:first-child {
    width: 180px;
    text-align: center;
    font-weight: bold;
}

.interpretation-table td:nth-child(2) {
    width: 120px;
    text-align: left;
    background-color: rgba(255, 255, 255, 0.4);
    font-weight: bold;
}

.final-reading {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-start;  /* Aligner à gauche au lieu de centrer */
    padding-left: 2rem;  /* Ajouter un peu d'espace à gauche */
}

.final-reading .arcanes-table {
    border-spacing: 2rem;  /* Augmenté de 1rem à 2rem pour plus d'espace entre les cartes */
}

.final-reading .arcane-cell {
    position: relative;
    padding: 15px 1rem 1rem 1rem;
}

.final-reading td:empty {
    width: 150px;
    height: 150px;
    padding: 1rem;  /* Ajout d'un padding pour augmenter l'espace */
}

.final-reading img {
    max-width: 150px;
    height: auto;
    transition: transform 0.3s ease;
}

.final-reading .numero {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

/* Style pour les tableaux */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
}

th {
    text-align: center;
    padding: 1rem;
    background-color: rgba(44, 62, 80, 0.1);
    border-bottom: 2px solid rgba(44, 62, 80, 0.2);
}

td {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

tr:hover {
    background-color: rgba(44, 62, 80, 0.05);
}

.domaines-table td {
    padding: 0px 5px;
    height: 14px;
    max-height: 20px;
    overflow-y: auto;
    font-size: 0.9em;
    line-height: 1.2;
}

.domaines-table th {
    padding: 1px 5px;
    height: 16px;
    font-size: 0.9em;
    line-height: 1.2;
}

.domaines-table td:first-child {
    width: 15%;
    font-weight: bold;
}

.domaines-table td:nth-child(2) {
    width: 70%;
}

.domaines-table td:last-child {
    width: 15%;
    text-align: center;
}

main {
    position: relative;
    z-index: 1;
}

/* Ajout des styles pour le panneau de maintenance */
.maintenance-notice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 9999;
}

/* Styles pour tirage_new.php */
.instruction {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 20px 0;
    color: #2c3e50;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 8px;
    max-width: 800px;
    margin: 20px auto;
}

.cards-table {
    margin: 2rem auto;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.cards-table td {
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

.cards-table img {
    width: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cards-table img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.cards-table img.selected {
    display: none;
}

@media (max-width: 768px) {
    .cards-table img,
    .selected-cards-table img {
        width: 80px;
    }
    
    .selected-cards-table td {
        height: 120px;
        padding: 10px;
    }
    
    .instruction {
        font-size: 1rem;
        margin: 10px;
        padding: 0.8rem;
    }
}

/* Styles pour la disposition du tirage */
.tirage-container {
    display: flex;
    width: 100%;
    margin-top: 2rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.tirage-gauche {
    width: 50%;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tirage-droite {
    width: 50%;
    padding: 20px;
}

/* Style unique pour le titre du tirage */
.tirage-droite h1 {
    font-family: 'Cinzel Decorative', cursive !important;
    color: #2c3e50 !important;
    font-size: 1.3rem !important;   
    text-align: center !important;
    margin: 2rem 0 !important;
    letter-spacing: 0.1em !important; 
}

/* Suppression des styles redondants */ 
.tirage-header, .tirage-header h1 {
    display: none;
}

.resultat-tirage {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.resultat-tirage th,
.resultat-tirage td {
    padding: 12px;
    border: 1px solid rgba(44, 62, 80, 0.2);
}

.resultat-tirage th {
    background-color: rgba(44, 62, 80, 0.1);
    color: #2c3e50;
    font-weight: bold;
}

.resultat-tirage td:first-child {
    width: 120px;
    font-weight: bold;
    color: #2c3e50;
}

.resultat-tirage td:nth-child(2) {
    width: 150px;
}

.resultat-tirage td:last-child {
    font-size: 0.9em;
    line-height: 1.4;
}

.resultat-tirage tr:hover {
    background-color: rgba(44, 62, 80, 0.05);
}

.croix-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 1;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.cell {
    aspect-ratio: 1;
}

.card-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.card-cell:hover {
    transform: scale(1.05);
}

.carte {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Styles responsifs pour la disposition en croix */
@media (max-width: 768px) {
    .tirage-container {
        flex-direction: column;
    }

    .tirage-gauche,
    .tirage-droite {
        width: 100%;
        padding: 1rem;
    }

    .tirage-droite {
        border-left: none;
        border-top: 1px solid rgba(44, 62, 80, 0.2);
    }

    .croix-container {
        gap: 0.5rem;
        padding: 0.5rem;
    }
}