/* -- réglages généraux -- */

figure > figcaption {
    justify-self: center;
    font-style: italic;
    color: grey;
}

* {
    margin: 0;
    padding: 0;
    font-family : arial;
}

/* -- Pour limiter la taille des images dans la section résumé de toutes les pages web -- */
.résumé img {
    max-width: 100%;  /* L'image ne dépassera pas la largeur de son conteneur */
    height: auto;     /* Maintient les proportions de l'image */
    display: block;   /* Évite les espaces blancs sous l'image */
    margin: 20px auto; /* Centre l'image et ajoute un espace vertical */
    border-radius: 8px; /* Coins arrondis */
}

/* pour ajouter une marge aux titres sur toutes les pages */
h1, h2, h3 {
    margin-bottom: 1em;
    margin-top : 1em;
}

/* Espacement pour tous les paragraphes */
p {
    line-height: 1.6;        /* Espacement entre les lignes */
    margin-bottom: 1.2em;    /* Espacement en bas des paragraphes */
}

/* Espacement pour tous les éléments de liste */
li {
    margin-bottom: 0.5em;    /* Espacement entre les éléments de liste */
    line-height: 1.5;        /* Espacement entre les lignes à l'intérieur d'un élément de liste */
}

/* Option : pour les listes non ordonnées et ordonnées, vous pouvez aussi ajouter un espacement */
ul, ol {
    margin-bottom: 1.2em;    /* Espacement en bas des listes */
}

/* -- menu de navigation -- */

header {
    padding-top: 30px;
    text-align: center;
}

header > nav {  /* Barre de navigation */
    display: flex;
    height: max-content;
    top: 0px;
    box-shadow: 0px 0px 20px 5px #d4d4d4;
}


header > nav > a {  /* Blocs de la barre de navigation */
    width: 25%;
    padding: 1%;
    font-size: x-large;
    text-decoration: none;
    transition: 0.5s ease-in-out;
    color: rgb(131, 35, 35);
    align-self: center;
    height: 100%;
}

header > nav > a:hover {    /* Survole d'un bloc */
    color: #FEF9DC;
    background-color: #7d201b;
}

header > div {  /* Bouton connexion ou retour au menu */
    position: absolute;
    width: max-content;
    top: 20%;
    right: 3%;
    border-radius: 5px;
}

header > div > a {
    transition: 0.5s ease-in-out;
    width: max-content;
    border-radius: 5px;
    text-decoration: none;
    color: #6e1f13;
}

header > h1 {   /* Titre de la page actuelle */
    padding-top: 30px;
    padding-bottom: 30px;
}

/* -- index -- */

.main {
    width: 100%;
}

.main > .résumé {   /* Bloc central */
    justify-self: center;
    padding: 30px;
    margin:2%;
    width: 60%;
    border-radius: 30px;
    background-color: rgb(255, 255, 255);
    color: #63120f;
    box-shadow: 0px 0px 20px 5px #d4d4d4;
}

.main > .résumé li {
    margin-left : 5%;
}

/* -- connexion -- */

.connexion {    /* Bloc de la page de connexion */
    justify-self: center;
    align-self: center;
    background-color: white;
    padding: 5%;
    width: 30%;
    height: 30%;
    border-radius: 15px;
    box-shadow: 0px 0px 20px 5px #d4d4d4;
}

.connexion > form {
    width: 100%;
    justify-self: center;
    justify-items: center;
}

.connexion > form > div {
    margin-top: 5%;
    width: max-content;
}

.connexion > form > div > input {
    height: 40px;
    width: 300px;
}

.connexion > form > .confirmer {
    width: max-content;
    justify-self: center;
}

.connexion > form > .confirmer > input {
    width: 100px;
}

/* -- menu connecté -- */

.connected {    /* Bloc du menu de l'espace administrateur */
    display: flex;
    justify-content: center;
    text-align: center;
    list-style: none;
}

.pos {  /* Trigger pour le placement du footer */
    margin: 2.7%;
}

.connected > nav {
    width: max-content;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0px 0px 20px 5px #d4d4d4;
}

.connected > nav > ul, .connected > nav > ul > li { /* Annule les margins préalables pour le design */
    margin: 0;
}

.connected > nav > ul > li {
    border-radius: 15px;
    margin: 5%;
    list-style: none;
}

.connected > nav li > a {
    display: block;
    background-color: white;
    border-radius: 15px;
    padding: 2%;
    text-decoration: none;
    color: rgb(60, 30, 30);
    box-shadow: 0px 0px 5px 3px rgba(212, 212, 212, 0.411);
}

/* -- questionnaires -- */


.m {    /* Bloc des différents questionnaires */
    display: flex;
    flex-wrap: wrap;                  
    justify-content: center;          
    gap: 2rem;                        
    width: 100%;
}


.administrés,
.communes {
    padding: 30px;
    border-radius: 30px;
    width: 42%;                       
    box-shadow: 0px 0px 10px 3px rgba(173, 173, 173, 0.274);
}

@media (max-width: 992px) { /* Animation des boutons */
    .administrés,
    .communes {
        width: 80%;
    }
}

@media (max-width: 768px) { /* Animation des boutons */
    .administrés,
    .communes {
        width: 100%;
    }
}

.m > section > div {
    display: flex;
    justify-content: center;
    margin-top: 5%;
}

.m li {
    margin-left : 5%;
}

.bouton {   /* Boutons des liens vers les questionnaires */
    padding: 15px 25px;
    border-radius: 10px;
    cursor: pointer;
    background-color: rgb(162, 60, 60);
    font-size: 1.1rem;
    border: none;
    color:white;
    transition: all 0.3s ease-in-out;
}

.bouton:hover {
    background-color: rgb(189, 189, 189);
    color: rgb(0, 0, 0);
    transform: scale(1.25);
}

/* -- FAQ -- */

div.FAQ > a{    /* Bouton d'accès vers la FAQ */
    align-content: center;
    text-align: center;
    position: fixed;
    right: 50px;
    bottom: 250px;
    background-color: lightgrey;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0px 0px 10px 3px rgba(113, 81, 81, 0.274);
}

.faq-container {    /* Bloc de la page de FAQ */
    display: flex;
    gap: 30px;
    margin: 20px;
    flex-wrap: wrap;
}

.faq-questions {
    flex: 3;
    min-width: 300px;
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(101, 67, 67, 0.1);
}

.faq-menu {
    flex: 1;
    min-width: 250px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.faq-menu h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #B84446;
}

.faq-menu ul {
    list-style-type: none;
    padding-left: 0;
}

.faq-menu li {
    margin-bottom: 15px;
}

.faq-menu a {
    display: block;
    padding: 10px 15px;
    background-color: white;
    border-left: 4px solid #B84446;
    border-radius: 5px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.faq-menu a:hover {
    background-color: #B84446;
    color: #FEF9DC;
    transform: translateX(5px);
    border-left-color: #B84446;
}

.question-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

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

.question-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.question-item .question-number {
    display: inline-block;
    background-color: #B84446;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 10px;
    font-weight: bold;
}

.contact-info {
    margin-top: 40px;
    padding: 20px;
    background-color: #e8f4fc;
    border-radius: 10px;
    border-left: 4px solid #B84446;
}

.contact-info h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .faq-container {
        flex-direction: column;
    }
    
    .faq-menu {
        position: static;
        order: -1;
    }
}

/* STYLES SPÉCIFIQUES POUR LA PAGE D'ACCÈS AUX DONNÉES */

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
}

.main-title {
    text-align: center;
    color: #63120f;
    margin: 30px 0;
    padding: 20px;
    font-size: 2.2em;
    font-weight: bold;
    border-bottom: 3px solid #7d201b;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.data-container {
    display: flex;
    gap: 30px;
    flex: 1;
    margin-bottom: 30px;
    min-height: 60vh;
}

.data-column {
    flex: 1;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0px 0px 20px 5px rgba(113, 81, 81, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid #6d6e69;
}

.column-title {
    background-color: #7d201b;
    color: #FEF9DC;
    padding: 20px;
    margin: 0;
    text-align: center;
    font-size: 1.4em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.questionnaire-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: 60vh;
    background-color: #fdfdfd;
}

.questionnaire-list::-webkit-scrollbar {
    width: 8px;
}

.questionnaire-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.questionnaire-list::-webkit-scrollbar-thumb {
    background: #7d201b;
    border-radius: 4px;
}

.questionnaire-list::-webkit-scrollbar-thumb:hover {
    background: #63120f;
}

.questionnaire-item {
    padding: 20px;
    margin-bottom: 15px;
    background-color: white;
    border-left: 5px solid #7d201b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.questionnaire-item:hover {
    background-color: #f8f4f0;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(125, 32, 27, 0.15);
    border-left-color: #63120f;
}

.questionnaire-item.selected {
    background-color: #f0e6e5;
    border-left-color: #CCD5AE;
    border: 1px solid #CCD5AE;
}

.questionnaire-id {
    font-weight: bold;
    color: #63120f;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.questionnaire-date {
    color: #7d201b;
    font-size: 0.9em;
    margin-bottom: 10px;
    font-style: italic;
}

.questionnaire-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pending {
    background-color: #432c27;
    color: #ffffff;
    border: 1px solid #6f4646;
}

.status-in-progress {
    background-color: #641515;
    color: #ffffff;
    border: 1px solid #8e2525;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 25px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0px 0px 20px 5px rgba(113, 81, 81, 0.15);
    margin-bottom: 30px;
    border: 2px solid #6d6e69;
}

.action-button {
    padding: 14px 35px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-print {
    background-color: rgb(221, 221, 221);
    color: #63120f;
    border: 1px solid #6d6e69;
}

.btn-edit {
    background-color: rgb(221, 221, 221);
    color: #63120f;
    border: 1px solid #6d6e69;
}

.btn-repondre {
    background-color: rgb(221, 221, 221);
    color: #63120f;
    border: 1px solid #6d6e69;
}

.btn-supprimer {
    background-color: rgb(221, 221, 221);
    color: #63120f;
    border: 1px solid #6d6e69;
}

.btn-traitee {
    background-color: rgb(221, 221, 221);
    color: #63120f;
    border: 1px solid #6d6e69;
}

.btn-delete {
    background-color: rgb(221, 221, 221);
    color: #63120f;
    border: 1px solid #6d6e69;
}

.btn-add {
    background-color: rgb(221, 221, 221);
    color: #63120f;
    border: 1px solid #6d6e69;
}

.btn-back {
    background-color: rgb(221, 221, 221);
    color: #63120f;
    border: 1px solid #6d6e69;
}

.btn-print:hover {
    background-color: #7d201b;
    color: #FEF9DC;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(125, 32, 27, 0.3);
}

.btn-edit:hover {
    background-color: #7d201b;
    color: #FEF9DC;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(125, 32, 27, 0.3);
}

.btn-delete:hover {
    background-color: #7d201b;
    color: #FEF9DC;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(125, 32, 27, 0.3);
}

.btn-back:hover {
    background-color: #7d201b;
    color: #FEF9DC;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(125, 32, 27, 0.3);
}

.questionnaire-details {
    display: none;
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0px 0px 20px 5px rgba(113, 81, 81, 0.15);
    border: 2px solid #6d6e69;
}

.details-visible {
    display: block;
}

.details-title {
    color: #63120f;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #7d201b;
    font-size: 1.5em;
    font-weight: bold;
}

.details-content {
    line-height: 1.6;
    color: #333;
}

.details-content p {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #7d201b;
}

.details-content strong {
    color: #63120f;
}

/* Responsive */
@media (max-width: 992px) {
    .data-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .button-container {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .action-button {
        flex: 1;
        min-width: 160px;
        padding: 12px 20px;
    }
    
    .main-title {
        font-size: 1.8em;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 10px;
    }
    
    .data-column {
        border-radius: 10px;
    }
    
    .column-title {
        padding: 15px;
        font-size: 1.2em;
    }
    
    .questionnaire-list {
        padding: 15px;
    }
    
    .button-container {
        padding: 15px;
        gap: 10px;
    }
    
    .action-button {
        min-width: 130px;
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5em;
        margin: 15px 0;
    }
    
    .action-button {
        min-width: 100%;
        margin-bottom: 10px;
    }
    
    .button-container {
        flex-direction: column;
    }
    
    .questionnaire-item {
        padding: 15px;
    }
    
    .questionnaire-id {
        font-size: 1em;
    }
}

/* -- footer -- */

footer {    /* Bloc des footers */
    display: flex;
    color: rgb(202, 202, 202);
    justify-content: space-around;
    padding: 3%;
    background-color: #5e1f18;
    margin-top: 5%;
    bottom: 0;
    border-top: 1px solid #140404;
    box-shadow: 10px 10px 10px 10px #531111;
    width:94%;
}


footer > div > ul {
    padding-left: 30px;
}

footer h5 {
    font-size: 1.2rem;
}

footer ul li {
    padding-left: 0;
    transition: color 0.3s;
}

footer ul li a{
    color: #ffffff; 
    cursor: pointer;
    transition: color 0.3s;
    text-decoration: none;
}

footer ul li a:hover{
    color: #FEF9DC; 
    cursor: pointer;
    text-decoration: none;
}

footer ul li:hover {
    color: #FEF9DC; 
    cursor: pointer;
}

/* TRUK STYLE */

.menufaq:hover {
    color: white;
}